S-CUBE LP: Quality of Service-Aware Service Composition: QoS optimization in service-based processes


Published on

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

S-CUBE LP: Quality of Service-Aware Service Composition: QoS optimization in service-based processes

  1. 1. S-Cube Learning Package Quality of Service-Aware Service Composition:QoS optimization in service-based processes Politecnico di Milano (POLIMI) Barbara Pernici www.s-cube-network.eu
  2. 2. Learning Package Categorization S-Cube Quality Definition, Negotiation and Assurance Quality Definition and SLA Negotiation Quality of Service-Aware Service Composition: QoS optimization in service-based processes © B. Pernici
  3. 3. Learning Package Overview Problem Description QoS optimization Service selection Optimization of composed services Rebinding Discussion Conclusions © B. Pernici
  4. 4. The Need for QoS Informationin the Service-Oriented Architecture Many WSes with similar functionality 1. Publish Service It differentiates Service Provider from competitors Registry (Supplier, (Broker, Server) Directory) 3. Bind Service 2. Find It is used for Consumer It determines management (Requester, the best match (monitoring Client) and control) © B. Pernici
  5. 5. MAIS-Platform Scenario (MAIS-P) Flexible e-services Adaptive networks S1.op1 Context- S1.op2 S2.op1 awareness and personalization Adaptive front- S2.op2 ends S1.op3 S2.op3 Dynamic service [B. Pernici, ed. Springer, Mobile selection andService optimization Information Systems, April 2006]registry © B. Pernici
  6. 6. Multi-channel ADAPTIVE informationsystems © B. Pernici
  7. 7. Multi-channel ADAPTIVE informationsystems QoS Accepted quality threshold t © B. Pernici
  8. 8. QoS optimization Definition of the problem Design or run time problem? Process optimization © B. Pernici
  9. 9. Web Services Elementary Composed How to associate QoS to WS definition? © B. Pernici
  10. 10. Satisfaction of request [Comuzzi, Pernici 2009]=> Single values are considered (worst case) in most research work © B. Pernici
  11. 11. Registry: MAIS E-service ontology [Bianchini et al, Ing. Sys., 2006] QoS QoS QoS QoS QoS QoS QoS © B. Pernici
  12. 12. Service Interface find-travel book-travel Travel-Service pay-travel Receive (+ Port types) find-travel Receive book-travel Receive pay-travel behavior © B. Pernici
  13. 13. WS QoS (an example)Candidate WSs<?xml version="1.0" ?><webServices> <webService name="ws_1"> <maxTime value="6.767389" /> <minTime value="5.767389" /> <price value="0.123061776" /> <reputation value="0.82627237" /> <availability value="0.9903379" /> <dataQuality value="0.9857625" /> </webService> <webService name="ws_2"> <maxTime value="7.9125476" /> <minTime value="5.767389" /> <price value="0.45754516" /> <reputation value="0.9279902" /> <availability value="0.9791445" /> <dataQuality value="0.91493726" /> </webService>...</webServices> © B. Pernici
  14. 14. Satisfaction of request [Comuzzi, Pernici 2009]=> Single values are considered (worst case) in most research work © B. Pernici
  15. 15. Composed WS Preferred: Negotiate: - ACMEHotels Invoke - lowest price - ItalianHotels hotel.reservation - offer request not late late Probability=0.8 Probability=0.2 Invoke Invoke train.reservation flight.reservationQuality global constraints: cost <1000 train.reservation.cost<600 © B. Pernici
  16. 16. Abstract process Abstract services Process AS1.op1 op1 op2 AS1 AS1.op2 AS2.op1 op3 AS2.op2 op1 op2 AS2 AS1.op3 op3 AS2.op3 © B. Pernici
  17. 17. Concrete process Process Concrete services Process Concretization AS1.op1 CS1.op1 op1 op2AS1.op2 AS2.op1 CS1 CS1.op2 CS2.op1 op3 op3 AS2.op2 CS2.op2 op1 AS1.op3 CS1.op3 op2 CS2 AS2.op3 op3 CS2.op3 © B. Pernici
  18. 18. A selection problem? t1 t2 ... tIws1,1 ws1,2 ... ws1,|OP(1)| ws2,1 ws2,2 ... ws2,|OP(2)| wsJ,1 wsJ,2 ... wsJ,|OP(J)| ws1 ws2 ... wsJ © B. Pernici
  19. 19. Design time or run time problem?  When are service selected?  When is quality agreed?  Rebinding and renegotiation © B. Pernici
  20. 20. Flexible process Concrete services Search T1 criteria Candidates for T1Search Searchcriteria criteria T2 T3 Candidates for T2 T4 Candidates for T3 Global process constraints Candidate for T4 © B. Pernici
  21. 21. PAWS Framework &Architecture [Ardagna et al IEEE Software 2007] © B. Pernici
  22. 22. WS Selection is an OptimizationProblem Local optimization: run time selection of the best candidate service which supports the execution of the running high level activity Global optimization: identification of the set of candidate services which satisfy the end user preferences for the whole application Quality of Service (QoS) constraints at local and global level © B. Pernici
  23. 23. An optimization problem? Local optimization (Cardoso) Linear programming (Benatallah, Ardagna) Genetic algorithms (Canfora) © B. Pernici
  24. 24. QoS aggregate functions [Cardoso, 2005] Definition of a QoS evaluation function for each pair (QoS attribute, workflow construct) and collapsing nodes while evaluating Modified to account for # of loop iterations © B. Pernici
  25. 25. Examples cost=2 S1 avail=0.9 S2 Estimated S1Sequence Loop Iterations=5 cost=3 cost=2 avail=0.8 avail 0.9 cost=2+3=5 cost=2 · 5=10 avail=0.9 · 0.8=0.72 avail=0.95=0.59 Switch Fork (flow) 30% 70% cost=2 cost=3 avail 0.9 S1 S2 avail=0.8 cost=2 cost=3 r.time=3 r.time=2 avail=0.9 S1 S2 avail=0.8 cost=0.3 · 2+0.7 · 3=2.7 cost=2+3=5 avail=0.3 · 0.9+0.7 · 0.8=0.83 avail=0.9 · 0.8=0.72 [Cardoso, 2005] r.time=max(3,2)=3 © B. Pernici
  26. 26. Quality Driven composition  Proposes a global approach to planning to optimally select component services during the execution of a composite service  Defines a quality model and a quality-driven service selection [Zeng, et al., 2004] © B. Pernici
  27. 27. Quality Driven composition Given a composite service the execution path and the execution plan are defined – Execution paths are sequences of states – Execution plans are execution paths in which each activity is performed by a service The problem is to select for each activity the service that not only satisfies local requirements but also the global ones [Zeng, et al., 2004] © B. Pernici
  28. 28. Hot path [Zeng et al, 2004] Exploring all paths and computing the overall QoS on a “hot” path – Considering each path at a time – Only paths likely to be executed (hottest paths) – Unfolding cycles – Global planning with linear programming solution - Difficult to handle attributes that aggregate non-linearly [Zeng, et al., 2004] © B. Pernici
  29. 29. Normalization [Zeng et al.]  Given an attribute Q, find the maximum QMAX and minimum QMIN across all the available services  The normalized value V will be: negative attributes Positive attributes  Q MAX  Q If QMAX≠QMIN   Q  Q MIN If QMAX≠QMINV   Q MAX  Q MIN  If QMAX=QMIN V   Q MAX  Q MIN 1 If QMAX=QMIN  1  e.g. cost  and the fitness (to be minimized): e.g. availability © B. Pernici
  30. 30. Unfolding loops C RT – Useful in presence of constraints S1 CS1 3 2 – In case of loops, each abstract service invocation CS2 5 1 may be assigned to 3 different concrete services S1 S1 – Objective: meet constraints and maximize QoS Fitness=C+RT S1 – Loops are unfolded RT≤5 Fitness=18 Fitness=16 © B. Pernici
  31. 31. Composed services optimization [Ardagna, Pernici, 2005, 2007] Global and Local QoS Constraints Guarantee in Web Service Selection Loops: – Unfolding (consider maximum number of iterations) – Peeling (associate probability to each iteration sequence) Global constraints enforcement – Only Critical path in Zeng 2004 – Local optimization in Meteor-S Reoptimization (Adaptivity) Negotiation in case of unsolvable problem © B. Pernici
  32. 32. [Ardagna and Pernici, 2007] © B. Pernici
  33. 33. [Ardagna and Pernici, 2007] © B. Pernici
  34. 34. Formal Definitions Let wsi,j be the i-th Web service candidate for the execution of task tj Execution Path (epl): a set of tasks {t1,t2,…,tn}, such that t1 is the initial task, tn is the final task and no ti, tj belong to alternative branches Sub path (spml): a sequence of tasks [t1,t2,…, tn], ti  epl from the begin to the end task which does not contain any parallel sequence Execution Plan (eplkl): a set of ordered couples (tj, wsī,j), indicating that task tj included in eplkl is executed by a given WS wsī,j Global Plan: a set of ordered couples (tj, wsī,j), which associates every task tj to a given WS wsī,j and satisfies local and global constraints for all execution paths © B. Pernici
  35. 35. An Example Global constraints: – Price6$ – Execution time7 sec. Solution: ws2,1, ws2,2 and ws2,3 (no global constraints violation in all cases) © B. Pernici
  36. 36. Notation Symbol Description ei,j wsi,j execution time ai,j wsi,j availability pi,j price for wsi,j execution ri,j wsi,j reputation WSj set of indexes corresponding to candidate Web services of task tj A set of tasks included in the composite service specification Al set of tasks included in the execution path epl L number of execution path arising from the composite service specification © B. Pernici
  37. 37. Problem Formulation  The WSC problem is multi-objective and a simple additive weighting technique is used to evaluate the overall value of QoS from multiple quality dimensions  Decision variables: – yi,j equals 1 if the Web service wsi,j executes task tj, 0 otherwise – xj start time of task tj – ej task tj duration © B. Pernici
  38. 38. Objective Function Plan score: – (other dimensions may be included, e.g. data quality) Problem objective: © B. Pernici
  39. 39. [Ardagna and Pernici, 2007] © B. Pernici
  40. 40. Problem Constraints Assignment constraints: Task duration constraints: [Ardagna and Pernici, 2007] © B. Pernici
  41. 41. Problem Constraints  Local constraints: e.g.  Price constraints:  Execution time constraints:  Reputation constraints:  Availability constraints: => Log if not linear The problem is NP-hard, it is equivalent to a Multiple choice Multiple dimension Knapsack Problem [Ardagna and Pernici, 2007] © B. Pernici
  42. 42. Another issue Task dependency: – Two tasks have to be executed by the same operation (or different operations) of the same WS – Eg: make reservation - payment [Ardagna and Pernici, 2007] © B. Pernici
  43. 43. Re-optimization  Re-optimization is performed: – if the current QoS value differs from the corresponding prediction (variability of performance of Web services) – if a Web service invocation fails – for end user s context switch – after the evaluation of switch conditions – periodically with an adaptive time period Tp (new candidate services)  Re-optimization reduces the number of variables of the problem and can be computed efficiently © B. Pernici
  44. 44. [Ardagna and Pernici, 2007] © B. Pernici
  45. 45. Performance analysis [Ardagna and Pernici, 2007] © B. Pernici
  46. 46. Finding a solution using GA  Representation: – Array chromosome – A slot for each abstract service invoked in the process – Value indicates the binding – S1, …, SN abstract services – CSi1, …, CSik concrete services for Si CS24 CSN k CS13 CS12 CS11 CS21 CSN1 [Canfora, Di Penta 2005] S1 S2 SN © B. Pernici
  47. 47. Genetic Algorithms Initialize population P[0]; g=0; while(g < max_number_of_generations) Evaluate P[g]; g=g+1; Select P[g] from P[g-1]; Crossover P[g]; Mutate P[g]; end while [Canfora, Di Penta 2005] © B. Pernici
  48. 48. GA Operators Crossover: Mutation: CS24 CS44CS13 CS22 CS33 CS41 CS13 CS23 CS33 CS43 CS12 CS22 CS32 CS42CS11 CS24 CS31 CS44 CS11 CS21 CS31 CS41 CS13 CS22 CS33 CS41CS13 CS22 CS31 CS44 - Selection: Roulette wheel – pcross=0.7CS11 CS24 CS33 CS41 – pmut=0.1 – GA type: Simple with elitism of 2 (best) [Canfora, Di Penta individuals 2005] – Population size: 100 individuals © B. Pernici
  49. 49. Optimization ProblemGiven a solution sLet us suppose we have the SLA constraints in the form cl i ( s )  0 i  1 ... ne.g.  Cost ( s )  100  0   Re sponseTime ( s )  20  0The fitness function (to be minimized) would be something like: w 1  Cost ( s )  w 2  Re sponseTime (s) F(s)   w 5  D (s) w 3  Availabili ty ( s )  w 4  Re liability ( s )or w 1  Cost ( s )  w 2  Re sponseTime (s) F(s)   1  D ( s )  w 3  Availabili ty ( s )  w 4  Re liability ( s )where D(s) is defined as: yi  0 cl i ( s )  0 [Canfora, Di Penta D ( s )   cl i ( s )  y i  n yi  1 cl i ( s )  0 2005] © B. Pernici
  50. 50. Comparing GAs with integer programming – Integer Programming (IP) is one of the most widely adopted techniques for this kind of problems – IP model depends on the number of concrete services available – Given a workflow composed of S1…Sn abstract services, each one bound to CSi,1,…CSi,m concrete service, - The number of variables yi,j in the IP problem is given by: n m i i1    j 1 y i , j  1 mi   y i , j  0 ,1  [Canfora, Di Penta 2005] © B. Pernici
  51. 51. Comparing GAs with IP:Results of an empirical study Workflow containing 18 invocations of 8 distinct abstract services, cyclomatic complexity=5 – # of concrete services per abstract service varying between 5 and 25 GAs better than IP for # of concrete services >17 GAs ensure better scalability Also, it allows to handle non linearity [Canfora, Di Penta 2005] © B. Pernici
  52. 52. Discussion IP is a widely adopted technique to solve this kind of problem GAs better scale up when the number of available concrete services for an abstract service is very high – Possible scenarios: widely used services (e.g. hotel booking, search URL, etc.) GAs do not pose any limitation on the linearity of the fitness function and of the QoS aggregation formulae – Linearization necessary for IP  not to consider for user-defined, domain specific QoS attributes - e.g. temperature service may have QoS attributes such as refresh rate, accuracy, etc. – Alternative: nonlinear IP  serious scalability problems © B. Pernici
  53. 53. Handling re-binding [Canfora 2005] www.s-cube-network.eu
  54. 54. Causes of re-binding A service may not be available or, better services can be available QoS values deviate from the estimate Unlikely paths are followed – Branches unlikely to be executed – # of iterations largely different from the estimated value This may lead to: – Impossibility to continue the execution – Constraint violation – Poor optimization of the objective function [Canfora 2005] © B. Pernici
  55. 55. Triggering Servicere-binding Perform re-binding between abstract and concrete services When: – QoSestimated >QoSconstraint or QoSactual- QoSestimated >threshold Due to one of the following events 1. Difference between estimated and actual number of loop iterations 2. Choice of the path to be followed in a switch 3. Difference between the estimated and actual QoS of some executed services 4. A service is not available The algorithm will try to trigger the re-binding once enough information is available [Canfora 2005] © B. Pernici
  56. 56. Determining there-binding slice Remaining n3 iterations: k’3-j3 Remaining n2 iterations: k’2-j2 [Canfora 2005] © B. Pernici
  57. 57. Rebinding: response time evolution 35 30 Response Time [s] 25 20 T<29 15 T<31 10 5 0 initial estimate replan. value new estimate final value [Canfora 2005] © B. Pernici
  58. 58. Re-binding may fail…  No service available for replacement  No way to recover from constraint violation – e.g. timing constraints already violated  No way to optimize the objective function  What to do – Suspend the execution - replace the unavailable service – Terminate the execution - Nothing can be done – Continue anyway - Constraints not so hard - Try to limit the violation – (Re)Negotiate (Ardagna-Comuzzi-Pernici) © B. Pernici
  59. 59. Discussion and future work Interrelation between design and run time decisions (design for QoS optimization),complexity Semantic information about quality (are weights enough?) Incomplete information and distributed decisions Variable quality profiles Multiple instances and multiple processes Link with strategic goals and underlying infrastrucure; should decisions be taken independently Stability of solutions Application areas Soft and hard constraints © B. Pernici
  60. 60. Further S-Cube ReadingMarco Comuzzi, Barbara Pernici: A framework for QoS-based Web servicecontracting. TWEB 3(3): (2009).V. Andrikopoulos, M.G. Fugini, M. Papazoglou, M. Parkin, B. Pernici, B., S.H.Siadat, QoS Contract Formation and Evolution, 11th International Conference onElectronic Commerce and Web Technologies (EC-Web 2010)George Baryannis, Olha Danylevych, Dimka Karastoyanova, KyriakosKritikos, Philipp Leitner, Florian Rosenberg, Branimir Wetzstein,Service Composition,in Service Research Challenges and Solutions for the Future Internet:S-Cube – Towards Engineering, Managing and Adapting Service-Based System,Mike P. Papazoglou, Klaus Pohl, Michael Parkin and Andreas Metzger (eds), LNCS6500, 2010Salima Benbernou, Ivona Brandic, Cinzia Cappiello, Manuel Carro,Marco Comuzzi,, Attila Kertesz, Kyriakos Kritikos, Barbara Pernici,Pierluigi Plebani,Modeling and negotiating service quality,in Service Research Challenges and Solutions for the Future Internet:S-Cube – Towards Engineering, Managing and Adapting Service-Based System,Mike P. Papazoglou, Klaus Pohl, Michael Parkin and Andreas Metzger (eds), LNCS 6500, 2010 © B. Pernici
  61. 61. References D. Ardagna and B. Pernici. Adaptive service composition in flexible processes. IEEE Trans. on Software Engineering, June 2007. D. Ardagna, M. Comuzzi, B. Pernici, P. Plebani, PAWS: Processes with adaptive web services, IEEE Software, Nov. 2007 D. Bianchini, V. De Antonellis, B. Pernici, P. Plebani: Ontology-based methodology for e-service discovery. Inf. Syst. 31(4-5): 361-380 (2006) G. Canfora, M.di Penta, R. Esposito, and M. L. Villani. QoS-Aware Replanning of Composite Web Services. ICWS 2005 Proc., 2005. Orlando. J. Cardoso. Quality of Service and Semantic Composition of Workflows. Ph. D. Thesis, Univ. of Georgia, 2002. S. Chandrasekaran, J. A. Miller, G. Silver, I. B. Arpinar, and A. P. Sheth. Performance Analysis and Simulation of CompositeWeb Services. Electronic Market: The Intl. Journal of Electronic Commerce and Business Media, 13(2):120–132, 2003. D. B. Claro, P. Albers, and J. K. Hao. Selecting Web Services for Optimal Composition. In ICWS 2005 Workshop Proc., 2005. Orlando. M. C. Jaeger, G. Muhl, and S. Golze. QoS-aware composition of web services: An evaluation of selection algorithms. In COOPIS 2005 Proc., 2005. Cyprus. B. Pernici, ed. Springer , Mobile Information Systems, April 2006 Tao Yu, Yue Zhang, and Kwei-Jay Lin. Efficient algorithms for web services selection with end-to-end QoS constraints. ACM Trans. Web, 1(1):1–26, 2007. L. Zeng, B. Benatallah, M. Dumas, J. Kalagnamam, and H. Chang. QoS aware middleware for web services composition. IEEE Trans. on Software Engineering, 30(5), May 2004. © B. Pernici
  62. 62. Acknowledgements The research leading to these results has received funding from the European Community’s Seventh Framework Programme [FP7/2007-2013] under grant agreement 215483 (S-Cube). © B. Pernici