12.07.2015 Views

Implementing Web Service Protocols in SOA: WS-Coordination and ...

Implementing Web Service Protocols in SOA: WS-Coordination and ...

Implementing Web Service Protocols in SOA: WS-Coordination and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Implement<strong>in</strong>g</strong> <strong>Web</strong> <strong>Service</strong> <strong>Protocols</strong> <strong>in</strong> <strong>SOA</strong>: <strong>WS</strong>-Coord<strong>in</strong>ation <strong>and</strong><strong>WS</strong>-Bus<strong>in</strong>essActivityFriedrich H. VogtHamburg University of TechnologyBoris GruschkoHamburg University of TechnologySimon ZambrovskiHamburg University of TechnologyPeter FurnissChoreology Ltd.Alastair GreenChoreology Ltd.Abstract<strong>Web</strong> <strong>Service</strong> protocol st<strong>and</strong>ards should be unambiguous<strong>and</strong> provide a complete description of the allowed behaviorof the protocols’ participants. Implementation of suchprotocols is an error-prone process, firstly because of thelack of precision <strong>and</strong> completeness of the st<strong>and</strong>ards, <strong>and</strong>secondly because of erroneous transformation of semanticsfrom the specification to the f<strong>in</strong>al implementation. Apply<strong>in</strong>gthe TLA+ paradigm we first consider the protocol onan abstract level. Safety properties taken from real worldscenarios are compared to the facilities of the protocol. Asresult, we identified some limitation of applicability of the<strong>WS</strong>-BA protocol to abstract application use cases, modelledfrom the real world scenarios. These limitations are anomission of possible activities seen <strong>in</strong> the real world. Further,<strong>WS</strong>-C <strong>and</strong> <strong>WS</strong>-BA make assumptions about the <strong>in</strong>ternalstructures of the participants, violat<strong>in</strong>g <strong>SOA</strong> paradigm.The former error could be detected by the use of formalmethods. The latter can be circumvented by a sophisticatedimplementation strategy. The proposed strategy of implement<strong>in</strong>g<strong>WS</strong>-Coord<strong>in</strong>ation <strong>and</strong> <strong>WS</strong>-Bus<strong>in</strong>essActivity allowsnon-<strong>in</strong>trusive <strong>in</strong>tegration of the transactional framework,consider<strong>in</strong>g <strong>SOA</strong> requirements. This paper describes theresults of analysis <strong>and</strong> some design decisions taken dur<strong>in</strong>gthe proof-of-concept implementation of <strong>WS</strong>-C <strong>and</strong> <strong>WS</strong>-BAframeworks.1 Introduction<strong>SOA</strong>P[6] based <strong>Web</strong> <strong>Service</strong>s are seen as a solutionfor some <strong>in</strong>teroperability problems of heterogenous distributedsystems. This fact leads to rapid developmentof large number of protocols us<strong>in</strong>g <strong>SOA</strong>P conventions formessage exchange. Transaction support is an importantproperty of distributed systems. In the area of transactional<strong>Web</strong> <strong>Service</strong>s, several protocols or groups of protocolshave been proposed. One such set consists of the threeprotocols <strong>WS</strong>-Coord<strong>in</strong>ation[2], def<strong>in</strong><strong>in</strong>g an extensible coord<strong>in</strong>ationframework, <strong>WS</strong>-AtomicTransactions[3], leverag<strong>in</strong>g<strong>WS</strong>-Coord<strong>in</strong>ation(<strong>WS</strong>-C) for use with systems awareof ACID properties <strong>and</strong> f<strong>in</strong>ally, <strong>WS</strong>-Bus<strong>in</strong>essActivities [4],designed for support of long-lived activities. The <strong>WS</strong>-Cframework can be used with different coord<strong>in</strong>ation protocols,<strong>in</strong>clud<strong>in</strong>g the <strong>WS</strong>-AT <strong>and</strong> <strong>WS</strong>-BA specifications.In this paper we describe our experience with implement<strong>in</strong>g<strong>WS</strong>-C <strong>and</strong> <strong>WS</strong>-BA specifications <strong>and</strong> focus onguard<strong>in</strong>g correctness of implementation. For this purposewe show how formal methods can help implement<strong>in</strong>g safesystems. We also describe the decisions made dur<strong>in</strong>g thedesign of proof-of-concept implementation <strong>and</strong> strategiesadopted to deal with areas not precisely def<strong>in</strong>ed <strong>in</strong> specifications.2 General approachWe separate the development process <strong>in</strong> four phases: thedef<strong>in</strong>ition, the formal specification, the implementation <strong>and</strong>the validation.First we choose the protocol stack accord<strong>in</strong>g the applicationrequirement. This requirement is stated <strong>in</strong> safetyproperties. Second we analyse given specifications. Ambiguityor lack of <strong>in</strong>formation found <strong>in</strong> specifications underm<strong>in</strong>esthe confidence level. To give a firm discussionbase we use abstract models of the protocol behaviour.Those models are result of the specification phase. In caseof <strong>WS</strong>-Bus<strong>in</strong>essActivity <strong>and</strong> <strong>WS</strong>-Coord<strong>in</strong>ation the protocolstate tables are not clear enough to serve as implementationmodel. Formal specifications are used to clarify issues <strong>in</strong>question. Us<strong>in</strong>g TLA+[10] we can check the consistency ofsuch abstract models. This approach was <strong>in</strong>spired by formalmodell<strong>in</strong>g of <strong>WS</strong>-AtomicTransactions protocol described<strong>in</strong>[8]. Given the possibility to map the state transitions toexchanged messages, the generation of state graph of thesystem provides us with all possible sequences of messages1


