Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 A Petri Net Siphon Based Solution to Protocol-level Service Composition Mismatches Pengcheng Xiong 1, Mengchu Zhou 2 and Calton Pu 1 1 College of Computing,

Similar presentations


Presentation on theme: "1 A Petri Net Siphon Based Solution to Protocol-level Service Composition Mismatches Pengcheng Xiong 1, Mengchu Zhou 2 and Calton Pu 1 1 College of Computing,"— Presentation transcript:

1 1 A Petri Net Siphon Based Solution to Protocol-level Service Composition Mismatches Pengcheng Xiong 1, Mengchu Zhou 2 and Calton Pu 1 1 College of Computing, Georgia Institute of Technology 2 Department of ECE, New Jersey Institute of Technology Presented on ICWS2009 July, 2009

2 2 Web service composition Everyone wants seamless composition of Web services Everyone wants seamless composition of Web services What ’ s missing in achieving this goal is the mismatch between invokers and invokees. What ’ s missing in achieving this goal is the mismatch between invokers and invokees. Now interface mismatches have been well addressed while protocol mismatches remain a challenge. Now interface mismatches have been well addressed while protocol mismatches remain a challenge.

3 3 A concrete example How does message deadlock happen? How to break the message deadlock? CustomerOnline shop Test result by Oracle BPEL Both of the services are blocked

4 4 Agenda Background about mismatches in web service composition Background about mismatches in web service composition Related works and our contributions Related works and our contributions Modeling methods Modeling methods Message ordering mismatch detection and solution Message ordering mismatch detection and solution Conclusion Conclusion

5 5 Mismatches in Web Service Composition Interface mismatches (Mostly solved) Interface mismatches (Mostly solved) Message signature mismatches (by schema matching-based method, information retrieval techniques) Message signature mismatches (by schema matching-based method, information retrieval techniques) Message split/merge mismatches (by clustering- based approach) Message split/merge mismatches (by clustering- based approach) Protocol-level mismatches (Partially solved) Protocol-level mismatches (Partially solved) Unspecified reception (by adaptor-based method) Unspecified reception (by adaptor-based method) Message deadlock (remains a challenge) Message deadlock (remains a challenge) message ordering mismatches message ordering mismatches non-local choice mismatches non-local choice mismatches

6 6 Message deadlock example (1)

7 7 Message deadlock example (2) CustomerOnline shop Time Result: Both of the parties are waiting for each other order Send Wait for order Receive Delivery info. Wait for Payment info. CHOICE 1 CHOICE 2 CHOICE 3

8 8 Solving the problem using reachability tree based method Choice 1, provide delivery and payment information. Choice 1, provide delivery and payment information. CustomerOnline shop Time Delivery info. Receive Send Payment info. Receive Payment info.Confirmation Wait for Send Confirmation Receive

9 9 Solving the problem using reachability tree based method Choice 2, provide payment information. Choice 2, provide payment information. CustomerOnline shop Time Delivery info. Wait for Payment info. Receive Confirmation Wait for

10 10 Solving the problem using reachability tree based method Choice 3, provide delivery information. Choice 3, provide delivery information. CustomerOnline shop Time Delivery info. Receive Send Payment info. Receive Send Confirmation Receive

11 11 Limitations of reachability tree based method The cost for the construction of a reachability tree is exponential, i.e., O(e N )(N is the number of nodes) The cost for the construction of a reachability tree is exponential, i.e., O(e N )(N is the number of nodes) 2 k is the number of choices (k is the number of messages) 2 k is the number of choices (k is the number of messages) Some choice can not solve the problem completely, which needs a second interfere by programmer, e.g., choice 2. Some choice can not solve the problem completely, which needs a second interfere by programmer, e.g., choice 2. Some choice is not optimal, which requires more information than really needed, e.g., choice 1. Some choice is not optimal, which requires more information than really needed, e.g., choice 1. Total cost to find the best choice is O(2 k e N ) Total cost to find the best choice is O(2 k e N )

