View Source

Es-Synchronizer contains a set modules able to synchronize resources between two framework. This kind of synchronization is used between [EasierGOV|easiergov:EasierGov - SOA Governance Tool], [EasyESB|easyesb:EASYESB - Open source Lightweight Services Bus]/[PEtALS DSB|petalsdsb:PetalsDSB Overview] and [EasierBSM|easierbsm:EasierBSM - Open source Business Service Monitoring and SLA enforcement].

Es-Synchronizer API provides some ways to synchronize frameworks/platforms together. The initial goal of this API is to be able to get existing resources (i.e. mainly endpoints) and to be notified when resources appears and disappears (with the help of WS Notification implementation). Implementation can be summarized as:

# The ESB ([EasyESB |easyesb:EASYESB - Open source Lightweight Services Bus] or [PEtALS DSB |petalsdsb:PetalsDSB Overview]) exposes the resource API on http://localhost:8280/services/resourcesExternalEndpoint for [EasyESB |easyesb:EASYESB - Open source Lightweight Services Bus] or on http://localhost:7600/petals/ws/ExecutionEnvironmentManager for [PEtALSDSB |petalsdsb:PetalsDSB Overview] (change host and port if needed...)
# The ESB must provide a topic for resources. This topic is defined with NS = http://www.petalslink.org/resources/event/1.0 and LocalPart = _CreationResourcesTopic_.

Interested parties have to subscribe to this topic using WS-Notification to be notified when new resources appear or disappear (More details on WS-Notification support is given in the [WSN support section|petalsdsb:Notification Support]). Once the subscription is effective, the subscriber will receive WS-N Notify message which contains the ID and type of the resources.

A sample of SOAP notification message emitted by the ESB when a new endpoint is created is:
{code:language=xml}
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://localhost:9000/services/RawService</wsa:To>
<wsa:MessageID>urn:uuid:032A882656974EC2521317824402158</wsa:MessageID>
<wsa:Action>urn:NotifyResponse</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<wsnt:Notify xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
<wsnt:NotificationMessage>
<wsnt:SubscriptionReference>
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:9000/services/RawService</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing" />
</wsnt:SubscriptionReference>
<wsnt:Topic xmlns:tns="http://www.petalslink.org/resources/event/1.0" Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete">tns:CreationResourcesTopic</wsnt:Topic>
<wsnt:ProducerReference>
<wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">_*EasyESB or PEtALSDSB address*_</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing" />
</wsnt:ProducerReference>
<wsnt:Message>
<resourceIdentifier:resourceIdentifier xmlns:resourceIdentifier="http://www.petalslink.com/easyresources/execution-environment-connection-model" xmlns="http://www.petalslink.com/easyresources/execution-environment-connection-model">
<id>{http://www.petalslink.org/endpoint/HelloWorld}HelloWorldServicePort</id>
<resourceType>endpoint</resourceType>
</resourceIdentifier:resourceIdentifier>
</wsnt:Message>
</wsnt:NotificationMessage>
</wsnt:Notify>
</soapenv:Body>
</soapenv:Envelope>
{code}

In this snippet, the notification is sent to [http://localhost:9000/services/RawService] and the resource ID is
\{http://www.petalslink.org/endpoint/HelloWorld}HelloWorldServicePort of type _endpoint_.