The main purpose is to test if the target service endpoint is local (within
the same node) to the reference so that we can optimize the binding.sca. In
the local case, the binding.sca reference invoker will delegate to the
service invocation chain directly.
There are a few ways to test if an endpoint is local:
* A flag in the endpoint: The flag is set to true upon the publication of
the endpoint. If an endpoint is propagated from other nodes in the domain,
the flag is set to false.
* Check against the structural URI of the endpoint to the "fragement" of the
domain composite that is loaded by the node to see if it is local
* A node URI in the endpoint: The URI is set when the endpoint is published
to the registry and it is part of the endpoint description when the endpoint
is serialized for replication.
Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Monday, June 15, 2009 11:10 AM
To: <[email protected]>
Subject: Re: svn commit: r784761 - in
/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly:
EndpointReference.java
builder/impl/ComponentReferenceEndpointReferenceBuilderImpl.java
impl/EndpointReferenceImpl.java
On Mon, Jun 15, 2009 at 5:26 PM, Raymond Feng<[email protected]> wrote:
3) Should we pass the Node URI onto the Endpoint so that we can test if
the
Endpoint is published by the local node?
For the time being i don't think we should as i'd like to keep the
Node out of the Endpoint. Happy to revisit in the future if a good use
case comes up though.
...ant