I am not sure that the full Paxos algorithm is applicable to zookeeper.
Much more important internally is the ability to nominate a single cluster
leader which is simpler than Paxos.  Once there is a cluster leader, then
all updates go through that single host which, in turn, makes any client
based algorithms vastly simpler.

For instance, naive configuration nomination in zookeeper consists of
proposers writing their proposed values to a well known ephemeral file with
a watch placed on that file.  If the file exists before the proposal, the
proposer knows they have lost the race.  IF the file does not exist, then it
will be created (atomically) and they will know they have won the proposal.
Readers can read the file at any time and will know if any proposal has been
accepted.  Moreover, proposers will be notified via their watch if the any
accepted proposer loses their connection which will cause another proposer
to propose a value.  This suffers from the horde effect, but there is a more
nuanced solution on the wiki that does not.

This is vastly simpler than the Paxos algorithm, of course, due to the
availability of atomic create, ephemeral files and other capabilities of
zookeeper.

Have you looked at the examples section of the wiki?

On Thu, May 29, 2008 at 6:22 PM, Chen Zhuan <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I was wondering whether ZooKeeper includes Paxos in its code. Can you tell
> me which part of the code is about the Paxos? Maybe ZooKeeper may provide a
> good chance for people to see how to implement Paxos correctly and
> efficiently.
> Thank you.
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Zookeeper-user mailing list
> Zookeeper-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/zookeeper-user
>
>


-- 
ted
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Zookeeper-user mailing list
Zookeeper-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zookeeper-user

Reply via email to