Hi Aaron, This looks like more of a File API of java :). I think it would be useful. It does seem useful for some kind of group membership using ZooKeeper. You just need to be a little careful about handling watches and ephemeral nodes with such design. How do you plan to handle it?
Thanks mahadev On 2/13/10 12:50 PM, "Aaron Crow" <dirtyvagab...@yahoo.com> 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 Java > 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); > if(node.exists()){ > String data = node.getData(); > Collection<Node> children = node.getChildren(); > node.delete(); > } > > I was wondering... am I re-inventing the wheel here (did I miss any existing > API like this)? Or if not, would the community have any interest if I wanted > to add this into the main project? > > Many thanks in advance for any insights or guidance... > > > All the best, > Aaron