generated dur<strong>in</strong>g an exchange. Because <strong>WS</strong>-BA only def<strong>in</strong>esthe behavior <strong>and</strong> message exchange of coord<strong>in</strong>ationprotocols we are only <strong>in</strong>terested <strong>in</strong> those messages.For the implementation of the protocol we found the formalspecification is a prerequisit for reach<strong>in</strong>g the requiredlevel of confidence. In addition, it is more natural for thedeveloper to h<strong>and</strong>le the abstractions of TLA+ specificationsthan state transition tables. In [9] the consruction of a TLA+specification for the <strong>WS</strong>-BA protocol is described as effortless,for an expert <strong>in</strong> the field of formal specifications.The time needed to construct the specification that checkedsafety properties, has been reported to be <strong>in</strong> the range of twohours.To f<strong>in</strong>ally check the behavior of the result<strong>in</strong>g implementationwe can use the validation approach proposed <strong>in</strong> [12]check<strong>in</strong>g the message traces. To simplify the properties oftraces to be checked the TLA+ specification can be used asan abstract <strong>in</strong>put.In follow<strong>in</strong>g we give a short specification overview thendiscuss the ambiguities <strong>and</strong> areas of omission <strong>in</strong> the models,describe our proposals <strong>and</strong> f<strong>in</strong>ish the paper with validationapproach followed by a conclusion.3 Def<strong>in</strong>itionsThe <strong>WS</strong>-Coord<strong>in</strong>ation specification describes three rolesfor the communicat<strong>in</strong>g parties. The overview of the def<strong>in</strong>edsystem model can be depicted from Fig. 1. An Initiatorrole is played by the entity aim<strong>in</strong>g for a consensusamong multiple <strong>Web</strong> <strong>Service</strong>s. The Participant roleis played by an entity offer<strong>in</strong>g some service that needsto be coord<strong>in</strong>ated dur<strong>in</strong>g the <strong>in</strong>teraction. The Coord<strong>in</strong>atorrole is played by an entity coord<strong>in</strong>at<strong>in</strong>g the communicat<strong>in</strong>gparties to achieve the consensus. The specificationalso <strong>in</strong>troduces the message exchange needed forthe Activation <strong>and</strong> Registration of the participants. In theActivation phase, the Coord<strong>in</strong>ationContext is acquiredfrom the Coord<strong>in</strong>ator’s Activation <strong>Service</strong>. TheCoord<strong>in</strong>ationContext, a logical abstraction identify<strong>in</strong>gthe <strong>in</strong>teraction is also def<strong>in</strong>ed <strong>in</strong> <strong>WS</strong>-C. It is attached tobus<strong>in</strong>ess messages be<strong>in</strong>g exchanged between the communicat<strong>in</strong>gparties, embedded <strong>in</strong> a <strong>SOA</strong>P header. In the Registrationphase, the participant <strong>Web</strong> <strong>Service</strong> signals its <strong>in</strong>tereston the mutual outcome of the coord<strong>in</strong>ated <strong>in</strong>teraction. Dur<strong>in</strong>gthis phase the coord<strong>in</strong>ation protocol is negotiated <strong>and</strong>endpo<strong>in</strong>t addresses of Coord<strong>in</strong>ator’s <strong>and</strong> Participant’s protocolservices are exchanged, form<strong>in</strong>g a logical connectionbetween Coord<strong>in</strong>ator <strong>and</strong> Participant. The message flowover this logical connection depends on the coord<strong>in</strong>ationprotocol be<strong>in</strong>g used <strong>and</strong> is not part of <strong>WS</strong>-C specification.The <strong>WS</strong>-Bus<strong>in</strong>essActivity specification def<strong>in</strong>es two coord<strong>in</strong>ationprotocols. These are the Bus<strong>in</strong>ess Activity WithCoord<strong>in</strong>ator Completion (BACC) as shown <strong>in</strong> Fig. 2 <strong>and</strong>Bus<strong>in</strong>ess Activity With Participant Completion (BAPC).BACC <strong>and</strong> BAPC are two-phase protocols, but differ fromclassic 2PC protocol [1] <strong>in</strong> the follow<strong>in</strong>g manner. The firstphase is used for exchange of bus<strong>in</strong>ess messages betweenthe parties. In case of BAPC, the end of the first phaseoccurs when the Completed message is sent from Participantto Coord<strong>in</strong>ator, <strong>in</strong>dicat<strong>in</strong>g that the Participant hascompleted process<strong>in</strong>g <strong>and</strong> stored all data persistently. Thesecond phase is used for confirmation or negation of resultsachieved dur<strong>in</strong>g the first phase.The BAPC is designed for activities <strong>in</strong> which the decisionabout transition from the first to the second phase canbe made by the Participant. The BACC is designed for activities<strong>in</strong> which this decision is made by Coord<strong>in</strong>ator.4 Specification AnalysisThe work on the proof-of-concept <strong>WS</strong>-BA implementationwas preceded by the read<strong>in</strong>g <strong>and</strong> discussion of thespecification itself. In this section we provide our <strong>in</strong>sights<strong>and</strong> comments produced dur<strong>in</strong>g the <strong>in</strong>ternal discussion ofthe specification useful for the underst<strong>and</strong><strong>in</strong>g of the writtenApp1(Initiator)Activation<strong>Service</strong>Registration<strong>Service</strong>Coord<strong>in</strong>atorcreateCoord<strong>in</strong>ationContext()register()App2(<strong>Web</strong> <strong>Service</strong>)ParticipantFigure 1. System overview (Specification)Figure 2. BACC2


