Long Duration Activities
WS-BusinessActivity specifies two protocols for long-running transactions. Instead of holding locks on resources until the transaction is committed, the WS-BusinessActivity specification is based on compensating actions. The underlying transaction model is the so-called open nested transaction [Gray & Reuter]. These protocols codify how pairs of loosely coupled services reach agreement that they have ended a joint task. In one protocol, the coordinator explicitly communicates the participants that no more work is being requested on behalf of the joint task. In the second protocol, the participant is the one that notifies the coordinator that the work on behalf of the joint task has been completed. The use of compensatory actions provides a mechanism to finish tentative operations without leaving locks on them. A compensation operation is to be issued if, for whatever reason, the system desires to undo the effects of the finished tentative operation. The use of these protocols has been experimental to date.Both WS-AtomicTransaction and WS-BusinessActivity leverage WS-Coordination to manage collaboration between Web services.
The Three-Leg HandshakeThe three-leg handshake connection establishment and teardown protocol is an example of a coordination protocol that does not require a designated coordinator service. To establish a connection, the sender sends a request to the receiver. This request establishes a session. If accepted, the receiver responds positively to this request with an acknowledgement message. A third message is transmitted by the sender as an acknowledgement to the acknowledgement, verifying that both parties know that the other party has established a session.The teardown protocol is analogous. One of the parties sends the other party a session teardown request. The recipient responds with an acknowledgement of the teardown message. Upon reception of this acknowledgement, the party that originated the tear-down message completes the message exchange by sending an acknowledgement to the acknowledgement. |