locked
Windows Azure Caching (Preview) consistency and concurrency RRS feed

  • Question

  • I'm trying to figure out how the new Windows Azure Caching (Preview) announced in Azure June 2012 SDK works.

    Question 1 - consistency

    Say I have configured a cache with High Availability enabled. Meaning a cache item is hold by two cache servers.

    What happens if I update a cache item on "cache server 1" and nanoseconds later read the same cache item from "cache server 2"?

    In other words. Is the cache consistent or eventually consistent?

    Does the answer change if I don't have High Availability enabled. Meaning only one cache server has a cache item?

    Question 2 - concurrency

    If I update the cache item from to threads simultaneously, my understanding is that the last update wins.

    Is there a way to simulate transactions/optimistic concurrency, so an update fails if the cached item has changed between a get and a put? Eg. by using a Etag.

    If yes... does that work both with and without High Availability enabled?


    Saturday, June 16, 2012 3:53 PM

Answers

All replies

  • Consistency

    Windows Azure Caching (Preview) provides consistency with and without High Availability. This is similar to what was provided in Windows Server Appfabric Caching. You can read more about how consistency is maintained in High Availability scenario using the following link http://msdn.microsoft.com/en-us/library/ee790974(v=azure.10).aspx .

    Concurrency

    To help your application deal with concurrency issues, Windows Azure Caching (Preview) supports optimistic and pessimistic concurrency models. It works for both with and without High Availability scenario. You can read more about this, using the following link

    http://msdn.microsoft.com/en-us/library/windowsazure/hh914145

    Sunday, June 17, 2012 4:19 AM
  • Thanks... my Google skills escaped me ;-)

    I'm looking forward to implement this... looks like this new caching is all I'm looking for.

    Sunday, June 17, 2012 1:56 PM