curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabrizio Cucci <fabrizio.cu...@gmail.com>
Subject Service Discovery and notifications
Date Fri, 20 Nov 2015 19:58:33 GMT
Hello everyone,

I'm currently working on a Java project that requires some service discovery and service coordination
capabilities and I was thinking about using Curator for those purposes.

One of the main feature I would need is to let one service be notified as soon as another
service becomes available. E.g. the service A starts and at a certain point it requires some
services B. Instead of repeatedly calling the getInstance method of the ServiceProvider abstraction
at regular intervals until the service B becomes available (polling-like policy), it would
be nice to get notified as soon as the services B becomes available (i.e. at least one instance
has been registered).

Is it something feasible using something like the ServiceCacheListener ?
If yes, would it be the best way to go?

And, out of curiosity, what happens if the service B has been registered before the service
A attaches his listener? Does the service A get immediately notified because the service B
is immediately available?

Thanks in advance for your help and suggestions,
Fabrizio
Mime
View raw message