Randgalt edited a comment on issue #1106: ZOOKEEPER-1416 - Persistent, 
recursive watchers
URL: https://github.com/apache/zookeeper/pull/1106#issuecomment-538983035
 
 
   FYI - I wrote the Curator portions of this new feature as a test. One of 
them is a new path cache that replaces Curator's `TreeCache`, 
`PathChildrenCache` and `NodeCache`. First, the code is _so_ much simpler and 
easier to reason about. This alone will reduce errors and complexity. Also the 
number of ZK calls needed (and overhead for all those watchers) is vastly 
reduced.
   
   I wrote a test to exercise the new cache, include with forced server 
crashes, and it's working perfectly. So, this suggest this new Watcher code is 
good. So, FYI, another data point.
   
   If anyone's interested - here's the code:
   
   - 
[PersistentWatcher.java](https://github.com/apache/curator/blob/persistent-watcher-cache/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/PersistentWatcher.java)
 - keeps a persistent watcher registered past any connection losses
   - 
[CuratorCacheImpl.java](https://github.com/apache/curator/blob/persistent-watcher-cache/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java)
 - a full tree cache - note how simple it is compared to the corresponding 
Curator recipes that have to use old style watchers.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to