Desynchronizable Choreographies
-
Upload
gerodecker -
Category
Technology
-
view
1.403 -
download
0
Transcript of Desynchronizable Choreographies
Non-desynchronizable Service Choreographies
Gero Decker1, Alistair Barros2,
Frank Michael Kraft3, Niels Lohmann4
1Hasso-Plattner-Institute, Potsdam, Germany2SAP Research, Brisbane, Australia3SAP AG, Walldorf, Germany4University of Rostock, Germany
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
2
Agenda
■ Modeling service choreographies
■ Synchronous / asynchronous communication
■ Desynchronizability
■ Resolution strategies
■ Conclusion
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
3
Service Choreographies
■ Inter-organizational integration requires interaction contracts
□ Defined set of interactions
□ Defined document structures / message types
□ Defined interaction behavior: constraints and obligations
■ Choreographies as behavioral specification for services
□ Starting point for adapting existing services
□ Starting point for implementing new services
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
4
Send auction creation req.
Send details
Auction crea-tion confirm.
Sel
ler
Request details
Send creation confirmation
Auc
tioni
ng S
ervi
ce
Auction creation request
Trusted customer
no
yes
Send payment
Payment
Modeling ChoreographiesInterconnection Modeling
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
5
Send auction creation req.
Send details
Auction crea-tion confirm.
Sel
ler
Request details
Send creation confirmation
Auc
tioni
ng S
ervi
ce
Auction creation request
Trusted customer
no
yes
Send payment
Payment
Modeling ChoreographiesInterconnection Modeling
incompatibleloops
definition of processinstantiation
incompatiblebranching structures
incompatible sequence flow
abstraction level =messages
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
6
Seller
Auctioning Service
Auctioncreation confirm.
Auction creation request
Trusted customer?
no
yes
Payment
Exchange details
Modeling ChoreographiesInteraction Modeling
atomicinteractions
decisionownership
global controlflow dependencies
complexinteractionsglobal loops
process instantiationunspecified
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
7
Modeling Choreographies
■ BPMN, BPEL4Chor
■ Send and receive as separate steps (asynchronous)
■ Let’s Dance, WS-CDL
■ BPMN 2.0
■ Send and receive in one step (synchronous)
Interconnection ModelsInteraction Models
Place order
Send ack
Send paymentB
uyer
Sel
ler
Buyer
Seller
Order Order ack Payment
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
8
Modeling Choreographies
Buyer
Seller
Purchase order
PO ack
PO cancel
PO cancel
PO ok
PO ok
Cancelled
Accepted
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
9
Modeling Choreographies
Buyer
Seller
Purchase order
PO ack
PO cancel
PO cancel
PO ok
PO ok
Cancelled
Accepted
Does this choreography make sense
in an asynchronous world?
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
10
Modeling Choreographies Synchronous vs. Asynchronous
■ Assumes asynchronous communication
■ Assumes synchronous communication
Desynchronized NetInteraction Petri net
so ra sp
ro sa rp
B S
order
S B
order ack
B S
payment
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
11
Studying the Desynchronized Net
S B
PO ack
S B
PO ok
B S
cancel
B S
PO req
S B
cancel
B S
PO ok
cancelPO ackPO req cancel PO ok PO ok
Deadlock
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
12
Observable behavior model (role Z)
Interaction Model
Desynchronized Net
Observable behavior model (role A)
Desynchronizability
…
Role projection Role projection
Interconnection
■ Has final markings
■ Must weakly terminate
■ Must be realizable
■ Final markings are generated
■ Check for weak termination
B A
PO ack
B A
PO ok
A B
cancel
A B
PO req
B A
cancel
A B
PO ok
cancelPO ackPO req cancel PO ok PO ok
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
13
DesynchronizabilityLocation of conflict transitions
■ The interaction model
□ weakly terminates and
□ is realizable
■ There exist choreography instances that end in final markings
■ Those transitions can be identified that lead to a deadlock
□ “Conflict transitions”
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
14
ToolingDesynchronizability in IPNs
http://oryx-editor.org
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
15
ToolingDesynchronizability in IPNs
http://oryx-editor.org
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
16
ToolingDesynchronizability in BPMN 2.0
http://oryx-editor.org
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
17
ToolingDesynchronizability in BPMN 2.0
http://oryx-editor.org
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
18
Resolution Strategies in Practice (1/2)
■ Not a solution: Removing the possibility of cancellation
■ Solution 1: Precedence
□ Agreement on precedence relationships at design-time
□ Assumption: the services will notice that conflicting messages are present
□ Predefined behavior upon conflicting messages
□ a. Singular Interaction Partner Precedence
□ b. Type-based Precedence between Multiple Interactions
□ c. Situation-based Precedence between Multiple Interactions
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
19
Resolution Strategies in Practice (2/2)
■ Solution 2: Precedence with Decision
□ Precedence relationships define who has the right to decide on the outcome upon conflicting messages
■ Solution 3: Allowing Individual Decisions
□ Upon conflicting messages each service decides how to handle this and tells the other services about the decision
□ Main problem: contradicting decisions
■ Solution 4: Negotiation of Outcome
□ Upon conflicting messages the conversation is suspended and a negotiation phase starts
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
20
Summary & Outlook
■ Interaction modeling eases choreography modeling (but hides the challenges of asynchronous communication)
■ Desynchronizability checking detects and locates errors
■ Resolution strategies have business impact must be chosen on a business level!
■ Future work
□ Formalization of resolution strategies
□ Declarative integration of resolution strategies
Non-desynchronizable Service Choreographies | Gero Decker | 24. April 2006
21
Questions?
■ Mail [email protected]
■ Tool http://oryx-editor.org
■ Blog http://bpmn.info