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" <[email protected]>
Sent: Sunday, February 07, 2010 10:01 AM
To: <[email protected]>
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 <[email protected]> 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" <[email protected]>
Sent: Tuesday, January 26, 2010 1:35 AM
To: <[email protected]>
Subject: Re: Adding domain and node URIs to RuntimeEndpoint?
On Tue, Jan 26, 2010 at 9:19 AM, Simon Laws <[email protected]>
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