curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dtrott <...@git.apache.org>
Subject [GitHub] curator pull request: Curator 94
Date Mon, 10 Mar 2014 16:18:06 GMT
Github user dtrott commented on a diff in the pull request:

    https://github.com/apache/curator/pull/2#discussion_r10436396
  
    --- Diff: curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
---
    @@ -146,7 +146,10 @@ public void close() throws IOException
         @Override
         public void registerService(ServiceInstance<T> service) throws Exception
         {
    -        services.put(service.getId(), service);
    --- End diff --
    
    My thinking here was that a permanent service should extend beyond the scope of the client
used to register it (either directly or via the rest service) - what is the definition of
"permanent" otherwise, therefore details of the service would be lost (not in memory) when
the client was restarted anyway.
    
    To avoid two different modes (registering client verses later client) I decided that no
client should keep a record of it.
    The alternative would have been to have all clients (watch zookeeper and) load permanent
registrations from Zookeeper.
    
    From a design perspective I see this alternative as perfectly reasonable too, its just
its a bunch more work and still represents a change in current functionality.
    
    What are your thoughts?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message