Distributed in-memory caching has become one of the primary techniques for scaling up a Web application. Open-source and commercial caching products, such as memcached, JBossCache, or Oracle Coherence, have enabled some of the largest Web sites to service lots of incoming requests.
Microsoft entered the fray of distributed caching with Velocity, a new in-memory cache for serializable .NET objects. The project provides a downloadable preview as well as code samples and documentation, describing Velocity as:
A distributed in-memory application cache platform for developing scalable, available, and high-performance applications. [It] fuses memory across multiple computers to give a single unified cache view to applications...
Applications can store any serializable CLR object without worrying about where the object gets stored. Scalability can be achieved by simply adding more computers on demand. Velocity also allows for copies of data to be stored across the cluster, thus protecting data against failures...
Velocity can be configured to run as a service accessed over the network or can be run embedded with the distributed application. Velocity includes an ASP.NET session provider object that enables ASP.NET session objects to be stored in the distributed cache without having to write to databases. This increases the performance and scalability of ASP.NET applications
Microsoft's Dare Obasanjo writes about Velocity in a blog post:
Like memcached, you can think of Velocity as a giant hash table that can run on multiple servers which automatically handles maintaining the balance of objects hashed to each server and transparently fetches/removes objects from over the network if they aren't on the same machine that is accessing an object in the hash table. In addition, you can add and remove servers from the cluster and the cache automatically rebalances itself.
Microsoft white paper on Velocity lists the following features:
Caches any serializable CLR object and provides access through simple cache APIs.
Supports enterprise scale: tens to hundreds of computers.
Configurable to run as a service accessed over the network or run embedded with the application.
Supports common cache configurations.
Supports dynamic scaling by adding new nodes.
Configurable number of backup copies to provide high availability.
Automatic load balancing.
Integration with administration and monitoring tools such as ETW, System Center, etc.
Provides tight integration with ASP.NET to be able to cache ASP.NET session data in the cache without having to write it to source databases. It can also be used as a cache for application data to be able to cache application data across the entire Web farm.
Follows the cache-aside architecture (also known as Explicit Caching) for V1. That is, you must decide explicitly which objects to put/remove in your applications and “Velocity” does not synchronize with any source database automatically.
Support for multiple client languages (for example, PHP, C#, C++, etc.).
What do you think of Velocity as a distributed cache for Web sites? What caching solutions do you currently use to scale .NET-based sites?
AFAIK first distributed cache solution for windows world is from scaleout software, which released the 1.0 in 2005. Dist. cache for Java has been around since 2000 with Coherence, Gemstone, Gigaspaces, ObjectGrid and many opensource ones. From that picture one might say 1. Java is a better option for highly distributed apps in terms of maturity. 2. Apps running on Windows environment didn't need distributed cache as much.
not entirely sure..
Another thing I wonder is why Microsoft developed Velocity instead of acquiring Scaleout...
Dist. cache for Java has been around since 2000 with . . . Gigaspaces
GigaSpaces provides a distributed computing platform, of which caching is one small use case, for Java, C++, and C# / .Net. All three languages can interoperate within the GigaSpaces grid.
Coherence started supporting C# and .NET customers in 2002 or 2003 via JNBridge.
> Dist. cache for Java has been around since 2000 with > Coherence, Gemstone, Gigaspaces, ObjectGrid and many > opensource ones.
To be fair, SpiritSoft SpiritCache (James Strachan, etc.) was probably the first Java product focused on distributed caching in Java.
Coherence was the first coherent caching implementation (by way of n-way replication) for Java in 2001, and the first HA partitioned implementation in any language in 2002.
> 1. Java is a better option for highly distributed apps in > terms of maturity.
I think for the "back end" part of the work, this is true. On the other hand, there are some pretty major ASP.NET (i.e. .NET and Windows-based) web sites that run at a high scale, e.g. running Coherence. For sites like that, I think of "Coherence is built in Java" like I think of "the Oracle database is built in C", as in "it doesn't really matter what language that part of the infrastructure is built in, because it can provide those services to any platform and language."
> 2. Apps running on Windows environment didn't need > distributed cache as much.
We've seen demand since 2002, so it's definitely there.
OTOH, in general we don't see that many large-scale sites built in .NET.
> Another thing I wonder is why Microsoft developed Velocity > instead of acquiring Scaleout...
Scaleout Software is probably wondering the same thing.
Once Microsoft releases Velocity, there will be very little room for Scaleout Software. That's the problem being in a Microsoft-dominated market. (I know from experience.)
I think for Miscrosoft to buy ScaleOut there would have been a business driver at Microsoft to do so. Knowing how strongly Microsoft likes small shops with developed technology, it looks like there was no a business driver there. Now, the question is, what this means for ScaleOut.
NCache is the first, the most mature, and the most feature-rich distributed cache in the .NET space. NCache Enterprise is the leading enterprise level distributed cache for .NET. Check it out at http://www.alachisoft.com.
I think Velocity will not kill the market for other distributed caching products even if it is free. Instad, it will only increase the total market size by raising awareness. The biggest challenge that distributed caching products like NCache are facing today is not competition from other products but a lack of awareness in the market about the benefits of distributed caching.