Windows Azure AppFabric Caching availability announced!!

Windows Azure AppFabric Caching will be released to production at the end of April 2011. The CTP of the Caching service has been available for trial since October 2010.

Windows Azure AppFabric Caching is an explicit, in-memory, distributed caching service that:

  • Caches all types of data (CLR objects, rows, XML, binary data etc)
  • Provides multi-tenant caching service
  • Hosted on Windows Azure
  • Safeguards access to data using Windows Azure AppFabric Access Control service
  • Highly scalable, 64-bit service

This service is an extension of Windows Server AppFabric Caching to the cloud. Windows Azure AppFabric Caching (similar to Windows Server AppFabric Caching) can be used in multiple scenarios to cache different types of data:

  • Cache reference data
    • A version of the authoritative data, refreshed periodically
    • Will mostly need reads of the cache data
    • Product catalog is an example of such data
  • Cache activity-oriented data
    • Data generated as part of the application activity, typically logged back to a backend database
    • Will need reads and writes of the cache data
    • Session state, shopping carts are examples of such data
  • Cache resource-oriented data
    • Authoritative data, modified by transactions
    • Will need reads and writes
    • Flight Inventory data is an example of such data

Using Windows Azure AppFabric Caching for the above scenarios, developers can very easily build highly performing applications and also make sure that their customers always have access to their session data.

This service is closely integrated with ASP.Net (AppFabric Caching can be used for caching ASP.Net’s SessionState as well as Output data through simple configuration changes). It also uses the AppFabric Access Control service for authentication.

Let us look at the capabilities of this service at a high level:

  • Simple Access APIs
    • Using cache can be as simple as this example:

//create DataCacheFactory based on config file

var dcf = new DataCacheFactory();

//get the default cache

var cache = dcf.GetDefaultCache();

//Add an item called "Test" - throws if exists

cache.Add("Test", new Data {TheData = "Test" });

//Put an item called "Test2" - overwrites if exists

cache.Put("Test2", new Data { TheData = "Test2" });

//Get "Test3" - add if not in cache (cache-aside)

var test3 = cache.Get("Test3") as Data;

  • Multi-tenant caching service that provides in-memory, distributed caching
  • Low latency with the local cache
    • Windows Azure AppFabric Caching will use the memory available on the local machine to cache data as well. This will enable applications to read the data with very low latency. More information on the local cache is here.
  • Caches any managed object
    • No object size limit
    • No serialization costs for local caching
  • Easily integrates into existing applications using Windows Server AppFabric Caching
    • Same managed interfaces as Windows Server AppFabric Caching
  • Secured by Windows Azure Access Control service

Let us look at how users can get a cache and use it in their Windows Azure application:

  • Provision a cache
  • Windows Azure users can create a new cache namespace by going to the Windows Azure AppFabric Management Portal. The portal for CTP is https://portal.appfabriclabs.com/ and the portal when Caching is released to production will be https://appfabric.azure.com/.
    • Once the provisioning is done and the new cache is in Active state, they can get the cache endpoint and port from the ‘client configuration’ provided in the portal.
  • Download the SDK – SDK for the CTP release can be downloaded from https://go.microsoft.com/fwlink/?LinkID=184288 and the SDK for the production release will be available here. You can also download the SDK from the portal.
  • Build the application using this SDK.
  • Use the cache endpoint information in the application’s configuration and deploy the application on Windows Azure.

During provisioning, users can also select the size of the cache they need. There are multiple sizes available for both CTP and production release:

CTP has two size options - 128MB, 256MB

Production release will have more options - 128MB, 256MB , 512MB, 1GB, 2GB and 4GB

Users can upgrade/downgrade between these sizes at any time without incurring any downtime for the application. The usage metrics for the cache in the AppFabric portal can help users track their cache usage and identify the size that is best suited for the application’s needs.

As we discussed in this blog post today, with the close integration with ASP.Net, simple, easy to use APIs and parity with the Windows Server AppFabric Caching, we showed how users can use Windows Azure AppFabric Caching to easily build highly performant Windows Azure and SQL Azure applications.

Learn more about Windows Server AppFabric Caching here.

Learn more about Windows Azure AppFabric Caching here.

Tutorials and hands on labs for Windows Azure AppFabric Caching can be downloaded from here.

More information about Windows Azure can be found here.

Please provide feedback and let us know what you think through our Windows Azure AppFabric CTP Forum.

The Windows Azure AppFabric Caching Team.