You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Raymond Feng <en...@gmail.com> on 2009/12/10 02:16:32 UTC

[2.x] Tribes static members

Hi,

I made a change [1] based on my understanding of thread [2]. For tribes 
static members to work, the receiver port has to match the port in the 
static member. To make it simple, the fix use the receiver port from the 
GroupChannel as the port for the static members so that we don't have to 
configure the tribes endpoint registry on each machine with a different 
receiver port.

Please give a try to see if it works. I'm don't know which test case to use.

[1] http://svn.apache.org/viewvc?rev=889045&view=rev
[2] http://www.mail-archive.com/users@tomcat.apache.org/msg24873.html

Thanks,
---
Raymond Feng
Apache Tuscany PMC Member: http://tuscany.apache.org
Co-author of Tuscany In Action (A book on Tuscany SCA): 
http://tuscanyinaction.com/
 


Re: [2.x] Tribes static members

Posted by ant elder <an...@apache.org>.
On Thu, Dec 10, 2009 at 5:33 PM, Raymond Feng <en...@gmail.com> wrote:
> Let's take an example, say A is configured to add B as the static member.
> When the tribes-based endpoint registry is started on A, it adds B (hostB,
> portB). When the registry is started on B, we don't customize the receiver
> port and the default one is used. Based on 2, I think the TcpFailureDetector
> tries to contact hostB/portB to decide if B should be added to membership so
> that other nodes can see it. If portB != B's receiver port, B is not added.

Right, but i'm not sure I understand the point you're trying to make?
Are you saying that as the default port is the same at both ends then
its ok for  A to use the value of As default port as its static route
port value as thats going to be the same as B will be using? If so
then i dont think so because the default port is only the initial
value and as more runtimes get started its goes up - 4000, 4001, 4002
etc - using the default might work as an easy default but you still
need to be able to explicitly configure it.

>
> For the case that A connects to B and C, do we only set up a static route on
> A?

Yes that would be the ideal - so multicast will work for a bunch of
nodes local to each other and then a subset of those nodes can have
static routes to other remote nodes and those othere nodes may have
their own local multicast group of nodes and any of those could also
have other remote static route connections, and the result would be
all nodes would see all endpoints.

   ...ant

Re: [2.x] Tribes static members

Posted by Raymond Feng <en...@gmail.com>.
Let's take an example, say A is configured to add B as the static member. 
When the tribes-based endpoint registry is started on A, it adds B (hostB, 
portB). When the registry is started on B, we don't customize the receiver 
port and the default one is used. Based on 2, I think the TcpFailureDetector 
tries to contact hostB/portB to decide if B should be added to membership so 
that other nodes can see it. If portB != B's receiver port, B is not added.

For the case that A connects to B and C, do we only set up a static route on 
A? If A can connect to hostB/portB and hostC/portC, then both B and C should 
be added to the group. B and C should see each other without configuring a 
static route.

I'll play with the test case to see if it helps.

Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <an...@gmail.com>
Sent: Thursday, December 10, 2009 12:37 AM
To: <de...@tuscany.apache.org>
Subject: Re: [2.x] Tribes static members

> On Thu, Dec 10, 2009 at 8:23 AM, ant elder <an...@gmail.com> wrote:
>> On Thu, Dec 10, 2009 at 1:16 AM, Raymond Feng <en...@gmail.com> 
>> wrote:
>>> Hi,
>>>
>>> I made a change [1] based on my understanding of thread [2]. For tribes
>>> static members to work, the receiver port has to match the port in the
>>> static member. To make it simple, the fix use the receiver port from the
>>> GroupChannel as the port for the static members so that we don't have to
>>> configure the tribes endpoint registry on each machine with a different
>>> receiver port.
>>>
>>> Please give a try to see if it works. I'm don't know which test case to 
>>> use.
>>>
>>> [1] http://svn.apache.org/viewvc?rev=889045&view=rev
>>> [2] http://www.mail-archive.com/users@tomcat.apache.org/msg24873.html
>>>
>>> Thanks,
>>> ---
>>> Raymond Feng
>>> Apache Tuscany PMC Member: http://tuscany.apache.org
>>> Co-author of Tuscany In Action (A book on Tuscany SCA):
>>> http://tuscanyinaction.com/
>>>
>>>
>>>
>>
>> That is using the port of the local receiver but isn't it that the
>> static route port has to match the receiver port _of the remote
>> receiver_?
>>
>> We dont have any very good tests yet as the function isnt finished and
>> doesnt work, you can try the MultiRegTestCase to play with it which
>> starts up three registries connected with static routes and multicast
>> disabled, though for now thats more a simple test harness than an
>> automated test so you'd need to customize it for your machine.
>>
>>   ...ant
>>
>
> I meant to also add in that reply...
>
> The static routes do work ATM for a simple two registries setup with a
> single point to point route, the main issue is getting endpoints
> replicated that the registries knows about but doesn't own. So for
> example three registries: A linked to B and B linked to C with a
> static route. In that case C gets Bs endpoints but not A's.
>
>   ...ant 