12 12 Our contributions We model web service composition as a special kind of Petri nets in which we have a hypothesis: there is a deadlock in web service composition if and only if there is an empty siphon in Petri nets. We model web service composition as a special kind of Petri nets in which we have a hypothesis: there is a deadlock in web service composition if and only if there is an empty siphon in Petri nets. The cost for enumerating all the empty siphon is exponential, i.e., O(e N )(N is the number of nodes) The cost for enumerating all the empty siphon is exponential, i.e., O(e N )(N is the number of nodes) By linear programming, we can find the optimal solution. The cost for linear programming is polynomial. By linear programming, we can find the optimal solution. The cost for linear programming is polynomial. Total cost will be O(e N )(N is the number of nodes) Total cost will be O(e N )(N is the number of nodes)

13 13 Agenda Background about mismatches in web service composition Background about mismatches in web service composition Related works and our contributions Related works and our contributions Modeling methods Modeling methods Message ordering mismatch detection and solution Message ordering mismatch detection and solution Conclusion Conclusion

14 14 Petri nets and Composition net (C-net) We divide the basic structures in BPEL, i.e., receive, reply, invoke, assign, throw, terminate, wait, empty and link into two categories. We divide the basic structures in BPEL, i.e., receive, reply, invoke, assign, throw, terminate, wait, empty and link into two categories. The first category is internal control logic that includes assign, terminate, wait and empty. We model them as internal status places and transitions. The first category is internal control logic that includes assign, terminate, wait and empty. We model them as internal status places and transitions. The second category is external control logic that includes receive, reply, invoke, throw and link. we model them as transitions connected with internal status places and interface places The second category is external control logic that includes receive, reply, invoke, throw and link. we model them as transitions connected with internal status places and interface places “Receive” in BPEL Internal Status Places Interface Places

15 15 Petri nets and modeling (1)

16 16 Petri nets and modeling (2) Based on the basic structure models, we model structured activities in a BPEL process, i.e., sequence, flow, pick, switch and while, etc. Here is an example. Based on the basic structure models, we model structured activities in a BPEL process, i.e., sequence, flow, pick, switch and while, etc. Here is an example.

17 17 Physical Siphon A physical siphon is a continuous tube that allows liquid to drain from a reservoir through an intermediate point that is higher, or lower, than the reservoir. The liquid can only go from higher point to the lower point

18 18 Siphon in Petri nets A siphon of a Petri net is defined as a set S of places such that :the input set of S :the output set of S

19 19 Siphon in Petri nets The number of tokens in a siphon will never increase and an empty siphon will always remain empty. The number of tokens remains 2Empty siphon remains empty

20 20 Agenda Background about mismatches in web service composition Background about mismatches in web service composition Related works and our contributions Related works and our contributions Modeling methods Modeling methods Message ordering mismatch detection and solution Message ordering mismatch detection and solution Conclusion Conclusion

21 21 Detecting message ordering mismatch (1) Theorem 1: There is a dead transition in C-net if and only if there is an empty siphon. Theorem 1: There is a dead transition in C-net if and only if there is an empty siphon. For example, there are 5 minimum siphons in the fig, i.e., S 1 ={p 1-5 }, S 2 ={p 6-10 }, S 3 ={p 1, p 3-5, p 7-9, p 11, p 14 }, S 4 ={ p 3, p 8-9, p 12, p 14 }, S 5 ={ p 3-4, p 9, p 13-14 }. M 0 (S 1- 3 )=1 and M 0 (S 4-5 )=0. For example, there are 5 minimum siphons in the fig, i.e., S 1 ={p 1-5 }, S 2 ={p 6-10 }, S 3 ={p 1, p 3-5, p 7-9, p 11, p 14 }, S 4 ={ p 3, p 8-9, p 12, p 14 }, S 5 ={ p 3-4, p 9, p 13-14 }. M 0 (S 1- 3 )=1 and M 0 (S 4-5 )=0.

22 22 Non-empty siphons

23 23 Empty siphons

24 24 Detecting message ordering mismatch (2) Since there are initial empty siphons, i.e., S 4 and S 5, there exists message ordering mismatching. This is true because after t 1 and t 6 fire, there is a message deadlock Since there are initial empty siphons, i.e., S 4 and S 5, there exists message ordering mismatching. This is true because after t 1 and t 6 fire, there is a message deadlock

