zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <jor...@jordanzimmerman.com>
Subject Re: curator service discovery, search to Select a service intance
Date Mon, 28 Jan 2013 20:15:33 GMT
FYI - Curator has its own mailing list/group: http://groups.google.com/group/curator-users

What you want should be easy to do. Curator-Discovery supports custom ProviderStrategy-s.
Just write one that does what you describe. The instance id is available from ServiceInstance.getId()
or you can store an index in the ServiceInstance's payload.

-Jordan

On Jan 28, 2013, at 12:10 PM, Yasin <yasincelik27@gmail.com> wrote:

> Hello everyone,
> 
> I am looking into curator service discovery API to implement a service that
> meets some requirements. I know there are three strategies to retrieve a
> service instance: Round-robin, Random, and Sticky. I want something
> different than these strategies. 
> 
> Suppose I have 3 service instance with id of 3, 5, 8. Client does not have
> any information about these ids. When client request an instance with id of
> 5 "getNewInstance(5)", the service should return the instance whose id is 5.
> This is OK since we have it in our repository. However, when client issues
> "getNewInstance(6)", the service provider should return the instance whose
> id is 8, not an error. I mean the service provider should return the
> instance whose is the next smallest one in the repository. I do not know if
> this is possible with the current strategies. 
> 
> Any help/comment is appreciated. 
> 
> best
> Yasin
> 
> 
> 
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/curator-service-discovery-search-to-Select-a-service-intance-tp7578447.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.


Mime
View raw message