mutexes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mutexes

Kevin Burton-3
I assume the recipe for creating a mutex in ZK would be:
create a nonce
create an ephemeral lock on a named node.
if you succeed on the create you one the lock
if not, add an event to watch for the node being deleted
  attempt to lock.

Kevin

--
Founder/CEO Spinn3r.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com
Reply | Threaded
Open this post in threaded view
|

RE: mutexes

Stu Hood
See http://hadoop.apache.org/zookeeper/docs/r3.0.1/recipes.html#sc_recipes_Locks for the recommended implementation.

-----Original Message-----
From: "Kevin Burton" <[hidden email]>
Sent: Saturday, January 3, 2009 11:13pm
To: [hidden email]
Subject: mutexes

I assume the recipe for creating a mutex in ZK would be:
create a nonce
create an ephemeral lock on a named node.
if you succeed on the create you one the lock
if not, add an event to watch for the node being deleted
  attempt to lock.

Kevin

--
Founder/CEO Spinn3r.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com