[infinispan-dev] New events to reflect topology change Was: https://issues.jboss.org/browse/ISPN-977

Manik Surtani msurtani at redhat.com
Tue May 17 12:58:33 EDT 2011


ViewChanged just means a change in membership has been detected. Not all nodes may be involved in a corresponding rehash. 

I agree about using the isPre flag. It isn't the prettiest but at least it's consistent. 

Anyway I have pushed a patch for this, please have a look and comment. 

Sent from my mobile phone

On 16 May 2011, at 18:33, Sanne Grinovero <sanne.grinovero at gmail.com> wrote:

> Are @ViewChanged and @RehashStarted different?
> If they are, are they different in any way useful to applications or
> our own modules?
> 
> For consistency we could also consider the "Event.isPre() " to return
> before/after reashing - tough I don't feel inclined to like this
> proposal myself.
> 
> Sanne
> 
> 2011/5/16 Mircea Markus <mircea.markus at jboss.com>:
>> 
>> On 13 May 2011, at 10:28, Manik Surtani wrote:
>> 
>>> So this is related to ISPN-360 which is currently titled "create NodeJoinedEvent".
>>> 
>>> Leaving names out for now, essentially, what we need is a notification to inform listeners that (a) a JGroups ViewChange has been detected (b) a rehash has started and (c) a rehash has completed.  Possibly, being more fine-grained, that (d) a new ConsistentHash view has been installed.  Does this cover it all?  If so, how about:
>>> 
>>> @ViewChanged (same as we have now)
>>> @RehashStarted
>>> @RehashComplete
>>> @TopologyChanged // to reflect a new CH?
>>> 
>>> Thoughts?
>> Sounds good to me.
>>> 
>>> Cheers
>>> Manik
>>> 
>>> 
>>> 
>>> On 11 May 2011, at 13:29, Sanne Grinovero wrote:
>>> 
>>>> First thing I thought when reading your email was "OMG do we support
>>>> on-the-fly hash implementation changes? crazy!"
>>>> 
>>>> That's obviously not the case, but if you name it as
>>>> @ConsistenHashChangeListene that's what I would think.
>>>> 
>>>> Wouldn't it be better to change the exact timing of the viewchange
>>>> event? I don't see why Infinispan users might be more interested in
>>>> knowing about the topology details according to the transport than
>>>> what they are about the actual Infinispan hashing topology - I would
>>>> expect that when I receive which notification the new view is already
>>>> installed and ready to go; actually I thought that was the case since
>>>> ever.
>>>> 
>>>> What would be the use cases to get the notification *before* the new
>>>> hash is installed?
>>>> 
>>>> Cheers,
>>>> Sanne
>>>> 
>>>> 2011/5/11 Mircea Markus <mircea.markus at jboss.com>:
>>>>> Hi,
>>>>> The basic problem behind this is that I need to be notified when a new
>>>>> consistent hash is installed.
>>>>> 
>>>>> ATM there isn't any support (of which I know)  for  a
>>>>> "@ConsistenHashChangeListener".
>>>>> 
>>>>> I'm thinking to add such notifications either:
>>>>> a) internally: Observer pattern on DistributionManager or even on
>>>>> DistributionManagerImpl
>>>>> b) more generically, as a fully flagged listener.
>>>>> 
>>>>> I favor a) and then if more people ask for it we will expose it as a fully
>>>>> flagged listener.
>>>>> 
>>>>> Suggestions?
>>>>> 
>>>>> Cheers,
>>>>> Mircea
>>>>> 
>>>>> _______________________________________________
>>>>> infinispan-dev mailing list
>>>>> infinispan-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>> 
>>>> 
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> infinispan-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>> 
>>> --
>>> Manik Surtani
>>> manik at jboss.org
>>> twitter.com/maniksurtani
>>> 
>>> Lead, Infinispan
>>> http://www.infinispan.org
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> infinispan-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>> 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev



More information about the infinispan-dev mailing list