[infinispan-dev] RELAY and Infinispan

Bela Ban bban at redhat.com
Tue Feb 1 09:44:40 EST 2011



On 2/1/11 12:15 PM, Manik Surtani wrote:

> My plan re: RELAY was to actually implement a delegating ConsistentHash function where I maintain 2 hash wheels, one for 'lan' and one for 'wan' nodes, and of the numOwners of the key, pick N of them (configurable) to be in a remote datacentre.  It would be transparent to the rest of Infinispan, but you would have to 'configure' Infinispan to be aware of RELAY so that it can use the appropriate consistent hash impl.


OK. My initial thought was that I'd create 2 consistent hash functions. 
Say we configured DefaultConsistentHashFunction, I'd create one for the 
local cluster {A,B,C} and one for the remote cluster {X,Y,Z}.

With numOwners=2, I'd have the first CHF pick 2 nodes out of {A,B,C}, 
and then have the second CHF pick 2 nodes out of {X,Y,Z}. Add the 4 
nodes to a list and return that list as a result of locate().

Your solution is probably better, as you might want to have fewer owners 
in the backup (remote) place...


> Also I'd need to change the RPC dispatcher a bit, to force async comms for remote datacentre nodes, and to de-prioritise them when doing remote GETs.

Yes.

> It's been on my plate for a while now, it just keeps getting overtaken with other stuff.  :-)

I'm going to be looking into this pretty soon, as I need it for my demo 
at JBW.

As a first step, I'm currently looking into running Infinispan in DIST 
mode over {A,B,C,X,Y,Z}, where {X,Y,Z} is the remote cluster. I guess, 
copies of keys are distributed over the entire virtual cluster, although 
this doesn't currently happen. I'll bug you next week about this...

-- 
Bela Ban
Lead JGroups / Clustering Team
JBoss


More information about the infinispan-dev mailing list