Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is known as 'optimistic locking'. But I wouldn't call it a distributed locking mechanism.


Optimistic locks are absolutely a distributed locking mechanism, in that they are for coordinating activity among distributed nodes - but they do require the storage node to have strong guarantees about serialization and atomicity of writes. That means it isn’t a distributed storage solution, but it is something you can build over the top of a distributed storage solution that has strong read after write guarantees.


This is unconventional use of the term "distributed locking". This alternative just punts the hard part of locking to the storage system.


I normally see it as a version column in a database where it being with the data makes it non-distributed.

I'm not even sure how it could be used for exclusive update to a resource elsewhere--all clients will think they 'have' the lock and change the resource, then find out they didn't when they update the lock. Or if they bump the lock first, another client could immediately 'have' the lock too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: