Josh, i am trying to use the lock recipe for leader election and can share my findings/sample code in sometime. Regarding your query of orphaned locks - these are sequential ephemeral znodes which are automatically removed from ZK once the session breaks i believe.
On Thu, Jan 5, 2012 at 9:39 AM, Josh Stone <[email protected]> wrote: > I have a few use cases that I'm wondering if ZooKeeper would be suitable > for and would appreciate some feedback. > > First use case: Distributing work to a cluster of nodes using consistent > hashing to ensure that messages of some type are consistently handled by > the same node. I haven't been able to find any info about ZooKeeper + > consistent hashing. Is anyone using it for this? A concern here would be > how to redistribute work as nodes come and go from the cluster. > > Second use case: Distributed locking. I noticed that there's a recipe for > this on the ZooKeeper wiki. Is anyone doing this? Any issues? One concern > would be how to handle orphaned locks if a node that obtained a lock goes > down. > > Third use case: Fault tolerance. If we utilized ZooKeeper to distribute > messages to workers, can it be made to handle a node going down by > re-distributing the work to another node (perhaps messages that are not > ack'ed within a timeout are resent)? > > Cheers, > Josh > -- Thanks, - Inder Tech Platforms @Inmobi Linkedin - http://goo.gl/eR4Ub
