Database Reference
In-Depth Information
/ducks/n_0000000009
/ducks/n_0000000009 leader? true
Waiting for a change in the lock.
dewey: I am becoming the leader.
dewey: I'm leader and handling a work element
/ducks/n_0000000009 is the leader.
dewey: I'm leader and handling a work element
/ducks/n_0000000009 is the leader.
dewey: I'm about to fail!
/ducks/n_0000000010 should become leader. I am
/ducks/n_0000000010
/ducks/n_0000000010 leader? true
huey: I am becoming the leader.
huey: I'm leader and handling a work element
/ducks/n_0000000010 is the leader.
huey: I'm leader and handling a work element
/ducks/n_0000000010 is the leader.
huey: I'm about to fail!
There are optimizations of this process that result in fewer messages
being sent. In particular, the server awaiting leadership only really
needs to watch the next smallest node in the last, not the entire set.
When that node is deleted, the check to find the smallest node is
repeated.
The Curator Client
The popular Curator client is a wrapper around the native ZooKeeper Java
API. It is commonly used in lieu of directly using the ZooKeeper API as
it handles some of the more complicated corner cases associated with
ZooKeeper. In particular, it addresses the complicated issues around
managing connections in the ZooKeeper client.
The Curator client was originally developed by Netflix, but has since been
contributed to the Apache Foundation where it entered the incubation
process in March 2013 ( http://curator.apache.org ).
Search WWH ::




Custom Search