Re: [jgroups-dev] First view change and JChannel.connected

Vladimir Blagojevic <[email protected]> Tue, 23 Nov 2010 08:53:52 -0300
Newsgroups gmane.comp.java.javagroups.devel
Message-ID <[email protected]>
On 10-11-23 5:40 AM, Bela Ban wrote:
> Oops, scrap that ! It won't work: if we get messages A2 -->  A3 -->  A4,
> and A3 is the view, then everybody needs to deliver messages 2-4 from A
> in that order. If we now delivered A3 on a separate thread, then that
> ordering could be destroyed !

Yes but only for FLUSH. No such guarantee needed for "regular" stack.
Nonetheless, I agree with you that this is not a good idea :-)

> If an application - when it gets the view in A3 - decides to handle it
> on a separate thread, then it's the app's responsibility and it needs to
> know that A4 could be delivered before the view handling code has
> returned...
>
> OK, so I changed the code below to actually changed a channel to
> 'connected' when it gets a view and is still unconnected. However, I
> also added a note in the documentation [1] to warn about sending
> messages from a callback.
>
> WDYT ?

Yes, unless we figure out a better way, if there is one, this is perfect!

Cheers.

> [1] http://jgroups.org/manual/html/user-channel.html#MembershipListener
>


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Javagroups-development mailing list