Re: [2.x] Tribes static members

Posted by ant elder <an...@gmail.com>.
On Thu, Dec 10, 2009 at 8:23 AM, ant elder <an...@gmail.com> wrote:
> On Thu, Dec 10, 2009 at 1:16 AM, Raymond Feng <en...@gmail.com> wrote:
>> Hi,
>>
>> I made a change [1] based on my understanding of thread [2]. For tribes
>> static members to work, the receiver port has to match the port in the
>> static member. To make it simple, the fix use the receiver port from the
>> GroupChannel as the port for the static members so that we don't have to
>> configure the tribes endpoint registry on each machine with a different
>> receiver port.
>>
>> Please give a try to see if it works. I'm don't know which test case to use.
>>
>> [1] http://svn.apache.org/viewvc?rev=889045&view=rev
>> [2] http://www.mail-archive.com/users@tomcat.apache.org/msg24873.html
>>
>> Thanks,
>> ---
>> Raymond Feng
>> Apache Tuscany PMC Member: http://tuscany.apache.org
>> Co-author of Tuscany In Action (A book on Tuscany SCA):
>> http://tuscanyinaction.com/
>>
>>
>>
>
> That is using the port of the local receiver but isn't it that the
> static route port has to match the receiver port _of the remote
> receiver_?
>
> We dont have any very good tests yet as the function isnt finished and
> doesnt work, you can try the MultiRegTestCase to play with it which
> starts up three registries connected with static routes and multicast
> disabled, though for now thats more a simple test harness than an
> automated test so you'd need to customize it for your machine.
>
>   ...ant
>

I meant to also add in that reply...

The static routes do work ATM for a simple two registries setup with a
single point to point route, the main issue is getting endpoints
replicated that the registries knows about but doesn't own. So for
example three registries: A linked to B and B linked to C with a
static route. In that case C gets Bs endpoints but not A's.

   ...ant

Re: [2.x] Tribes static members

Posted by ant elder <an...@gmail.com>.
On Thu, Dec 10, 2009 at 1:16 AM, Raymond Feng <en...@gmail.com> wrote:
> Hi,
>
> I made a change [1] based on my understanding of thread [2]. For tribes
> static members to work, the receiver port has to match the port in the
> static member. To make it simple, the fix use the receiver port from the
> GroupChannel as the port for the static members so that we don't have to
> configure the tribes endpoint registry on each machine with a different
> receiver port.
>
> Please give a try to see if it works. I'm don't know which test case to use.
>
> [1] http://svn.apache.org/viewvc?rev=889045&view=rev
> [2] http://www.mail-archive.com/users@tomcat.apache.org/msg24873.html
>
> Thanks,
> ---
> Raymond Feng
> Apache Tuscany PMC Member: http://tuscany.apache.org
> Co-author of Tuscany In Action (A book on Tuscany SCA):
> http://tuscanyinaction.com/
>
>
>

That is using the port of the local receiver but isn't it that the
static route port has to match the receiver port _of the remote
receiver_?

We dont have any very good tests yet as the function isnt finished and
doesnt work, you can try the MultiRegTestCase to play with it which
starts up three registries connected with static routes and multicast
disabled, though for now thats more a simple test harness than an
automated test so you'd need to customize it for your machine.

   ...ant