azure-cosmos-dotnet-repository icon indicating copy to clipboard operation
azure-cosmos-dotnet-repository copied to clipboard

Distributed Locking (Lease Lock)

Open mumby0168 opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. It would be really great if the library could offer an opt-int repository that would allow a document to be inserted that could act as a lock maybe into something called a lease container. The library could abstract a nice and simple API over this.

Describe the solution you'd like Something that allows a distributed lock to be used with cosmos DB, with little effort from the user's side.

Describe alternatives you've considered Implementing this standalone, or maybe as a separate package.

Additional context There is some information on these here

  • https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html
  • https://medium.com/@fbeltrao/distributed-locking-in-azure-functions-bc4517c0306c
  • Etaga will need to be used in order to do this effectively

mumby0168 avatar Nov 23 '21 08:11 mumby0168

Great idea, @mumby0168! We could use lease locks for sure.

PaulOst avatar Jun 28 '22 18:06 PaulOst