I am looking for cache server for .NET. What can you suggest? As i know memcached has provider for .net. Is it good enough to use for .net in production?
AppFabric is another popular solution from Microsoft.
If you're willing to run your cache server in Linux, you could use Redis, and use the BookSleeve library from .NET, this is what StackOverflow uses
http://code.google.com/p/booksleeve/
Scale Out State Server is an excellent solution. It's not free, but for large-scale applications, it's one of the best options that we found.
NCache is another option, though I have no experience with it.
For enterprise scale (and budget) there's Oracle's Coherence. It works extremely well, though it's extremely pricey.
Here's another SO question with some information that may or may not be helpful:
Caching Solutions
Memached is plenty good for production, probably best using the enyim provider.
Couchbase provide a good web ui and easy memcached install on windows. Free if on a single server. It's great to be able to monitor your cache instance.
They have paid for solutions but and their own server.
AppFabric as mentioned is another obvious candidate but not a mature as memcached. AppFabric is an application server and can also provide distributed caching like membase
See the post Top caching libraries for .NET for several options, including both free and commercial. The choice will vary based on your actual need.
though there are numbers of third party caching solutions are available for .NET but if we narrow done the research based upon Google and word of mouth, it might be
1) Memcached
2) Appfabric
3) NCache
firs two are free/open source software so they have some limitations in it, while on the other hand NCache has a lot to offer as compared to others, but you have to buy it. but it has also a free version available called as NCache Express. below are two important links in this regard,
Video on NCache Vs AppFabric
Blog on NCache Vs AppFabric
Related
We have hundreds of database and application servers in our datacenter and we are currently using various third party tools to monitor. All appear to have their stengths and weaknesses.
I would like to create a simple Windows Service using C# that can check the most common performance counters on a Windows system every 5 mins or so and upload the results to a WCF service.
My questions are:
1) Having never worked with Performance Counters in .NET, is this something that is fairly simple to do?
2) Are there any permission issues I need to concern myself with? The service will likely be running under "localsystem" or a domain user account.
3) What are the common performance counters I should be looking for... Memory, CPU, Disk?
4) Has anyone else written code similar to this and do they have any examples to get me started?
Any help would be appreciated.
Monitoring performance counters isn't hard using .NET however I recommend using existing tools (such as SCOM) that will do exactly this for you.
In case others may find this useful (or myself in the future) ;)
Yes - Performance Counters
Unfortunately I don't know the answer to this one, but I'll update if I learn it. :D
This will depend on the context. You will likely want to monitor slightly different counters for Database servers vs Application servers. There are many excellent resources on this.
Here are a couple key files I found on various projects on Github. They may not be ideal, or reflect the above articles, but they give an idea on the structure. You can also refer to the examples in the official documentation on the PerformanceCounter Class.
TelemetryInstrumentService.cs by Scott DeHaan
CounterWatcher.cs by CryptonZylog
Back when AppFabric Caching was "Velocity", High Availability was "out of the box" option, and one of the few major features that made it stand out over other caching systems, namely memcached. However along the way "someone" decided it best to charge customers extra for HA by making it only available to Windows Server 2008 Enterprise Edition (or higher)... I am hopeful that Windows Azure AppFabric Caching does provide HA. I'm betting it must, if for no other reason because there is no "upgrade" option. Anyone know for certain?
As a secondary question, if anyone knows of the ETA for the production release of Windows Azure AppFabric Caching other than "2011", much appreciated. Roadmaps would be mighty handy... Instead most of us rely on Google to determine guesswork roadmaps :). Always been a big fan of MS products/services, but they could really use some additional "focus" in the area of Azure.
I understand AppFabric Caching is currently only in "alpha", and is only available via the Azure Labs portal.
Found the answer...
As we move towards commercial launch, we'll look to add many of the features that make Windows Server AppFabric Caching extremely popular, such as High Availability, the ability to emit notifications to clients when they need to refresh their local cache, and more.
http://blogs.msdn.com/b/windowsazureappfabric/archive/2010/10/28/introduction-to-windows-azure-appfabric-caching-ctp.aspx
So no go for the time being, but looks like it is planned. Good enough for me, since it is not yet released anyway. But any ETA on release date (or quarter) would be very helpful for configuring my roadmap...
commercial availability for the current Azure AppFabric labs features is looking to be Q2 of 2011. I'm basing this on the various PDC10 sessions. Only time will tell if we see HA included in that feature set or not.
I am looking for an efficient cache strategy for C#. I am constructing an MVC application however one of my queries targets a historical table with states, etc. Needless to say, the query is highly nested and complex, and I do not want to run it every time a person hits the site, so I decided to cache the data (either the results or the tables themselves). I dont want to store my cache in the Managed heap due to the stop-the-world garbage collection problem which is common with generational GC's and Caches. I was wondering, does the Cache Application Block (http://msdn.microsoft.com/en-us/library/ff650180.aspx) use Unmanaged memory (off the managed heap?). Is there a way to access memory directly via native IO? Any other cache tools worth looking into?
I highly suggest you look at AppFabric Caching. I just implemented for my MVC app and it worked great.
I used this blog to get started:
http://www.hanselman.com/blog/InstallingConfiguringAndUsingWindowsServerAppFabricAndTheVelocityMemoryCacheIn10Minutes.aspx
Let me know if you need some code samples.
.Net caching frameworks that I am aware of:
The built in ASP.Net System.Web.Caching (which can be used in non-web applications as long as you don't mind referencing System.Web)
NCache
The Microsoft Caching Application Block
Built in Systen.Runtime.Caching (.Net 4.0 only)
Windows Azure AppFabric Caching (How to: Configure ASP.NET to use Windows Azure AppFabric Caching)
Although I've looked into various caching frameworks I'm afraid I don't have very much experience with any of them except for System.Web.Caching - this works fine for our purposes.
You can as well explore the distributed caching options like Memcached or SharedCache. We had used SharedCache for one of our project and it worked well. As suggested in one of the answers you could also try AppFabric. If you are looking at Microsoft based solution then there is a distributed caching famework by Microsoft called Velocity.
Hope this helps.
Which native server is best, in your opinion, to implement long-polling / Comet? The first target application is chat, but there will be other implementations - we basically need push-to-client capabilities.
I'm limiting the answers to C# or Java because these two technologies are dominant at my workplace. The requirements are as usual: performance, ease of deployment/programming, customization, ...
IIS + WebSync is a very straight-forward, scalable and extensible solution for server push. There is a free Community edition I highly recommend checking out.
Both Java and .NET platforms have enough capabilities to handle your needs. If you choose Java : You may start with DWR otherwise, on the .net side PokeIn library should be the choice.
I just saw this blogpost from Scott Hanselman yesterday. It looks very promising.
http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx
It features an opensource product called SignalR which is available through nuget.
You can find an example chat application in the sources # github
https://github.com/SignalR/SignalR
I don't think there's a significant difference in this regard.
Try netty-socketio project. It's a Java framework with long-pooling and websocket support using famous Socket.IO protocol.
I know that special attention was paid to Comet support in the Grizzly engine used by Glassfish. It wasn't treated as an afterthought.
I've seen there is a plenty of them. NCache, Velocity and so forth but I haven't found a table comparing them.
What's the best considering the following criterias:
Easy to understand.
Is being maintained lately.
Is free or has a good enough free version.
Works.
I can't speak for what's best or worst, but I'll throw in my experience with NCache in case it helps.
Disclaimer: NHibernate and I had some disagreements, we have since gone our separate ways :)
The Good
The performance was great
The support was great, it's well maintained (I'm speaking to status as of ~6 months ago)
It has a free version (caveats below)
It worked as well as possible, but I had issues with the base level 2 cache provider implementation...but this was a problem on the NHibernate side with HQL, not the NCache side.
The Bad (For reference look here)
The free version had it's limitations, they are strategically put there no doubt, but for our project ultimately we couldn't use the free version because of some key features not available. The below restrictions are on the FREE version.
Key Based Dependency is not included
None of the database dependencies are included
No 64-bit version
Those were the sticking points on 2 different projects for me...however aside from those, no problems and I was happy with the simplicity of install and configuration. If the above aren't sticking points/requirements for you, I do recommend giving it a shot. It took me less than 10 minutes to get a server up and functioning as our L2 cache.