Re: getting created child on NodeChildrenChanged event

2010-09-06 Thread Patrick Hunt
It is good to keep things simple, but we have seen some requests related to the client api for children use cases that seem reasonable. In particular the issue of handling large numbers of children efficiently is currently a problem (queue say). We've seen proposals on this before, just no one's f

Re: getting created child on NodeChildrenChanged event

2010-09-03 Thread Mahadev Konar
Hi Todd, We have always tried to lean on the side of keeping things lightweight and the api simple. The only way you would be able to do this is with sequential creates. 1. create nodes like /queueelement-$i where i is a monotonically increasing number. You could use the sequential flag of zook

Re: getting created child on NodeChildrenChanged event

2010-08-31 Thread Todd Nine
Hi Dave, Thanks for the response. I understand your point about missed events during a watch reset period. I may be off, here is the functionality I was thinking. I'm not sure if the ZK internal versioning process could possibly support something like this. 1. A watch is placed on children 2.

Re: getting created child on NodeChildrenChanged event

2010-08-31 Thread Dave Wright
Hi Todd - The general explanation for why Zookeeper doesn't pass the event information w/ the event notification is that an event notification is only triggered once, and thus may indicate multiple events. For example, if you do a GetChildren and set a watch, then multiple children are added at abo

getting created child on NodeChildrenChanged event

2010-08-31 Thread Todd Nine
Hi all, I'm writing a distributed queue monitoring class for our leader node in the cluster. We're queueing messages per input hardware device, this queue is then assigned to a node with the least load in our cluster. To do this, I maintain 2 Persistent Znode with the following format. data qu