specification by a team about to implement it.4.1 Application modelsConcern<strong>in</strong>g on formal analysis of the <strong>WS</strong>-C <strong>and</strong> <strong>WS</strong>-BAspecifications us<strong>in</strong>g TLA+ paradigm led to review of applicabilityof the protocols to the bus<strong>in</strong>ess scenarios takenfrom the real world. We came to a conclusion that <strong>WS</strong>-BA can only support ”do-compensate”[7] behavior patternsfor the Participants. In the ”do-compensate” model the confirmedstate is identical to the provisional state. In other patternssuch as ”provisional-f<strong>in</strong>al” <strong>and</strong> ”validate-do” behaviorpatterns[7], the participant establishes a (provisional) ”complete”state of the application data that will be changed tothe confirmed state if <strong>and</strong> when the Close message is received.The fact that <strong>in</strong> <strong>WS</strong>-BA the Clos<strong>in</strong>g state has nostate transition to the Fault<strong>in</strong>g state means that no actionon data can be performed while the system is <strong>in</strong> thatstate. <strong>WS</strong>-BA permits a transition to the Fault<strong>in</strong>g statefrom the Compensat<strong>in</strong>g state s<strong>in</strong>ce it recognises that anychange of application state can sometimes turn out to beimpossible. Support<strong>in</strong>g the other patterns by add<strong>in</strong>g theClos<strong>in</strong>g to Fault<strong>in</strong>g state transition would result <strong>in</strong> awider applicability of <strong>WS</strong>-BA to natural scenarios, especiallythose where the release of application data <strong>in</strong> its f<strong>in</strong>alstate will have wider consequences. In terms of serviceorienteddesign the behavior supported by <strong>WS</strong>-BA coord<strong>in</strong>ationprotocols violate the <strong>SOA</strong> paradigm, prescrib<strong>in</strong>g the<strong>in</strong>ternal behavior of the system. This prescription resultsfrom the negotiation of the coord<strong>in</strong>ation protocol, where theparticipant commits himself to an <strong>in</strong>ternal behavior patternsupported by the negotiated protocol.4.2 Analysis Results<strong>WS</strong>-Coord<strong>in</strong>ation <strong>and</strong> <strong>WS</strong>-Bus<strong>in</strong>essActivity are protocolframeworks designed for usage <strong>in</strong> the <strong>SOA</strong> environment.Nevertheless the protocol authors made some decisionsabout the <strong>in</strong>ternal buildup of communication partiesas described <strong>in</strong> [5]. The tightly-coupled Coord<strong>in</strong>ator <strong>and</strong>Initiator as well as Participant encapsulat<strong>in</strong>g both bus<strong>in</strong>ess<strong>and</strong> transactional logic are examples of that. Our underst<strong>and</strong><strong>in</strong>gof <strong>WS</strong>-* protocols as build<strong>in</strong>g blocks of distributedsystem led to different view of the system than described <strong>in</strong>[5]. Specifically our architecture was shaped by considerationof seamless <strong>in</strong>tegration of <strong>WS</strong>-C <strong>and</strong> <strong>WS</strong>-BA frameworks<strong>in</strong> exist<strong>in</strong>g <strong>WS</strong>-Scenarios m<strong>in</strong>imiz<strong>in</strong>g the adaptationefforts. For this purpose we <strong>in</strong>troduce the transactionalmiddleware separat<strong>in</strong>g the coord<strong>in</strong>ation from the bus<strong>in</strong>esslogic as shown <strong>in</strong> Fig. 3. The function of the transactionalmiddleware is the management of the coord<strong>in</strong>ation context<strong>and</strong> coord<strong>in</strong>ation protocol execution. By assum<strong>in</strong>g this assignment,the transactional middleware allows for an easierClient implementation. (The addition of the transactionalmiddleware br<strong>in</strong>gs our <strong>WS</strong>-BA implementation closer tothe architecture described <strong>in</strong> <strong>WS</strong>-AtomicTransactions[3],where the <strong>WS</strong>-AT Completion protocol is analogous to themessage exchanges between the client <strong>and</strong> the middlewaredescribed below.)4.2.1 Initiation <strong>and</strong> Term<strong>in</strong>ationThe <strong>WS</strong>-C specification def<strong>in</strong>es a message flow that has tobe understood by all communication parties. To allow non<strong>in</strong>trusive<strong>in</strong>tegration of <strong>WS</strong>-C framework with exist<strong>in</strong>g <strong>Web</strong><strong>Service</strong>s <strong>and</strong> their clients we <strong>in</strong>troduce mechanisms for enabl<strong>in</strong>g<strong>and</strong> disabl<strong>in</strong>g <strong>WS</strong>-Coord<strong>in</strong>ation support on dem<strong>and</strong>.For this purpose the model def<strong>in</strong>ed <strong>in</strong> <strong>WS</strong>-C specification isextended with a new role called Transactor. The Transactoraccepts four different messages from Initiator that dealwith <strong>in</strong>itiation <strong>and</strong> term<strong>in</strong>ation of coord<strong>in</strong>ation support, aswell as lead to the f<strong>in</strong>al coord<strong>in</strong>ated outcome of the protocol<strong>in</strong> use. Transactional support for <strong>in</strong>teractions between <strong>Web</strong><strong>Service</strong>s <strong>and</strong> their clients beg<strong>in</strong>s when the Initiator sends aBeg<strong>in</strong> message to Transactor. Similarly, to end the transactionalsupport the End message is sent to Transactor. TheTransactor form the first part of transactional middleware asseen <strong>in</strong> Fig. 3.App1(Initiator)ProxyClientTransaction<strong>Service</strong>Proxy<strong>Service</strong>TransactorActivation<strong>Service</strong>Registration<strong>Service</strong>Coord<strong>in</strong>atorMiddlewarecreateCoord<strong>in</strong>ationCtx()register()App2(<strong>Web</strong> <strong>Service</strong>)DecisionEng<strong>in</strong>eParticipantFigure 3. System overview(Implementation)4.2.2 Delivery of decisionsIn both <strong>WS</strong>-Bus<strong>in</strong>essActivity protocols the participantreaches the Completed protocol state. In the BAPC protocol,the Participant reaches this state after it has sent theCoord<strong>in</strong>ator a Completed message. Accord<strong>in</strong>g to theBACC (see Fig. 2) protocol, the Participant reaches thisstate after receiv<strong>in</strong>g the Complete message from the Coord<strong>in</strong>ator,<strong>and</strong> hav<strong>in</strong>g successfully progressed through theComplet<strong>in</strong>g state. In the Completed state the logic onthe participant side has recorded all its bus<strong>in</strong>ess data <strong>and</strong>3


