OrleansContrib / OrleansBlobStorageProvider

DEPRECATED - now part of the orleans codebase :shipit:
13 stars 11 forks source link

Use blob ETags in Read/Write/Clear #7

Closed ReubenBond closed 9 years ago

ReubenBond commented 9 years ago

Currently, the storage provider will overwrite blobs regardless of whether or not the grain is using the latest version of that blob.

This change propagates the blob's ETag between read, write, and clear.

This fixes concurrency bugs which can occur due to temporary silo failure and upgrades, or when blobs are externally modified.

Calls which are made to write a blob with an incorrect ETag will result in Orleans re-reading the state and re-activating the grain.

ReubenBond commented 9 years ago

Note that Orleans' effectively pushes consistency requirements to the storage layer, so this enables optimistic concurrency.

This change aligns the behavior with that of the the built-in Azure Table Storage provider, so there should be no surprises for consumers.

gabikliot commented 9 years ago

BTW, in general, what do people think about this model, that Orleans effectively pushes consistency requirements to the storage layer? Too problematic, you like it, ...?

ReubenBond commented 9 years ago

I like it: pushing consistency requirements down the stack makes sense.

Some get confused about how many activations for a given grain may exist at any point in time, though. It might help if we had a page detailing Orleans' consistency model (& guarantees) in simple terms.

gabikliot commented 9 years ago

Great idea! We will write it next week. We already started clarifying a lot of important internal design decisions here: (https://github.com/dotnet/orleans/wiki/Runtime-Implementation-Details)

richorama commented 9 years ago

sorry, finally got round to merging this and pushing to nuget...

ReubenBond commented 9 years ago

No worries :)