By Vikas Gandhi (1) on April 15th, 2009

One of the challenges of scaling out applications through server farms is the need to share memory artifacts (session and cache). There are of course many techniques which can be employed. As always, looking around the Internet  reveals that there are good solutions already available.

Recently, I evaluated SharedCache, which according to their website is a high performance distributed and replication cache system built for .Net applications running in server farms. The system is made available to .Net applications through a Windows service.

 Some of the key features are listed of SharedCache are listed below:

  • Works for both web and non-web solutions.
  • Is extremely fast for fetch.
  • It supports multiple topologies: distributed partitioned caching, replicated caching, and single instance caching. You can choose which you need based on your requirements (for example, you may want to choose replicated caching over single caching to ensure that you don’t have any single points of failure)
  • In case of Caching, one of the most important aspect is purging. With SharedCache, you have a choice to make amongst the several that are supported:
    • Cache Item Priority
    • Least Recent Used Item (LRU)
    • Least Frequently Used Item (LFU)
    • Time based
    • Biggest Latency First (BLF)
    • Lowest Latency First (LLF)
    • Hybrid – Creating an index based on various item attributes such as: time in cache, Amount of requests, Size, Cache Life Time, etc.
  • Configurable maximum cache size and the load factor when the system starts to purge cached items.

You can install the service by downloading it from CodePlex. And several samples and discussions are available at the author’s blog. The best thing about this service is that there is plenty of documentation to guide you.

Just try it out. Its pretty cool.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • Add to favorites
  • LinkedIn
  • MyShare
  • SphereIt

One Response to “A readymade caching solution for scalable .Net applications”

  1. By Atul Verma on Jun 25, 2009

    Microsoft Project Code Named – “Velocity”

    “Velocity” is a distributed in-memory cache that provides .NET applications with high-speed access, scale, and high availability to application data.

    * 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.).

    For more info visit http://msdn.microsoft.com/hi-in/library/cc645013(en-us).aspx

    Reply

Post a Comment