expects a decision from the Coord<strong>in</strong>ator about further protocolprogression, which should eventually lead to protocol<strong>in</strong>stance term<strong>in</strong>ation. In general, however, the Coord<strong>in</strong>atorhas no ability to underst<strong>and</strong> the semantics of the bus<strong>in</strong>essmessages be<strong>in</strong>g exchanged between the client <strong>and</strong> the<strong>Web</strong> <strong>Service</strong>. In particular it has no knowledge about thebus<strong>in</strong>ess process flow. This knowledge is only available tothe client act<strong>in</strong>g as Initiator. This means the Coord<strong>in</strong>atorcannot decide by itself which message to send to the Participantafter the Participant has reached the Completedstate. For this purpose we extend the Transactor by <strong>in</strong>troduc<strong>in</strong>gthe ability to transmit a decision of the client to theCoord<strong>in</strong>ator. This decision is bus<strong>in</strong>ess flow dependent <strong>and</strong>enables the Coord<strong>in</strong>ator to send the appropriate coord<strong>in</strong>ationprotocol message to the Participant. For this to happen,the Transactor can receive two messages from the Initiator,namely a Confirm message, <strong>and</strong> a Cancel message.This decision <strong>in</strong>dication received by the Transactor is madeavailable to the tightly-coupled Coord<strong>in</strong>ator. Also importantto mention here is that these Confirm <strong>and</strong> Cancelmessages <strong>in</strong>clude the endpo<strong>in</strong>t address of the <strong>Web</strong> <strong>Service</strong>(to which the earlier bus<strong>in</strong>ess messages were sent) so thatthe decision by the client can be associated with the particular<strong>Web</strong> <strong>Service</strong>. The transactional middleware consists ofthe Transactor <strong>and</strong> the Coord<strong>in</strong>ator, which is thus decoupledfrom the Initiator.4.3 Specification Omissions4.3.1 RegistrationThe <strong>WS</strong>-Coord<strong>in</strong>ation specification prescribes that the Participantregister with the Coord<strong>in</strong>ator if it <strong>in</strong>tends to participate<strong>in</strong> a coord<strong>in</strong>ated bus<strong>in</strong>ess activity. However, theRegister message does not conta<strong>in</strong> enough <strong>in</strong>formationfor the Coord<strong>in</strong>ator to determ<strong>in</strong>e which bus<strong>in</strong>ess activitythe Participant wants to take part <strong>in</strong>. It is possible to resolvethis lack of <strong>in</strong>formation <strong>in</strong> several ways. For example,the Coord<strong>in</strong>ator could provide dist<strong>in</strong>ct Registration <strong>Service</strong>endpo<strong>in</strong>t addresses for each bus<strong>in</strong>ess activity. We chose anotherapproach <strong>and</strong> extended the Register message <strong>in</strong>teractionby add<strong>in</strong>g the miss<strong>in</strong>g <strong>in</strong>formation <strong>in</strong> the form ofidentification <strong>in</strong>formation of the Participant. We also providethe address of the bus<strong>in</strong>ess <strong>Web</strong> <strong>Service</strong> endpo<strong>in</strong>t <strong>in</strong>the Register message. Given the possibility of a Participanttak<strong>in</strong>g part <strong>in</strong> several bus<strong>in</strong>ess activities simultaneously,our extension of the Register response messageallows its assignment to the correspond<strong>in</strong>g bus<strong>in</strong>essactivity. The Coord<strong>in</strong>ationContextIdentifier,def<strong>in</strong>ed <strong>in</strong> <strong>WS</strong>-C specification for identify<strong>in</strong>g the coord<strong>in</strong>ated<strong>in</strong>teraction uniquely, has been used as the extensionfor both messages. An example emphRegister messagewith the identifier is shown <strong>in</strong> List<strong>in</strong>g 1 <strong>in</strong> which theCoord<strong>in</strong>ationContextIdentifier is provided <strong>in</strong>wsu:Identifier element.h t t p : / / schemas . xmlsoap . org / ws / 2 0 0 4 / 0 1/ wsba /Bus<strong>in</strong>essAgreementW i t h P a r t i c i p a n t C o m p l e t i o nh t t p : / / example . org / Requesth t t p : / / example . org / BAPCPorth t t p : / / example . org / ? i d =1h t t p : / / example . org / B u s i n e s s P o r tList<strong>in</strong>g 1. Register Message4.3.2 Coord<strong>in</strong>ation <strong>Protocols</strong> ExtensionBoth the Coord<strong>in</strong>ator <strong>and</strong> the Participant can hold severalcoord<strong>in</strong>ation protocol <strong>in</strong>stances simultaneously. The <strong>WS</strong>-Bus<strong>in</strong>essActivity specification does not provide enough <strong>in</strong>formationto differentiate between coord<strong>in</strong>ation protocol <strong>in</strong>stances.Similar to the case of Register <strong>and</strong> Registerresponse messages we <strong>in</strong>clude the identification element<strong>in</strong> the messages to allow the receiv<strong>in</strong>g party unique assignmentbetween the coord<strong>in</strong>ation messages <strong>and</strong> correspond<strong>in</strong>gprotocol <strong>in</strong>stances.5 ImplementationThe separation of Coord<strong>in</strong>ator from Initiator has beenenabled by usage of a Proxy System. The Proxy System consistsof two parts: a Proxy Client deployed on the Initiatorside <strong>and</strong> Proxy <strong>Service</strong> as a part of proposed transactionalmiddleware. The Proxy Client is realised as a <strong>SOA</strong>P h<strong>and</strong>ler<strong>in</strong>tercept<strong>in</strong>g the messages, redirect<strong>in</strong>g them to the Proxy4


