-Re: curator service discovery, search to Select a service intance
Jordan Zimmerman 2013-01-28, 20:15
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.
On Jan 28, 2013, at 12:10 PM, Yasin <[EMAIL PROTECTED]> 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.
> 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.