Thank you for the response. Yes, I'm aware of the conditions of an eventually consistent system. What I wanted to know was, is there any possibility for the PathChildrenCache to emit CHILD_CREATED like events out of order and what is the possibility of missing such event?
Regards, Imesha Sudasingha On Oct 21, 2016 7:12 PM, "Jordan Zimmerman" <[email protected]> wrote: > PathChildrenCache[1] is the solution you have provided to watch on a given > node without using native zookeeper watchers. > > > PathChildrenCache uses native watchers. Have a look at the source. > > Can anyone please clarify how the above effect can affect the accuracy of > events listened? > > > The point of that message is to remind you that ZooKeeper is an eventually > consistent system. You are always seeing the view that the server you are > connected to has. This is a feature of ZooKeeper, not Curator. > > Hope this helps. > > -Jordan > > On Oct 21, 2016, at 4:44 AM, Imesha Sudasingha <[email protected]> > wrote: > > Hi all, > > I have been using apache zookeeper. Now I'm willing to switch to > CuratorFramework as it contains many useful recipes inbuilt. > > PathChildrenCache[1] is the solution you have provided to watch on a given > node without using native zookeeper watchers. As I went through the API [1] > documentation, the following ambiguous sentence has caused me to think > twice as I want consistency accuracy for my implementation (such as not > missing CHILD_CREATED events). > > "it's not possible to stay transactionally in sync. Users of this class > must be prepared for false-positives and false-negatives. Additionally, > always use the version number when updating data to avoid overwriting > another process' change." > > Can anyone please clarify how the above effect can affect the accuracy of > events listened? And is there a way to w atch on a given node without using > Zookeeper watchers and PathChildrenCache? > > (PathChildrenCache has the functionality I required. But the above > description in the API docs matters me) > > Thanks in advance! > > [1] https://curator.apache.org/apidocs/org/apache/ > curator/framework/recipes/cache/PathChildrenCache.html > > Regards, > Imesha Sudasingha > > -- > *Imesha Sudasingha* > Undergraduate of Department of Computer Science and Engineering, > University of Moratuwa. > +94717086160 > View in Linkedin <https://lk.linkedin.com/in/imeshasudasingha> > > >