<strong>Service</strong>, which is a part of Transactor. The <strong>in</strong>itial creationof Coord<strong>in</strong>ationContext is ensured on the middleware,which augments the rerouted bus<strong>in</strong>ess messages withCoord<strong>in</strong>ationContext of correspond<strong>in</strong>g bus<strong>in</strong>ess activity.Our def<strong>in</strong>ition of the Participant differs slightly fromthat described <strong>in</strong> <strong>WS</strong>-C specification. We describe onlythe transactional component of the bus<strong>in</strong>ess <strong>Web</strong> <strong>Service</strong>as the Participant. S<strong>in</strong>ce the Participant <strong>and</strong> the bus<strong>in</strong>ess<strong>Web</strong> <strong>Service</strong> have different roles, the former be<strong>in</strong>g responsiblefor coord<strong>in</strong>ation, <strong>and</strong> the latter for bus<strong>in</strong>ess functionality,it is good design to keep them separate. On the otherh<strong>and</strong>, coupl<strong>in</strong>g between the two roles is required for mutualexchange of <strong>in</strong>formation about their <strong>in</strong>ternal states, s<strong>in</strong>ceproper progression of coord<strong>in</strong>ation depends on these states.There are several approaches for a bus<strong>in</strong>ess <strong>Web</strong> <strong>Service</strong> to<strong>in</strong>form the Participant, or for the Participant to <strong>in</strong>form thebus<strong>in</strong>ess <strong>Web</strong> <strong>Service</strong> about the changes of their respective<strong>in</strong>ternal states. Our approach of loose-coupl<strong>in</strong>g of the bus<strong>in</strong>ess<strong>Web</strong> <strong>Service</strong> <strong>and</strong> the Participant is based solely on theobservation of the <strong>in</strong>- <strong>and</strong> outbound communication of thebus<strong>in</strong>ess <strong>Web</strong> <strong>Service</strong>. Us<strong>in</strong>g Decision eng<strong>in</strong>e l<strong>in</strong>ked witha <strong>SOA</strong>P h<strong>and</strong>ler <strong>in</strong>tercept<strong>in</strong>g the messages of the bus<strong>in</strong>ess<strong>Web</strong> <strong>Service</strong> the Participant concludes the change of <strong>in</strong>ternalstate of the bus<strong>in</strong>ess <strong>Web</strong> <strong>Service</strong>. For this purpose theDecision Eng<strong>in</strong>e is equipped with a preconfigured Rule Setconstist<strong>in</strong>g of XQuery[13] predicates. The recorded messagesare written <strong>in</strong>to Trace[12] data structure, which isused as conta<strong>in</strong>er for Rule Set evaluation. Further discussionof the applicability of the proposed approach <strong>and</strong> theRule Set is beyond the scope of this paper <strong>and</strong> is a subjectof further research. The concept of Decision Eng<strong>in</strong>em<strong>in</strong>imizes the effort needed to adapt an exist<strong>in</strong>g bus<strong>in</strong>ess<strong>Web</strong> <strong>Service</strong> for usage with <strong>WS</strong>-BA to writ<strong>in</strong>g of a configurationfile conta<strong>in</strong><strong>in</strong>g the mapp<strong>in</strong>gs between the coord<strong>in</strong>ation<strong>and</strong> bus<strong>in</strong>ess expressions. For simulation purposes acommon travel agency scenario has been implemented. Acomplete example <strong>in</strong>teraction depict<strong>in</strong>g the components describedpreviously is shown <strong>in</strong> Fig. 4.We packaged our <strong>WS</strong>-BA framework implementation asan J2EE application, that has been deployed <strong>in</strong> two JBossApplication Servers. Apache Axis 1.2 has been used as <strong>Web</strong><strong>Service</strong> toolkit. For the usage of TLA+ language an EclipseIDE plug<strong>in</strong> has been developed[14].6 Validation of the ImplementationValidation of the implementation of a given protocol providesthe confidence <strong>in</strong> the correctness of decisions met dur<strong>in</strong>gthe implementation process. It is hard to verify an implementationof the presented system. The mathematicalvalidation of the implementation seems unfeasible, due tothe complexity of the matter at h<strong>and</strong>. Nevertheless, we showClient Middleware ParticipantBus<strong>in</strong>essmessagescancel()conta<strong>in</strong><strong>in</strong>gbus<strong>in</strong>essendpo<strong>in</strong>taddressbeg<strong>in</strong>()book()bookResponse()cancel()end()book()register()registerResponse()bookResponse()completed()compensate()compensated()Messageconta<strong>in</strong><strong>in</strong>gCoord<strong>in</strong>ationContextbook()bookResponse()cancelBook()cancelBookResponse()Figure 4. Sample <strong>in</strong>teraction scenarioBus<strong>in</strong>ess<strong>Web</strong><strong>Service</strong>Messagegeneratedby DecisionEng<strong>in</strong>ea way to acquire an assertion about the correctness of theimplementation. To test our implementation we used themethod suggested <strong>in</strong> [12]. The proposed approach allowsseparation of the implementation details from the test<strong>in</strong>g ofthe overall compliance with the <strong>WS</strong>-BA specification. TheTraces which are used for the Decision Eng<strong>in</strong>e are at thesame time be<strong>in</strong>g stored for later evaluation.As proposed <strong>in</strong> [12] the evaluation of the Traces doesnot prove the def<strong>in</strong>itive compliance of the implementationwith the <strong>WS</strong>-BA specification. It merely guarantees that nospecification violation has been observed. The validationrelies upon a set of predicates which provide a descriptionof the constra<strong>in</strong>ts laid upon the communication by the <strong>WS</strong>-BA specification.The ma<strong>in</strong> effort dur<strong>in</strong>g the proposed validation is neededto be applied to the creation of the predicates set. This setis specific to the protocol which implementation is to betested. Thus there is no possibility to reuse a created predicatesset for test<strong>in</strong>g the implementation of another protocol.A useful base for the creation of the predicates set is aformal specification of the state transitions of the protocol.From this specification a comprehensive set of predicatescan be derived. Another advantage of us<strong>in</strong>g a formal specificationis the avoidance of errors <strong>in</strong> the predicates set.5


