hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gustavo Niemeyer <gust...@niemeyer.net>
Subject Re: Parent nodes & multi-step transactions
Date Tue, 24 Aug 2010 09:30:27 GMT
> My own opinion is that lots of these structure sorts of problems are solved
> by putting the structure into a single znode.  Atomic creation and update
> come for free at that point and we can even make the node ephemeral which we
> can't really do if there are children.

Sure, it makes sense that using a single znode gets rid of some of the
problems, after all we'd be effectively getting an atomic operation.
It also gets rid of many of the advantages of using ZooKeeper, though.
Independent changes become conflicts, watches fire more frequently
than they should, clients have to parse the whole blob to know what
has changed and filter locally, etc.

> The natural representation is to have the nodes signal that they are
> handling a particular node by creating an ephemeral file under a per shard
> directory.  This is nice because node failures cause automagical update of
> the data.  The dual is also natural ... we can create shard files under node
> directories.  That dual is a serious mistake, however, and it is much better
> to put all the dual information in a single node file that the node itself
> creates.  This allows ephemerality to maintain a correct view for us.

Interesting indeed.

> This doesn't eliminate all desire for transactions, but it gets rid of LOTs
> of them.

Thanks for these ideas.

Gustavo Niemeyer

View raw message