You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@curator.apache.org by Benjamin Jaton <bj...@radiantlogic.com> on 2013/07/18 00:35:02 UTC

Watching children changes

Hello,

I would like to be notified of a change on any of the children of a znode
(could be a lot of them).

AFAIK to achieve this we need to set a watcher on each child and then also
watch the parent to be aware of children addition/deletion and add/remove
watchers accordingly. Is that correct?

What is the performance impact of having for example thousands of watchers?

Thanks,
Ben

Re: Watching children changes

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
BTW - You can use PathChildrenCache for this purpose: http://curator.incubator.apache.org/curator-recipes/path-cache.html

On Jul 17, 2013, at 3:46 PM, Benjamin Jaton <bj...@radiantlogic.com> wrote:

> Shoot, yes, I'll move my question to the ZK list.
> 
> 
> On Wed, Jul 17, 2013 at 3:40 PM, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
> > What is the performance impact of having for example thousands of watchers?
> 
> It's an important consideration. This question might be better for the ZK list, BTW. I know that Facebook is working on a general watcher capability - i.e. notify me of everything. But, I don't know what its status is.
> 
> -JZ
> 
> On Jul 17, 2013, at 3:35 PM, Benjamin Jaton <bj...@radiantlogic.com> wrote:
> 
> > Hello,
> >
> > I would like to be notified of a change on any of the children of a znode (could be a lot of them).
> >
> > AFAIK to achieve this we need to set a watcher on each child and then also watch the parent to be aware of children addition/deletion and add/remove watchers accordingly. Is that correct?
> >
> > What is the performance impact of having for example thousands of watchers?
> >
> > Thanks,
> > Ben
> >
> 
> 


Re: Watching children changes

Posted by Benjamin Jaton <bj...@radiantlogic.com>.
Shoot, yes, I'll move my question to the ZK list.


On Wed, Jul 17, 2013 at 3:40 PM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

> > What is the performance impact of having for example thousands of
> watchers?
>
> It's an important consideration. This question might be better for the ZK
> list, BTW. I know that Facebook is working on a general watcher capability
> - i.e. notify me of everything. But, I don't know what its status is.
>
> -JZ
>
> On Jul 17, 2013, at 3:35 PM, Benjamin Jaton <bj...@radiantlogic.com>
> wrote:
>
> > Hello,
> >
> > I would like to be notified of a change on any of the children of a
> znode (could be a lot of them).
> >
> > AFAIK to achieve this we need to set a watcher on each child and then
> also watch the parent to be aware of children addition/deletion and
> add/remove watchers accordingly. Is that correct?
> >
> > What is the performance impact of having for example thousands of
> watchers?
> >
> > Thanks,
> > Ben
> >
>
>

Re: Watching children changes

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
> What is the performance impact of having for example thousands of watchers?

It's an important consideration. This question might be better for the ZK list, BTW. I know that Facebook is working on a general watcher capability - i.e. notify me of everything. But, I don't know what its status is.

-JZ

On Jul 17, 2013, at 3:35 PM, Benjamin Jaton <bj...@radiantlogic.com> wrote:

> Hello,
> 
> I would like to be notified of a change on any of the children of a znode (could be a lot of them).
> 
> AFAIK to achieve this we need to set a watcher on each child and then also watch the parent to be aware of children addition/deletion and add/remove watchers accordingly. Is that correct?
> 
> What is the performance impact of having for example thousands of watchers?
> 
> Thanks,
> Ben
>