You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Afkham Azeez <af...@gmail.com> on 2012/04/23 14:38:31 UTC

Tribes coordinator

We are using Tribes in Axis2. In a cluster, we want to have leader
election, and one member to be designated as the coordinator. How can this
be achieved using Tribes?

Thanks
Azeez

RE: Tribes coordinator

Posted by "Filip Hanik (mailing lists)" <de...@hanik.com>.
> -----Original Message-----
> From: Afkham Azeez [mailto:afkham@gmail.com]
> Sent: Tuesday, April 24, 2012 2:39 AM
> To: Tomcat Users List
> Subject: Re: Tribes coordinator
> 
> Hi Filip,
> I have integrated the NonBlockingCoordinator & committed to the Axis2
> trunk. One thing I noticed is that even if the current coordinator is
> alive, and a new member joins, it is possible for the new member to be
> made
> the coordinator while the existing coordinator transforms into a normal
> member. Is this the intended behavior? Is it possible to change the
> coordinator only if the existing coordinator fails?
[Filip Hanik] 
It was a while ago I wrote that. Non blocking coordinator means that 
Change of coordination can be happen while other activities take place.

I think the NonBlocking coordinator builds on the absolute order algorithm
for selecting a coordinator.
The absolute order is a stateless ranking system in tribes that let's you
order members with no chat/messages exchanged.
So, the answer to your question would be no, cause if a member joins with a
higher rank, it becomes coordinator.

Now, what you could do is change the criteria for the absolute order stuff,
instead of ranking it based on IP (IIRC) then rank on how long a member has
been alive. This way, the member with the largest uptime will always be
coordinator. Of course, instead of using uptime, use starttime, so you don't
use a value that changes with every membership message

Best
Filip

> 
> Thanks
> Azeez
> 
> On Tue, Apr 24, 2012 at 11:26 AM, Afkham Azeez <af...@gmail.com> wrote:
> 
> > Thanks for the pointers Filip. I will take a look.
> >
> >
> > On Mon, Apr 23, 2012 at 9:12 PM, Filip Hanik Mailing Lists <
> > devlists@hanik.com> wrote:
> >
> >>
> >> http://tomcat.apache.org/tomcat-7.0-
> doc/api/org/apache/catalina/tribes/group/interceptors/package-
> summary.html
> >>
> >> Take a look at SimpleCoordinator and NonBlockingCoordinator
> >>
> >> Equally simple to implement your own based on the requirement you
> have
> >> for leader election.
> >>
> >> It does depend on what you need leader ship for, sometimes, like
> virtual
> >> synchrony, leaders are used to determine atomic delivery of a message
> to an
> >> entire group. Either the entire group gets it, or doesn't.
> >>
> >> Filip
> >>
> >> ----- Original Message -----
> >> > From: "Afkham Azeez" <af...@gmail.com>
> >> > To: "Tomcat Users List" <us...@tomcat.apache.org>
> >> > Sent: Monday, April 23, 2012 6:38:31 AM
> >> > Subject: Tribes coordinator
> >> >
> >> > We are using Tribes in Axis2. In a cluster, we want to have leader
> >> > election, and one member to be designated as the coordinator. How
> can
> >> > this
> >> > be achieved using Tribes?
> >> >
> >> > Thanks
> >> > Azeez
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tribes coordinator

Posted by Afkham Azeez <af...@gmail.com>.
Hi Filip,
I have integrated the NonBlockingCoordinator & committed to the Axis2
trunk. One thing I noticed is that even if the current coordinator is
alive, and a new member joins, it is possible for the new member to be made
the coordinator while the existing coordinator transforms into a normal
member. Is this the intended behavior? Is it possible to change the
coordinator only if the existing coordinator fails?

Thanks
Azeez

On Tue, Apr 24, 2012 at 11:26 AM, Afkham Azeez <af...@gmail.com> wrote:

> Thanks for the pointers Filip. I will take a look.
>
>
> On Mon, Apr 23, 2012 at 9:12 PM, Filip Hanik Mailing Lists <
> devlists@hanik.com> wrote:
>
>>
>> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/tribes/group/interceptors/package-summary.html
>>
>> Take a look at SimpleCoordinator and NonBlockingCoordinator
>>
>> Equally simple to implement your own based on the requirement you have
>> for leader election.
>>
>> It does depend on what you need leader ship for, sometimes, like virtual
>> synchrony, leaders are used to determine atomic delivery of a message to an
>> entire group. Either the entire group gets it, or doesn't.
>>
>> Filip
>>
>> ----- Original Message -----
>> > From: "Afkham Azeez" <af...@gmail.com>
>> > To: "Tomcat Users List" <us...@tomcat.apache.org>
>> > Sent: Monday, April 23, 2012 6:38:31 AM
>> > Subject: Tribes coordinator
>> >
>> > We are using Tribes in Axis2. In a cluster, we want to have leader
>> > election, and one member to be designated as the coordinator. How can
>> > this
>> > be achieved using Tribes?
>> >
>> > Thanks
>> > Azeez
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>

Re: Tribes coordinator

Posted by Afkham Azeez <af...@gmail.com>.
Thanks for the pointers Filip. I will take a look.

On Mon, Apr 23, 2012 at 9:12 PM, Filip Hanik Mailing Lists <
devlists@hanik.com> wrote:

>
> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/tribes/group/interceptors/package-summary.html
>
> Take a look at SimpleCoordinator and NonBlockingCoordinator
>
> Equally simple to implement your own based on the requirement you have for
> leader election.
>
> It does depend on what you need leader ship for, sometimes, like virtual
> synchrony, leaders are used to determine atomic delivery of a message to an
> entire group. Either the entire group gets it, or doesn't.
>
> Filip
>
> ----- Original Message -----
> > From: "Afkham Azeez" <af...@gmail.com>
> > To: "Tomcat Users List" <us...@tomcat.apache.org>
> > Sent: Monday, April 23, 2012 6:38:31 AM
> > Subject: Tribes coordinator
> >
> > We are using Tribes in Axis2. In a cluster, we want to have leader
> > election, and one member to be designated as the coordinator. How can
> > this
> > be achieved using Tribes?
> >
> > Thanks
> > Azeez
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tribes coordinator

Posted by Filip Hanik Mailing Lists <de...@hanik.com>.
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/tribes/group/interceptors/package-summary.html

Take a look at SimpleCoordinator and NonBlockingCoordinator

Equally simple to implement your own based on the requirement you have for leader election.

It does depend on what you need leader ship for, sometimes, like virtual synchrony, leaders are used to determine atomic delivery of a message to an entire group. Either the entire group gets it, or doesn't.

Filip

----- Original Message -----
> From: "Afkham Azeez" <af...@gmail.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Monday, April 23, 2012 6:38:31 AM
> Subject: Tribes coordinator
> 
> We are using Tribes in Axis2. In a cluster, we want to have leader
> election, and one member to be designated as the coordinator. How can
> this
> be achieved using Tribes?
> 
> Thanks
> Azeez
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org