> On Aug 17, 2019, at 4:41 PM, Ted Dunning <ted.dunn...@gmail.com> wrote:
> 
> On Sat, Aug 17, 2019 at 4:01 PM Jordan Zimmerman <jor...@jordanzimmerman.com>
> wrote:
> 
>> 
>> 
>> ...
>>> I don't understand that. Watches can be set in a multi.
>> 
>> Not in the public API:
>> https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/Op.java
>> - is it supported in the back-end?
>> 
> 
> Who designed that mess?!?

lol


> 
>> ...>
>>> I don't understand that, either. But this time I just don't understand
>> what you are suggesting and how it helps.
>> 
>> The standard lock recipe creates an ephemeral-sequential node. Once your
>> node (with its sequence number) is returned you call getChildren() to see
>> if you have the lowest numbered node. The lowest numbered node is defined
>> to be the lock holder (or leader, etc.). This requires two round trips.
> 
> 
> Hmm... well looking at the directory in the same operation as the create
> sequential should be easy.

... big snip ...

It seems like the majority of ZK client use cases are a variant of: a) set an 
ephemeral node; b) query the children of the parent; c) watch for some changes; 
d) act and reset. It would be nice if the server provided something more than 
primitives. Of course, we now have Curator to mitigate the difficulty but when 
you need something that Curator doesn't provide you're faced with the 
complexity. 

-JZ

Reply via email to