Sunday 2 November 2008

Windows Azure: Cache based Session Providers????

So following on from my previous article regarding cost efficient code reviews, I am going to predict a potential new session provider model.

In a world of Windows Azure we will be making more decisions for our applications based on cost. Session is an obvious target as the current session model in ASP.NET could cost us a lot of money (depending on Microsoft's pricing model).

Windows Azure, Cache and Velocity

So at the moment the only cache provider available that can realistically be used with Azure is to use Windows Azure Storage's Table Storage Service. There is already an ASP.NET provider supplied in the Azure SDK, (technically you could use SQL Services but this would be more expensive and unnecessary).

So Microsoft have said they plan to extend the options available for Windows Azure Storage Services and provide a Cache Service (based on Velocity).

This is likely to be cheaper and faster than using the Table Storage Service. If it's not cheaper (or at least the same price), I suspect folks will continue to use the Table Storage Service. This is a really good thing and will mean that we can reduce our costs further when using caching with ASP.NET.

Cache based Session Provider

So assuming that the cache service is cheaper than the Table Storage Service, it is logical that Microsoft will provider a Session State provider that is based on the Cache Service. If Microsoft don't create such a provider, then I suspect someone else will.

The reason I suspect this is that, if it's cheaper to use the Cache Service than to use the Table Service, it makes sense to utilize the service for what is considered as volatile data. It wouldn't be hard to build such a provider for the session.

In a web application where session data is frequently read and written to, if costs can be reduced using an alternative model then it makes commercial sense to utilize this.

I guess the only case that such a model wouldn't be explored is if the pricing of the Cache Service and the Table Service were the same.

Silverlight and Session Providers

This also brings an interesting question for your application and Silverlight, i.e. is exposing the session via web services to your silverlight application, the most cost efficient model. I will try and think about how this affects Silverlight also in future articles.

Cost efficient development is definitely coming and these are the sort of areas that will be explored.

4 comments:

roni schuetz said...

checkout http://www.sharedcache.com or http://www.codeplex.com/sharedcache for an open source distributed and replicated high performance cache.

chrishayuk said...

thanks for the comment roni, but these aren't providers that are setup to work in a windows azure environment.

they may'be configurable to do so, but this would be a topic of another article

Unknown said...

So Microsoft have said they plan to extend the options available for Windows Azure Storage Services and provide a Cache Service (based on Velocity).

Do you have a link for this?

chrishayuk said...

It was at the PDC.

I can't remember if it was part of a session presentation, session q&a, or as part of a chat.

It was a long week with lots of conversations