A Distributed Framework for Reliable and Efficient Service

A Distributed Framework for
Reliable and Efficient Service
Choreographies
Young Yoon, Chunyang Ye and Hans-Arno Jacobsen
What is service choreography?
Autonomous and distributed collaboration
amongst independently developed services.
Young Yoon
WWW'11
2
Service choreography
Example: Credit card fraud detection process
Auditing partner sends fraud warnings
G0
to Accounting partner
G1
Young Yoon
Customer service issues refund to
Customer
WWW'11
3
G0
Auditing partner sends fraud warnings
to Accounting partner
G1
Customer service issues refund to
Customer
Decompose
L0
L0
L0
L0
Send fraud
warning
messages
Receive fraud
warning
message
Issue refund
Receive
refund
message
Auditing service
Accounting service
CRM service
Client service
Young Yoon
WWW'11
4
Semantic conflict
Behavior that does not conform to the
collaboration specification
Young Yoon
WWW'11
5
“ Someone used my credit
card to purchase train
ticket!”
Send fraud
warning
messages
Receive fraud
warning
message
Issue refund
Receive
refund
message
Auditing service
Accounting service
CRM service
Client service
Issue refund
Refund
CRM service behaved
arbitrarily and caused
Travel agency
Customer account
Young Yoon
WWW'11
semantic conflict.
6
The cause of the semantic conflict
The missing synchronization
G0
Auditing partner sends fraud warnings
to Accounting partner
Gx
Accounting partner orders customer
service to issue refund
G1
Customer service issues refund to
Customer
Young Yoon
WWW'11
7
Another example:
Internal operation in a car company
HQ ”clear out”  Dealer
Dealers ask Coordinator to pick
G1 or G2
Marketing
“Sales trend update”
 Factory
Young Yoon
Operations manager 
“decrease production rate”
 change to Factory
