[infinispan-dev] hotrod client - initial connection

Manik Surtani manik at jboss.org
Wed Mar 10 08:47:29 EST 2010


On 10 Mar 2010, at 13:08, Mircea Markus wrote:

> 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 

The last one is the correct approach.  The second one could be implemented as an option, but probably later on if there is sufficient demand.  The first approach is definitely a no-go - much too complex if the server needs to maintain open connections to each and every client.

Cheers
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org








More information about the infinispan-dev mailing list