The coordinator composition
|
|
WS-Coordination establishes a framework that introduces a generic service based on the coordinator service model. This service controls a composition of three other services that each play a specific part in the management of context data.
|
|
|
The coordinator composition consists of the following services:
|
|
Activation service Responsible for the creation of a new context and for associating this context to a particular activity.
|
|
Registration service Allows participating services to use context information received from the activation service to register for a supported context protocol.
|
|
Protocol-specific services These services represent the protocols supported by the coordinators coordination type. (This is further explained below.)
|
|
Coordinator The controller service of this composition, also known as the coordination service.
|
Coordination types and coordination protocols
|
|
Each coordinator is based on a coordination type, which specifies the nature and underlying logic of an activity for which context information is being managed. Coordination types are specified in separate specifications. The WS-Coordination framework is extensible and can be utilized by different coordination types, including custom variations. However, the two coordination types most commonly associated with WS-Coordination are WS-AtomicTransaction and WS-BusinessActivity. (Concepts relating to these specifications are explained in the Atomic transactions and Business activities sections.)
|
|
Coordination type extensions provide a set of coordination protocols, which represent unique variations of coordination types, and consist of a collection of specific behaviors and rules. A protocol is best viewed as a set of rules that are imposed on activities and which all registered participants must follow.
|
Coordination contexts and coordination participants
|
|
A context created by the activation service is referred as a coordination context. It contains a collection of information that represents the activity and various supplementary data.
|
|
Examples of the type of data held within a coordination context include:
|
|
a unique identifier that represents the activity
|
|
an expiration value
|
|
coordination type information
|
|
A service that wants to take part in an activity managed by WS-Coordination must request the coordination context from the activation service. It can then use this context information to register for one or more coordination protocols. A service that has received a context and has completed registration is considered a participant in the coordinated activity.
|
The activation and registration process
|
|
The coordination service composition is instantiated when an application service contacts the activation service. Via a CreateCoordinationContext request message, it asks the activation service to generate a set of new context data. Once passed back with the ReturnContext message, the application service can now invite other services to participate in the coordination. This invitation consists of the context information the application service originally received from the activation service.
|
|
Any Web service in possession of this context information may issue a registration request to the registration service. This allows the service to enlist in a coordination based on a specific protocol. (Protocols are provided by separate specifications, and are discussed later in this chapter as part of the atomic transaction and business activity sections.) Upon a successful registration, a service is officially a participant. The registration service passes the service the location of the coordinator service, with which all participants are required to interact. At this time, the coordination service is also sent the address of the new participant.
|
|
The completion process
|
|
The application service can request that a coordination be completed by issuing a completion request message to the coordination service. The coordinator, in turn, then issues its own completion request messages to all coordination participants. Each participant service responds with a completion acknowledgement message.
|
|
|
To learn more about the WS-AtomicTransaction and WS-BusinessActivity specifications that provide protocols for WS-Coordination, visit the WS-Standards.com home page and locate the corresponding papers.
|