WWW'11
8
Goal 1: Prevent semantic conflict.
Enrich safety constraints
Goal 2: Build a distributed framework
Govern the enforcement of safety constraints
Goal 3: Make the framework be efficient
Don’t let the safety constraints hamper the
performance of the collaboration
Young Yoon
WWW'11
9
Goal 1: Prevent semantic conflict
Goal 2: Build a distributed framework
Goal 3: Make the framework be efficient
Young Yoon
WWW'11
10
Enrich safety constraints during the
decomposition.
Young Yoon
WWW'11
11
m
G1 r 1 r
1
2
rx: collaborating partner x
G2
m2
r3  r4
G4
Young Yoon
m3
r1  r5
G3
m1
r1  r2 : r1 sends m1 r2
m4
r1  r3
WWW'11
12
m
G1 r 1 r
1
2
m
G1 r 1 r
1
2
c1
r2  r3
G2
m2
r3  r4
m3
r1  r5
G3
G2
Young Yoon
m4
r1  r3
m3
r1  r5
c3
c4
G4
WWW'11
r2  r1
m2
r 3  r4
r 4  r1
G4
c2
G3
r5  r1
m4
r1  r3
13
m
G1 r 1 r
1
2
c1
r2  r3
G2
c2
r2  r1
m2
r3  r4
m3
r1  r5
c3
c4
r4  r1
G3
Young Yoon
(G1) : projection of G1
x(m1): send m1
x(m1): receive m1
G3
r5  r1
m4
r1  r3
WWW'11
14
m
G1 r 1 r
1
2
c1
r2  r3
G2
(G1) x(m1)
c2
r2  r1
m2
r3  r4
m3
r1  r5
c3
c4
r4  r1
G3
Young Yoon
G3
r5  r1
r1
m4
r1  r3
WWW'11
15
m
G1 r 1 r
1
2
c1
r2  r3
G2
(G1) x(m1)
c2
m2
r3  r4
m3
r1  r5
c3
c4
r4  r1
G4
Young Yoon
(G2)
r2  r1
x(c3)
G3
r5  r1
r1
m4
r1  r3
WWW'11
16
m
G1 r 1 r
1
2
c1
r2  r3
G2
(G1) x(m1)
c2
m2
r3  r4
m3
r1  r5
c3
c4
r4  r1
G4
Young Yoon
(G2)
r2  r1
r5  r1
x(c3)
G3
(G4) x(m4)
r1
m4
r1  r3
WWW'11
17
m
G1 r 1 r
1
2
c1
r2  r3
G2
(G1) x(m1)
c2
m2
r3  r4
m3
r1  r5
c3
c4
r4  r1
G3
Young Yoon
(G2)
r2  r1
r5  r1
x(c2) (G1)
x(c3)
G3
(G4) x(m4)
r1
m4
r1  r3
WWW'11
18
m
G1 r 1 r
1
2
c1
r2  r3
G2
(G1) x(m1)
c2
m2
r3  r4
m3
r1  r5
c3
c4
r4  r1
G3
Young Yoon
(G2)
r2  r1
r5  r1
x(c2) (G1)
x(c3)
G3
x(m3) (G3)
(G4) x(m4)
r1
m4
r1  r3
WWW'11
19
m
G1 r 1 r
1
2
c1
r2  r3
G2
(G1) x(m1)
c2
m2
r3  r4
m3
r1  r5
c3
c4
r4  r1
G3
Young Yoon
(G2)
r2  r1
r5  r1
x(c2) (G1)
x(c3)
G3
x(m3) (G3)
(G4) x(m4)
x(c4) (G3)
r1
m4
r1  r3
WWW'11
20
Revisiting the credit card fraud detection
process
Receive
confirmation
Accounting service
Send fraud
warning
messages
Receive fraud
warning
message
Auditing service
Issue refund
Receive
refund
message
CRM service
Client service
Send
confirmation
Young Yoon
WWW'11
21
Decomposition overhead
Young Yoon
WWW'11
22
Task increase per partner
Young Yoon
WWW'11
23
Goal 1: Prevent semantic conflict
Goal 2: Build a distributed framework
Goal 3: Make the framework be efficient
Young Yoon
WWW'11
24
S
S
S
S
CA
S
S
LP
CA
B
Coordinator
B
LP
B
LP
B
S
B
B
Coordinator
Constraint
Deployer
B
LP
Young Yoon
S
S
S
CA
LP
S
S
LP (Sub-constraints):
Local Process
LP
CA
S
S
CA:
B: Pub/Sub Broker
Choreography Agent
WWW'11
25
CA
LP
CA
B
LP
B
LP
Coordinator
B
B
B
Coordinator
Constraint
Deployer
CA / Coordinator
B
B
Young Yoon
Local
Process
Interpreter
LP
Process
Instance
Initializer
LP
CA
LP (Sub-constraints):
Local Process
CA:
Choreography Agent
CA
LP
Choreography
Message
Generator
B: Pub/Sub Broker
Choreography
Message
Listener
Pub/Sub Translator
Pub/Sub Communication Interface
WWW'11
26
Coordination overhead
Young Yoon
WWW'11
27
Scalability
14% ↑
60% ↑
Young Yoon
WWW'11
28
Goal 1: Prevent semantic conflict.
Goal 2: Build a distributed framework.
Goal 3: Make the framework be efficient.
Young Yoon
WWW'11
29
Minimize the coordination overhead.
Distance from candidate
location to task ri
Weight: Execution
time of task ri
Young Yoon
WWW'11
30
m
G1 r 1 r
1
2
Higher weights given to a
task with more following
tasks.
Pick
G2
m2
r3  r4
G3 There can be nested picks.
m3
Thus weights are recursively
r1  r5
computed.
Pick
G4
Young Yoon
m4
r6  r7
G5
m5
r2  r8
WWW'11
31
The bottom line 1:
We prevent semantic conflict even when
the collaboration is dynamic.
Because of the agent-based framework and
enrichment of safety constraints during
reliable decomposition.
Young Yoon
WWW'11
32
The bottom line 2:
Efficient and scalable enforcement of safety
constraints
Because of the novel coordinator
placement method and concurrent
execution of decomposed tasks through
parallel and distributed choreography
agents.
Young Yoon
WWW'11
33
Thank You!
http://msrg.org
[email protected]
Young Yoon
WWW'11
34