booi•

Cool, good for high latency locks and you don’t have to spin up any other resources. GCS is already strongly consistent so the hard part is already done.

1
jrochkind•

Interesting!

I wonder if it would be feasible to generalize for other cloud storage providers. (S3, btw, is now strongly consistent too, as of Dec 2020)

1
FooBarWidgetOP•

Every cloud storage system has different concurrency control primitives. So I'd say no.

S3 is strongly consistent but I don't think they have anything comparable to if-generation-match. On the other hand DynamoDB has it.

Azure Blob Storage seems to have native support for leases, so the algorithm for Azure might have to be completely different.

3
jrochkind•

Aha, I didn't realize you were using features like that in GCS, I'm going take a closer look at the code and/or your algorithm write-up I now see, thanks!

Thanks for sharing this code and writing it up!

With S3's recent move to strong consistency, inability to do a conditional "optimistic locking" put does seem like an omission! It was not possible before strong consistency guarantees, but with them it seems like it should be feasible on S3's end. (I was going to say "trivial", but I don't know what's inside their infrastructure enough to even suggest that). I wonder if S3 will ever get to it...

1