7 ConclusionThe formal analysis of the <strong>WS</strong>-Coord<strong>in</strong>ation <strong>and</strong> <strong>WS</strong>-Bus<strong>in</strong>essActivity specifications led to determ<strong>in</strong>ation of ambigousareas <strong>in</strong> the described frameworks. The TLA+ paradigmhelped us perform this analysis. Dur<strong>in</strong>g the analysisphase we uncovered a limitation of the specifications <strong>in</strong>terms of applicability to real world scenarios. In our underst<strong>and</strong><strong>in</strong>gof <strong>SOA</strong> this limitation violates the black boxapproach to the behaviour of the participants. We acceptedthis limitation for the cause of overall <strong>in</strong>teroperability ofour implementation. Further we discovered a structural dependancybetween <strong>in</strong>troduced entities. This also violatesthe <strong>SOA</strong> paradigm. This dependancy could be resolved bysophisticated design of the <strong>WS</strong>-BA framework implementation.The <strong>in</strong>troduction of transactional middleware formsa loosly-coupled transactional system accord<strong>in</strong>g to <strong>WS</strong>-C<strong>and</strong> <strong>WS</strong>-BA specifications. To allow for the mapp<strong>in</strong>g between<strong>in</strong>com<strong>in</strong>g messages <strong>and</strong> their correspond<strong>in</strong>g BAs wetook advantage of the extensibility of elements descibed<strong>in</strong> <strong>WS</strong>-C <strong>and</strong> <strong>WS</strong>-BA specifications. The easy <strong>in</strong>tegration<strong>in</strong>to exist<strong>in</strong>g <strong>Web</strong> <strong>Service</strong> scenarios is enabled by the usageof Proxy System <strong>and</strong> Decision Eng<strong>in</strong>e, whose functionalityis described <strong>in</strong> the Sec. 5 The communication protocoldef<strong>in</strong>ed between the Initiator <strong>and</strong> Transactor is needed toguarantee the loose-coupl<strong>in</strong>g of system components. The<strong>in</strong>sights ga<strong>in</strong>ed dur<strong>in</strong>g the proof-of-concept implementationemphasize our analysis <strong>and</strong> design decisions. The proof-ofconceptimplementation has been exposed to an extendedvalidation phase us<strong>in</strong>g data gathered dur<strong>in</strong>g the test runs ofan example scenario. The overall experience shows, that theusage of formal methods dur<strong>in</strong>g an implementation of <strong>Web</strong><strong>Service</strong> protocols <strong>in</strong> <strong>SOA</strong> helps clarify the protocols underconsideration <strong>and</strong> raises the confidence of the implementors<strong>in</strong>to their underst<strong>and</strong><strong>in</strong>g of the protocols.References[1] P.A. Bernste<strong>in</strong> <strong>and</strong> E. Newcomer. Pr<strong>in</strong>ciples of TransactionProcess<strong>in</strong>g. Morgan Kaufmann Publishers,1997.[2] Luis Felipe Cabrera, George Copel<strong>and</strong>, William Cox,Max Fe<strong>in</strong>gold, Tom Freund, Jim Johnson, Chris Kaler,Johannes Kle<strong>in</strong>, David Langworthy, Anthony Nadal<strong>in</strong>,David Orchard, Ian Rob<strong>in</strong>son, John Shewchuk, TonyStorey, <strong>and</strong> Satish Thatte. <strong>Web</strong> <strong>Service</strong>s Coord<strong>in</strong>ationFramework (<strong>WS</strong>-Coord<strong>in</strong>ation), September 2003.[3] Luis Felipe Cabrera, George Copel<strong>and</strong>, WilliamCox, Tom Freund, Johannes Kle<strong>in</strong>, David Langworthy,Ian Rob<strong>in</strong>son, Tony Storey, <strong>and</strong> Satish Thatte.<strong>Web</strong> <strong>Service</strong>s Atomic Transaction Framework(<strong>WS</strong>-AtomicTransaction)), Januar 2004.[4] Luis Felipe Cabrera, George Copel<strong>and</strong>, WilliamCox, Tom Freund, Johannes Kle<strong>in</strong>, David Langworthy,Ian Rob<strong>in</strong>son, Tony Storey, <strong>and</strong> Satish Thatte.<strong>Web</strong> <strong>Service</strong>s Bus<strong>in</strong>ess Activity Framework (<strong>WS</strong>-Bus<strong>in</strong>essActivity), Januar 2004.[5] Luis Felipe Cabrera, George Copel<strong>and</strong>,Jim Johnson, <strong>and</strong> David Langworthy. Coord<strong>in</strong>at<strong>in</strong>g<strong>Web</strong> <strong>Service</strong>s Activities with<strong>WS</strong>-Coord<strong>in</strong>ation, <strong>WS</strong>-AtomicTransaction,<strong>and</strong> <strong>WS</strong>-Bus<strong>in</strong>essActivity. Available athttp://msdn.microsoft.com/webservices/default.aspx,January 2004.[6] R. Ch<strong>in</strong>nici, M. Gudg<strong>in</strong>, J.-J. Moreau, <strong>and</strong> S. Weerawarana.<strong>SOA</strong>P <strong>Service</strong>s Description Language(<strong>WS</strong>DL) 1.2, March 2003. status : W3C Work<strong>in</strong>gDraft , http://www.w3.org/TR/wsdl12/.[7] Peter Furnis <strong>and</strong> Alastair Green. Choreology Ltd.Feedback to the authors of <strong>WS</strong>-Coord<strong>in</strong>ation, <strong>WS</strong>-AtomicTransaction <strong>and</strong> <strong>WS</strong>-Bus<strong>in</strong>essActivity. Availableat http://www.choreology.com/downloads/, May2004.[8] James E. Johnson, David E. Langworthy, Leslie Lamport,<strong>and</strong> Friedrich H. Vogt. Formal specification ofa web services protocol. Electronic Notes <strong>in</strong> TheoreticalComputer Science, Volume 105, 10 December2004, Pages 147-158, December 2004.[9] James E. Johnson, David E. Langworthy, Leslie Lamport,<strong>and</strong> Friedrich H. Vogt. Formal specification of aweb services protocol. to appear <strong>in</strong> Elseview Science,January 2005.[10] Leslie Lamport. Specify<strong>in</strong>g Systems. Addison Wesley,2003.[11] Eric Newcomer <strong>and</strong> Greg Lomow. Underst<strong>and</strong><strong>in</strong>g<strong>SOA</strong> with <strong>Web</strong> <strong>Service</strong>s. Addison Wesley Professional,2004.[12] Marcus Venzke. Specifications us<strong>in</strong>g XQuery Expressionson Traces. Mario Bravetti, Gianluigi Zavattaro(Eds.): Proceed<strong>in</strong>gs of the First International Workshopon <strong>Web</strong> <strong>Service</strong>s <strong>and</strong> Formal Methods, February2004.[13] W3C. XQuery: the W3C query languagefor XML – W3C work<strong>in</strong>g draft. Available athttp://www.w3.org/TR/xquery/, 2001.[14] Simon Zambrovski <strong>and</strong> Boris Gruschko.TLA+ Eclipse IDE Plug<strong>in</strong>. Available athttp://www.techjava.de/, 2004.6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!