Session state provider and atomic operations

Posted by vtortola on Programmers See other posts from Programmers or by vtortola
Published on 2011-02-27T14:01:44Z Indexed on 2011/02/27 15:31 UTC
Read the original article Hit count: 379

Filed under:

Hi,

I've been thinking about this and it is blowing my mind...

How does a session state provider properly works internally?

I mean, I tried to write a custom session state provider based on Azure Tables or Blobs, but quickly I realized that because there is no way to ensure an atomic operation or establish a lock, race conditions are suitable to happen when several web servers do operation on that shared information.

I know that there is a SQL Server Session State Provider (SQLS-SSP) and people is happy with it, so I guess that it's using some kind of transaction isolation level in order to accomplish some degree of concurrent safety, like checking is the data is lock (a simple column), locking it if not and returning the data in an atomic operation, but is that so? what does happen if the data is lock? does it returns an error? block the call for a while? returns it in read-only fashion?

Cloud computing paradigms could be somehow new, but webfarms have been here for a while, so as I'm pretty new on it... do you recommend any good lecture about the topic?

Thanks.

© Programmers or respective owner

Related posts about ASP.NET