25 25 Correcting message ordering mismatch Developers provide additional information to break the message deadlock. Developers provide additional information to break the message deadlock. Developers will have too many choices if using reachability based method and some of the choices will lead to additional work in the future and some of them are not optimal. Developers will have too many choices if using reachability based method and some of the choices will lead to additional work in the future and some of them are not optimal. We optimize the choices by linear programming. We optimize the choices by linear programming. Deadlock happens No deadlock Empty siphon No empty siphon Construct msg. Add tokens

26 26 Linear programming to optimize choices (1) Objective: minimum number of messages Objective: minimum number of messages Constraint: (1)the relationship between information places and siphons (2) all the empty siphons marked Constraint: (1)the relationship between information places and siphons (2) all the empty siphons marked Compute the following linear programming problem: Compute the following linear programming problem: Minimize 1*L s.t. A*L ≧ 1 T L: A list of messages that should be provided. A: The contribution matrix of every message to a siphon.

27 27 Linear programming to optimize choices (2) Minimize L 1 + L 2 + L 3 + L 4 Minimize total number of msgs Contribution matrix Every empty siphon is marked now S 4 ={ p 3, p 8-9, p 12, p 14 }, S 5 ={ p 3-4, p 9, p 13-14 }

28 28 Choices Choice 1: Provide both the delivery information and the payment information. L 1 =(0,1,0,1) T Choice 1: Provide both the delivery information and the payment information. L 1 =(0,1,0,1) T Choice 2: Provide the payment information. L 2 =(0,1,0,0) T Choice 2: Provide the payment information. L 2 =(0,1,0,0) T Choice 3: Provide the delivery information. L 3 =(0,0,0,1) T (Solution of linear programming) Choice 3: Provide the delivery information. L 3 =(0,0,0,1) T (Solution of linear programming)

29 29 Choice 1: provide both info. L 1 =(0,1,0,1) T. It is a feasible solution of the linear programming, but not an optimal solution. L 1 =(0,1,0,1) T. It is a feasible solution of the linear programming, but not an optimal solution.

30 30 Choice 2: provide only payment info. L 2 =(0,1,0,0) T. It is NOT a feasible solution of the linear programming. Because A*L ’ =(1,0) T, although S 4 is marked, S 5 is still empty. L 2 =(0,1,0,0) T. It is NOT a feasible solution of the linear programming. Because A*L ’ =(1,0) T, although S 4 is marked, S 5 is still empty.

31 31 Choice 3: provide only delivery info. L 3 =(0,0,0,1) T. It is the optimal solution of the linear programming. L 3 =(0,0,0,1) T. It is the optimal solution of the linear programming.

32 32 Local choice mismatch solution Different from the message ordering mismatch where there are initial empty siphons, there are no initial empty siphons in local choice mismatch. But some of the siphons may lose their tokens if some transitions fire. Different from the message ordering mismatch where there are initial empty siphons, there are no initial empty siphons in local choice mismatch. But some of the siphons may lose their tokens if some transitions fire. We propose a method based on additional information channels in [6] to hold the tokens in siphons such that every siphon is always marked. We propose a method based on additional information channels in [6] to hold the tokens in siphons such that every siphon is always marked.

33 33 Agenda Background about mismatches in web service composition Background about mismatches in web service composition Related works and our contributions Related works and our contributions Modeling methods Modeling methods Message ordering mismatch detection and resolution Message ordering mismatch detection and resolution Conclusion Conclusion

34 34 Conclusion Although the existing studies can analyze the mismatch problems at the interface and protocol levels based on reachability analysis, they do not provide a direct solution. Although the existing studies can analyze the mismatch problems at the interface and protocol levels based on reachability analysis, they do not provide a direct solution. The main contribution of this paper is to propose a siphon-based analysis technique that yields a variant of component service without mismatches. Without checking the state space, our approach provides an optimized and also automatic solution for correcting protocol-mismatches. This approach greatly reduces the amount of interactions with developers. The main contribution of this paper is to propose a siphon-based analysis technique that yields a variant of component service without mismatches. Without checking the state space, our approach provides an optimized and also automatic solution for correcting protocol-mismatches. This approach greatly reduces the amount of interactions with developers.

35 35 Thank you!


Download ppt "1 A Petri Net Siphon Based Solution to Protocol-level Service Composition Mismatches Pengcheng Xiong 1, Mengchu Zhou 2 and Calton Pu 1 1 College of Computing,"

Similar presentations


Ads by Google