[infinispan-dev] hotrod client - initial connection

Mircea Markus mircea.markus at jboss.com
Wed Mar 10 08:08:23 EST 2010


Hi Galder,

Here are some thoughts I have about how the hotrod client performs initial connection to the HR servers:
A list of servers is statically configured so that the client can connect to any of them
             1. client will ping each configured server until it finds one that is up and running
             2. at this point it will stop(i.e. not query other statically configured servers) and query this server for the cluster topology
             3. a a response to this query, the server informs the client about hotrod cluster topology (which might be different than infinispan cluster, right?)  
             4. based on this information client builds a pool of connections to the servers
             5. client register itself as cluster formation listener, and update the list of active servers whenever the topology changes
(cluster formation might not be the best name for this listener as it only refers to the time when cluster is formed, what about cluster topology listener?)
How does this sound to you? 
Also, a question about the way in which the server notifies the client on topology changes: how is this going to be performed network-wise? Some of the approaches I see are:
- serv socket opened on the client, server connects to it. Advantage: immediate notification on change. Disadvantage: network security issues, firewall. (also very uncommon for clients to do that, afaik)
- A thread on the client constantly pings the server and the new topology (if any is piggybacked). This would increase the latency, but will solve the firewall issues
- on each request, we piggyback this info, if needed 

Please let me know your thoughts,

Cheers,
Mircea
 
          
            
            



More information about the infinispan-dev mailing list