Comp150CPA: Clouds and Power-Aware Computing
Classroom Exercise 16
Orchestration and Choreography
Spring 2011
group member 1: ____________________________ login: ______________
group member 2: ____________________________ login: ______________
group member 3: ____________________________ login: ______________
group member 4: ____________________________ login: ______________
group member 5: ____________________________ login: ______________
In class we have described both BPEL (orchestration) and
WS-CDL (choreography) languages for describing web service interactions.
Let's explore these in more detail.
- Annotate the following description of a web service interaction
with the tags
<exchange>...</exchange>, <sequence>...</sequence>,
<parallel>...</parallel>, <choice>...</choice>, <assign></assign>,
and <workunit>...</workunit>, as a preliminary translation into WS-CDL. Warning: some loops are implicit.
< sequence>
- <exchange> Buyer selects item. </exchange>
- <exchange> Seller shows shopping cart. </exchange>
- <choice>Buyer can either:
- <exchange>Press "Continue shopping".</exchange>
<sequence>
- <exchange>Press "Proceed to checkout."</exchange>
- <exchange>Seller asks for shipping address. </exchange>
- <exchange>Buyer enters shipping address. </exchange>
- <exchange>Seller asks for credit card. </exchange>
- <exchange>Buyer enters credit card. </exchange>
- <exchange>Seller asks for billing address. </exchange>
- <exchange>Buyer enters billing address. </exchange>
</sequence>
</choice>
</sequence>
- Consider the following WS-BPEL:
<sequence name="TakeOrder" >
<receive name="receiveOrder"
createInstance="yes"
partnerLink ="Client"
operation="order"/> <!-- here -->
<reply name="SendConfirmation"
partnerLink ="Client"
operation="confirm"/> <!-- on client -->
</sequence>
For this example,
- What parts are analogous to WS-CDL exchanges?
Answer: receive and reply.
- What parts are analogous to WS-CDL participants?
Answer: Client (and yourself).
- Please sketch the structure of an approximately equivalent WS-CDL
description.
Answer:
<sequence name="TakeOrder" >
<exchange name='receiveOrder' ... >
<exchange name='SendConfirmation' ... >
</sequence >
- (Advanced) Is choreography a substitute for orchestration,
or an extension? Explain.
Answer:
Actually, it's a pattern that can be completed to create an orchestration.
Choreography describes both sides of an interaction, unlike BPEL, which
describes individual processes that happen to interact. But a choreography
can be used to create two interacting processes in the trivial way.
It does not substitute for BPEL, though, because it has no concept of
overarching control.