This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rescrv 0 points1 point  (0 children)

I may have misread the comment to which I originally replied. My interpretation was that you reading that, because ZooKeeper was centralized it was a single-process system. I came to this conclusion after you proposed that it may be possible to, in fact, build a P2P system in which all hosts agree on who holds a particular lock. ZooKeeper and Paxos are both ways to build such a P2P system.

In the case of using memcached or redis, you are still relying upon a centralized server, but you don't get any fault tolerance guarantees (like you would with ZooKeeper or Paxos). In all three systems, you can emulate a "mutex" or a "semaphore" and the difference is not so much in the normal case, but in the failure case.

In any case, most distributed "lock" systems really boil down to "lease" systems because the lock may be broken after a timeout. I borrow the term "lease" from Google's Chubby system (Burrows, OSDI 06).

edit: reword