Dr. Yuhong Yan - users.encs.concordia.cayuhong/slides/CASCONWSC10.pdf · Adaptor vs. Composition...
Transcript of Dr. Yuhong Yan - users.encs.concordia.cayuhong/slides/CASCONWSC10.pdf · Adaptor vs. Composition...
Service Composition, Adaptation, Service Composition, Adaptation,
and Repair
1
Dr. Yuhong Yan
Concordia University, Montreal
Nov. 2, at CASCON2010
Content
� Classification of Web Service Composition Problems
� Sample algorithms for Web Service Composition
� From my research
1. Repair composition for adapting to changes
2. A general composition model for solving different
composition problemscomposition problems
2
Automated Service Composition
� Requirements Specification
� Discovery
� Selection
� Composition
� Monitoring
3
The Composition Algorithm
Composition Alg
Models of Available Services(WSDL, BPEL) Business Process
(BPEL or others )Composition Alg
Composition Requirements(Target processor /and its properties, QoS)
(BPEL or others )
4
A Classification of the WSC Problem� WSC: Web Service Composition
� Interface (signature, stateless behavior): WSDL, OWL-S, SAWSDL
� Process (conversation, protocol, stateful behavior): (Abstract)
BPEL, WS-CDL, (automata, process algebra, Petri nets, etc.)
Interface+Reachability Process+Reachability
Composition Requirements
Interface+Reachability Process+Reachability
Interface AI planning,
heuristic search,
dynamic programming,
linear programming, etc.
service matching, 1-1
substitution, process
reconfiguration [Dusdar,
et. al.], [Fredj, et. al.],
[Cavallaro, et. al.])
Process AI planning/Model
checking (e.g. [Pistore])
Adaptor ([Grefen], […])
Roman Model ([Berardi
et. al.])
Mealy Services ([Fu,
Bultan, Su])
Services Models
5
Service Model: Interfaces
� A Web service: w(in) = out
Add semantics: in ⊆ D, out ⊆ D� Add semantics: in ⊆ D, out ⊆ D
� DSS(D, RD): Data Semantics Structure
7
Service Model: Interfaces
� A Web service: w(in) = out
Add semantics: in ⊆ D, out ⊆ D� Add semantics: in ⊆ D, out ⊆ D
� DSS(D, RD): Data Semantics StructureData
Adaptation
8
Composition Requirements
� Query: (Din, Dout)
� Reachability properties: terminate properly (end at
desired final state, no deadlock)
� The solution
Din Dout
9
Map WSC to AI Planning Problem
� A planning problem P = ((S, A, γ), s0, g)� S ⊆ 2L, L = {p1, p2, …, pn} of proposition symbols
� γ(s,a) = s + effects+(a) - effects-(a), a∈A, pre(a) ⊆ s
� s0∈S and g ⊆ L
� A WSC problem P = (W, Din, Dout) can be mapped to a
planning problem ((S, W, γ), Din, Dout)planning problem ((S, W, γ), Din, Dout)
� If in(w) ⊆ s, γ(s, w) = (s-in-(w) + out(w))� STRIP like, propositions only
� We also have the operations made by DSS
12
GraphPlan (Blum and Furst, 1997)
w1
E
A
B
C
A
B
C D
w4D
E
F
A
B
C
D
G
E
F
A
B
C
D
H
G
w2
w3
w2
w3
E
F
w4D
J
I
K
L
H
G
J
I
H
P0 A1 A2 A3P2P1 P3
w1w1
13
Other Methods
� Dynamic Programming
� Linear Programming
� Heuristic search
See Papers of Web Service Challenge
14
Composition Requirements
� Produce required data outputs
� Reachability: conditions at the goal state (in temporal
logic)
� terminate properly
� recovery conditions
18
The Adaptor Problem [Grefen][…]
� Service Model: process
� Composition Requirement: no deadlock in comm
� Calculate adaptor:
� Adaptor is the mediator between the services;
� No services are changed, or replaced;
� Methods: � Methods:
�Consider incompatibility, replaceability,
controllability
�Data matching
�Mismatching tree
�Pattern analysis
�Modeling checking, planning, automata theory based
approaches.
21
Adaptor vs. Composition
� Adaptor:
� To facilitate communication
� Strategy: addition
�Not to change the services or target process
�Actions are to bridge the communications
� Properties:� Properties:
�Controllability, compatibility, reachability (no
deadlock)
� Composition:
� To reach the business goals
� Strategy: creation (generate new process)
� Properties: reachability (no deadlock, property satisfaction)
22
Interface – Process Problems
� Service Substitution Problem [Dusdar, et. al.], [Fredj,
et. al.], [Cavallaro, et. al.]
� Strict 1-1 replacement
� m-n replacement
� Reconfiguration Problem
� Compatibility: subsumption, equivalence� Compatibility: subsumption, equivalence
24
Process-Process Problem
�Roman Model ([Berardi et. al.], [Calvanese, et. al.,
2008] )
�Mealy Services ([Fu, Bultan, Su])
25
Model the Changes
� Changes happen all the time in the real-open world
� Environment Changes: W’ = W + W+ - W-
� Goal Changes: Dout’ = Dout + Dout+ - Dout
-
� We can solve the new problem P=(W’, Din, Dout’)
� By re-planning: planning from scratch� By re-planning: planning from scratch
� By repairing: adapt the original solution to the new problem
27
The Repairing Approaches
� The graph built for the original plan is a model of the world
� The original graph is still largely valid for the new problem
� We want to reuse the knowledge in the graph
� We want to keep our commitments in the old solution (solution stability)(solution stability)
Definition of Plan stability [Fox, et. al., 2006]: given two plans π1 and
π2, the difference between π1 and π2 is the number of actions that
appear in π1 and not in π2 plus the number of actions that appear in
π2 and not in π1.
The Repair Process
P’=(W’, Din, Dout’), π', G’
Compute {BPi} Output π
{BPi}=∅, Dout' issatisfied
Repair {BPi} and G’
G’ contains a solution?
Extract a solution
Report no solutionN
Y
29
The Repairing Approaches (2)
� After removing Web services, the non-satisfied inputs are named “Broken Preconditions” or BPs
� Main idea:
� Locate the BPs in the existing plan
Select Web services to fix BPs� Select Web services to fix BPs
� Possible fix� Find a replacement: W1 <-> W11
� Find a new service using the original graph
30
Repairing Algorithm by Example
G2E H2I
a, b, c, d, f, g, h
A2BC A2D D2F
a, b, c, d, f, g, h, e, i
33
A2BC D2F
A2D F2G
C2E F2H
D2E G2E
H2I
A2BC A2D
a, b, c, d, g
A2BC A2DD2F
a, b, c, d, f
a
F2G F2HA2BC A2D D2F
C2E D2E
H2E
33
The Service Evaluation Functions
� To evaluate which service to add first:
� n is the highest action level
� m=n to repair the broken goals
� m<n to repair lower
34
More Remarks
� The complexity of repairing the graph
� To know a repair exist or not: polynomial to |W|.
� To exact a repair: see below.
� The complexity of plan extraction from the graph
� Without negative effect (based on [Hoffman and Bebel, 2001]) :
polynomial to |W|, max(out(w)), polynomial to |W|, max(out(w)),
� With negative effects ([Blum and Furst, 1996]): exponential |W|
� When repair is better than recomposition?
� If the changes are not too big (can reuse the graph)
� If a replacement service (or services) can be easily found (no need to
search for a complete new plan)
� But we do not know the boundary.
36
Datasets Used in ExperimentsDatasets Used in Experiments
4 sets of solutions1 sets of
solutions
1 sets of
solutions
37
Conclusion
� Repairing plan: an adaptation mechanism to Web
service compositions
� Proposed composition adaptation comparison criteria
� Repair is faster and gets as good solutions as
replanning
39
Conclusions:
� Composition and adaptation
� What are interesting topics?
� Composition in a dynamic world
� Unified solution to different WSC problems.
� Unified solution to composition and adaptation
52