Distributed Locking With DynamoDB
ryandotsmith.heroku.com
ryandotsmith.heroku.com
Most of the time, when people talk about a "distributed lock", the emphasis is on the fact that the clients are distributed. You can set up a Redis server, and lots of different hosts can contact it and hit the SETNX message to see if some key is locked.
But then other folks would say, that's not distributed at all - because the redis server everyone's hitting SETNX on is a single point of failure. It's the servers that need to be distributed. That's a harder task, because the servers need to coordinate on whether or not key "X" is truly available or not in an atomic way, and that's the "consensus algorithm" thing that doozerd and I've also heard Zookeeper does, which I can only start to imagine how that works.
Based on the DynamoDB docs at http://docs.amazonwebservices.com/amazondynamodb/latest/deve... it seems like conditional updates work across distributed replicas, though it's only implied.
http://blog.smarx.com/posts/managing-concurrency-in-windows-...
It also has high availability, lease expiration timeouts etc.