You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by ant elder <an...@gmail.com> on 2010/02/07 19:01:40 UTC
Re: Adding domain and node URIs to RuntimeEndpoint?
I've been thinking about this still ( :) ), as it doesn't seem like we
have it quite right yet. Isn't the situation this:
1) non-remotable interface or (remotable interface with
allows-pass-by-reference and source and target are in same classloader
- do local invoke i.e. just Java method call
2) source and target are in same JVM, its not (1) so args must be
pass-by-value,
- either do remote invocation or optimize by doing arg copy and
local invocation
3) source and target are in different JVMs
- do remote invocation
Thats similar to the three below but subtly different, and there's
nothing specifically about Nodes in it.
...ant
On Wed, Jan 27, 2010 at 7:49 AM, Raymond Feng <en...@gmail.com> wrote:
> Hi,
>
> We have three cases here:
>
> 1) The target endpoint is from the same node
> 2) The target endpoint is from a different node that is co-located in the
> same JVM (or Tuscany runtime)
> 3) The target endpoint is from a different node that is on a different
> machine
>
> 1 will be treated as a local invocation while 2 and 3 are remote
> invocations. The binding provider (such as distributed SCA binding provider)
> can choose to optimize 2 too. But what's critical here is we don't have a
> way to tell 2 from 1. Telling 2 from 3 is just a nice-to-have thing. IMO,
> fixing TUSCANY-3441 is much more important. I have volunteered to help that
> by adding Domain/Node URI.
>
> Thanks,
> Raymond
> --------------------------------------------------
> From: "ant elder" <an...@gmail.com>
> Sent: Tuesday, January 26, 2010 1:35 AM
> To: <de...@tuscany.apache.org>
> Subject: Re: Adding domain and node URIs to RuntimeEndpoint?
>
>> On Tue, Jan 26, 2010 at 9:19 AM, Simon Laws <si...@googlemail.com>
>> wrote:
>>>
>>> I think there are two issues here. I've pulled them out into separate
>>> JIRA:
>>>
>>> TUSCANY-3441 - local/remote determination
>>> TUSCANY-3442 - cross classloader messaging
>>>
>>> Regards
>>>
>>> Simon
>>>
>>
>> IMHO, and the reason I asked for more details about this in the first
>> place, is that we should try to minimize just adding stuff we think it
>> might be useful before anything actually uses it. So I think it would
>> be best to do TUSCANY-3442 first and see what it really needs and only
>> then if it really does need to know the Node of an endpoint then do
>> TUSCANY-3441. 3442 is just an optimization without it we can still
>> support everything with the remote SCA bindings.
>>
>> Related to this is TUSCANY-2586 about the pass-by-value copies which
>> could be fixed with the TUSCANY-3442 changes.
>>
>> ...ant
>
>
Re: Adding domain and node URIs to RuntimeEndpoint?
Posted by Raymond Feng <en...@gmail.com>.
Hi,
I moved the slides to a new place for 2.x [1] under presentations. Please
feel free to enhance it.
[1]
http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/Development+Guides
Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws" <si...@googlemail.com>
Sent: Friday, February 12, 2010 8:52 AM
To: <de...@tuscany.apache.org>
Subject: Re: Adding domain and node URIs to RuntimeEndpoint?
> Nice Raymond.
>
> I have a few comments/questions/corrections should I go in and edit
> the charts or would you rather I post text here and you update the
> charts?
>
> Simon
Re: Adding domain and node URIs to RuntimeEndpoint?
Posted by Simon Laws <si...@googlemail.com>.
Nice Raymond.
I have a few comments/questions/corrections should I go in and edit
the charts or would you rather I post text here and you update the
charts?
Simon
Re: Adding domain and node URIs to RuntimeEndpoint?
Posted by Raymond Feng <en...@gmail.com>.
Hi,
I put together a set of slides to illustrate how a sample composite
application can be deployed using Tuscany's domain/node infrastructure. You
can find it at:
http://cwiki.apache.org/confluence/download/attachments/2852380/Tuscany+SCA+Domain+Node.odp
(I merged your first diagram in with some changes).
Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws" <si...@googlemail.com>
Sent: Thursday, February 11, 2010 10:53 AM
To: <de...@tuscany.apache.org>
Subject: Re: Adding domain and node URIs to RuntimeEndpoint?
> I'd like to draw some pictures of the domain in operation using the
> default binding in the 3 cases we have been discussing. I've made a
> start [1] by trying a simple ER diagram for domains/node
> factories/nodes etc. I didn't get much further than that but be useful
> to see at least if people think it represents the code accurately or
> not.
>
> I started to add a diagram about endpoints but if people are motivated
> to extend with more pictures please feel free.
>
> Simon
>
> [1]
> http://cwiki.apache.org/confluence/download/attachments/2852380/TuscanyDomain-2.x-e2e.odg
Re: Adding domain and node URIs to RuntimeEndpoint?
Posted by Simon Laws <si...@googlemail.com>.
I'd like to draw some pictures of the domain in operation using the
default binding in the 3 cases we have been discussing. I've made a
start [1] by trying a simple ER diagram for domains/node
factories/nodes etc. I didn't get much further than that but be useful
to see at least if people think it represents the code accurately or
not.
I started to add a diagram about endpoints but if people are motivated
to extend with more pictures please feel free.
Simon
[1] http://cwiki.apache.org/confluence/download/attachments/2852380/TuscanyDomain-2.x-e2e.odg
Re: Adding domain and node URIs to RuntimeEndpoint?
Posted by Raymond Feng <en...@gmail.com>.
Hi,
Let's start with a simple scenario with two top level components (A and B)
in the SCA domain. A is wired to B.
Now we have different options to deploy A and B to Tuscany depending on the
interface contract between A and B.
1) If the interface is local (pass-by-reference), both A and B has to be
deployed in one single unit (i.e., a Tuscany Node that provides a consistent
classloading space and lifecycle control).
2) If the interface is remotable (pass-by-value or
allows-pass-by-reference), we have various options:
2.1: A and B are running in the same Node
2.2: A and B are running in two nodes from the same Tuscany runtime instance
(i.e. NodeFactory)
2.3: A and B are running in two nodes from two Tuscany runtime instances in
the same JVM (for example, two webapps that packages Tuscany jars)
2.4: A and B are running in two nodes from two Tuscany runtime instances in
two different JVMs on the same machine
2.5: A and B are running in two nodes from two Tuscany runtime instances in
two different JVMs on two different machines
Please note "allows-pass-by-reference" does NOT mean the runtime has to pass
by reference. The setting tells the runtime that the component
implementation doesn't modify the input parameters from the consumer and
doesn't care whether the return value will be modified by the consumer. The
runtime can choose to not copy the data if possible.
For 2.1, 2.2 and 2.3, component A and B are co-located on the same JVM. In
2.1, if allows-pass-by-reference is set, Tuscany can invoke B on behalf of A
directly without copying the data. In 2.2 and 2.3, Tuscany can choose to
optimize the invocation using an in-VM call by copying the data.
For 2.4 and 2.5, we have to make remote invocations between A and B (either
IPC or RPC).
For 2.1 and 2.2, there can be a shared EndpointRegistry for the domain. For
case 2.3, 2.4 and 2.5, each node is connected to an separate instance of
EndpointRegistry.
Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <an...@gmail.com>
Sent: Sunday, February 07, 2010 10:01 AM
To: <de...@tuscany.apache.org>
Subject: Re: Adding domain and node URIs to RuntimeEndpoint?
> I've been thinking about this still ( :) ), as it doesn't seem like we
> have it quite right yet. Isn't the situation this:
>
> 1) non-remotable interface or (remotable interface with
> allows-pass-by-reference and source and target are in same classloader
> - do local invoke i.e. just Java method call
> 2) source and target are in same JVM, its not (1) so args must be
> pass-by-value,
> - either do remote invocation or optimize by doing arg copy and
> local invocation
> 3) source and target are in different JVMs
> - do remote invocation
>
> Thats similar to the three below but subtly different, and there's
> nothing specifically about Nodes in it.
>
> ...ant
>
> On Wed, Jan 27, 2010 at 7:49 AM, Raymond Feng <en...@gmail.com> wrote:
>> Hi,
>>
>> We have three cases here:
>>
>> 1) The target endpoint is from the same node
>> 2) The target endpoint is from a different node that is co-located in the
>> same JVM (or Tuscany runtime)
>> 3) The target endpoint is from a different node that is on a different
>> machine
>>
>> 1 will be treated as a local invocation while 2 and 3 are remote
>> invocations. The binding provider (such as distributed SCA binding
>> provider)
>> can choose to optimize 2 too. But what's critical here is we don't have a
>> way to tell 2 from 1. Telling 2 from 3 is just a nice-to-have thing. IMO,
>> fixing TUSCANY-3441 is much more important. I have volunteered to help
>> that
>> by adding Domain/Node URI.
>>
>> Thanks,
>> Raymond
>> --------------------------------------------------
>> From: "ant elder" <an...@gmail.com>
>> Sent: Tuesday, January 26, 2010 1:35 AM
>> To: <de...@tuscany.apache.org>
>> Subject: Re: Adding domain and node URIs to RuntimeEndpoint?
>>
>>> On Tue, Jan 26, 2010 at 9:19 AM, Simon Laws <si...@googlemail.com>
>>> wrote:
>>>>
>>>> I think there are two issues here. I've pulled them out into separate
>>>> JIRA:
>>>>
>>>> TUSCANY-3441 - local/remote determination
>>>> TUSCANY-3442 - cross classloader messaging
>>>>
>>>> Regards
>>>>
>>>> Simon
>>>>
>>>
>>> IMHO, and the reason I asked for more details about this in the first
>>> place, is that we should try to minimize just adding stuff we think it
>>> might be useful before anything actually uses it. So I think it would
>>> be best to do TUSCANY-3442 first and see what it really needs and only
>>> then if it really does need to know the Node of an endpoint then do
>>> TUSCANY-3441. 3442 is just an optimization without it we can still
>>> support everything with the remote SCA bindings.
>>>
>>> Related to this is TUSCANY-2586 about the pass-by-value copies which
>>> could be fixed with the TUSCANY-3442 changes.
>>>
>>> ...ant
>>
>>