Is there an easy way to always be sure that I have the last state (data and / or children) of a node in Zookeeper using only hours and not polls, given that the node may not exist when I start or can be deleted and recreated? I tried to do this, but it turned out to be quite difficult (in terms of setting many hours and the need to avoid race conditions that could lead to data deletion if a node is created or deleted at the wrong time), I gave up and switched to polling. (Being a few seconds behind is not a problem for my application, but the absence of changes is bad and the absence of all future changes is very bad.)
I use a Java curator that has recipes to make a few things simpler, but this doesn't seem to be one of them.
source
share