tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Tuscany Docs 2.x > Serialization Deserialization of Endpoints and EndpointReferences
Date Mon, 07 Dec 2009 21:25:00 GMT
Space: Apache Tuscany Docs 2.x (http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x)
Page: Serialization Deserialization of Endpoints and EndpointReferences (http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/Serialization+Deserialization+of+Endpoints+and+EndpointReferences)


Edited by Raymond Feng:
---------------------------------------------------------------------
h1. Serialization Deserialization of Endpoints and EndpointReferences
h2. A sample scenario
!Endpoint and EndpointReference serialization.jpg!

Assuming we have two nodes (Node1, Node2) within an SCA domain. Node1 runs component1 which
is wired to component2 on Node2. 

* Propagate the endpoint descriptions via the domain registry
    ** Serialize the endpoints of component2 at Node2
    ** Deserialize the endpoints at Node1
    ** Bind the endpoint reference of component1 to the remote endpoints of component2

* Pass the ServiceReference from component1 to component2 via business methods
    ** Serialize the endpoint reference (for example, a reference to component3) known to
component1 at Node1
    ** Deserialize the endpoint reference at Node2
    ** Bind the endpoint reference to the context of Node2/Component2

h2. What information should be serialized? 

h3. Endpoint serialization 
What information is needed on the consumer side?
* The protocol-specific endpoint address
* The binding structural URI
* The binding type
* The intents and policySets 

What information is not needed on the consumer side?
* The component implementation behind the endpoint

I'm not sure if the componentType of the owning component or interface contracts are needed.
Interface validation against a remote endpoint can be one only if the interface contract for
the endpoint is resolvable in the context of the consuming component. But it can be too restrictive
as it breaks the promise of decoupling between the SCA reference and service.

The current code serializes the endpoint as a composite/component/service/binding XML.

{code:xml}
<composite name="..." targetNamespace>
  <component name="..." uri="...">
    <implementation.bpel process="..."/> <!-- This should be removed -->
    <service name="..." requires="..." policySets="...">
      <interface.wsdl interface="..."/> <!-- Is the interface needed? -->
      <binding.ws uri="..."  requires="..." policySets="..."/>
    </service>
  </component>
</composite>
{code}


h3. How to resolve the deserialized endpoint in the context of the consuming component?
We keep the XML document from the Java serialization and load the XML into a composite model
to rebuild the endpoint in the context of the consuming component. The currect scheme of XML
serialization probably contains too much information and some of them cannot be practically
resolvable on the client side. For example, the target component implementation or interface
contracts.

h3. EndpointReference serialization 
What information is needed on the consumer side?
* The binding structural URI
* The binding type 
* The intents and policySets 
* The resolved target endpoint (including the endpoint address and/or structural URI)

What information is not needed on the consumer side?
* The component implementation behind the endpoint reference

I'm not sure if the componentType of the owning component or interface contracts are needed.
Interface validation against a remote endpoint can be one only if the interface contract for
the endpoint is resolvable in the context of the consuming component. But it can be too restrictive
as it breaks the promise of decoupling between the SCA reference and service.

The current code serializes the endpoint reference as a composite/component/reference/binding
XML.
{code:xml}
<composite name="endpointReference" targetNamespace="...">
  <component name="..." uri="...">
    <implementation.java class="..."/> <!-- This should be removed -->
    <reference name="..." requires="..." policySets="...">
      <interface.java interface="..."/> <!-- Is the interface needed? -->
      <binding.ws uri="..."  requires="..." policySets="..."/>
    </reference>
  </component>
</composite>
{code}

h3. How to resolve the deserialized endpoint in the context of the consuming component?
We keep the XML document from the Java serialization and load the XML into a composite model
to rebuild the endpoint in the context of the consuming component. The currect scheme of XML
serialization probably contains too much information and some of them cannot be practically
resolvable on the client side. For example, the target component implementation or interface
contracts.


Change your notification preferences: http://cwiki.apache.org/confluence/users/viewnotifications.action
   

Mime
View raw message