[infinispan-dev] hotrod client - initial connection

Galder Zamarreno galder at redhat.com
Wed Mar 10 11:31:19 EST 2010


On Wed, 10 Mar 2010 17:24:58 +0100, Mircea Markus  
<mircea.markus at jboss.com> wrote:

>
> On 10 Mar 2010, at 18:21, Galder Zamarreno wrote:
>
>> On Wed, 10 Mar 2010 14:08:23 +0100, Mircea Markus
>> <mircea.markus at jboss.com> 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
>>
>> The idea was that rather than querying for the cluster topology, the
>> client would register for notification it's interested in. From the  
>> wiki:
>>
>> "Before any the server can send any notifications, clients need to
>> register and indicate which events they're interested in. To do that,  
>> they
>> have to send a request like this:
>>
>> [request header][events]"
>>
>> So, if a client was interested in topology change notifications, it  
>> would
>> tell the server accordingly.
> Isn't the event handling optional? if so, some clients (ones that do not  
> implement event handling) would not be able to get the view?

Indeed it is optional but I'm assuming here that only if you care about  
the cluster view, you not only care once. IOW, if u want the cluster view,  
you're wanna be wanting to do some load balancing or failover and bearing  
that in mind, would it only make sense that you get the view when you  
joined but not the view changes afterwards? I have doubts about such use  
case...

>>
>>>             3. a a response to this query, the server informs the
>>> client about hotrod cluster topology (which might be different than
>>> infinispan cluster, right?)
>>
>> Although not specified in the wiki, I would assume that once you  
>> register
>> with the server, the server would push the current topology, no need for
>> further requests from client.
>>
>>>             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?)
>>
>> You'd still need a listener like the one you mention based on the
>> information received from the server(s).
>>
>>> How does this sound to you?
>>> </snip>
>>>
>>> Cheers,
>>> Mircea
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> infinispan-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>>
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>


-- 
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list