Originally the c/java apis "grew up as sibilings" so there wasn't much attempt to make the java very OO friendly. What you are suggesting makes sense, and my personal thought is that if done correctly could "graduate" to main at some point (prolly as a complement to the current api, but lets start with contrib and see where it goes from there).



Aaron Crow wrote:
Hi Patrick,

Thanks! I took a look at zkclient. Since, as you say, it's not very well
documented, I'm not 100% clear on the goals of the project. However, I did
see that ZooKeeper nodes are described with (String)path throughout, so that
tells me that zkclient hasn't adopted the first-class "Node" design I'm
proposing. I think, if the "Node" design was found useful by people AND the
same people found zkclient useful, there would be some integration
possibilities so that the two could work hand-in-hand.

Thanks again for your reply, and thanks in advance for any further guidance
or thoughts...

All the best,

On Tue, Feb 16, 2010 at 11:30 AM, Patrick Hunt <ph...@apache.org> wrote:

This sounds pretty useful as a contrib, ff to submit a patch
http://bit.ly/bgYpW5 . Be sure to include README type details on semantics
of use (I don't see watches so this might be pretty simple).

Also see: http://bit.ly/bhcpwx a few ZK users are using this now afaict.
However last I checked docs were thin and there def. were some issues with
the semantics.



Aaron Crow wrote:

Dear ZooKeepers,

We recently integrated ZooKeeper into our Java project at work. This is a
very cool project... I feel like a kid with a new toy. After using the
API a little, I've begun to create some simple wrappers around the main
ZooKeeper object.

Specifically, I'm creating a simple Node design, that makes it simpler and
more convenient for me to do simple management of my ZooKeeper node state.
Just as a rough idea:

Node node = myZk.getNode(path);
 String data = node.getData();
 Collection<Node> children = node.getChildren();

I was wondering... am I re-inventing the wheel here (did I miss any
API like this)? Or if not, would the community have any interest if I
to add this into the main project?

Many thanks in advance for any insights or guidance...

All the best,

Reply via email to