s-cube lp: preventing sla violations in service compositions using aspect-based fragment...
DESCRIPTION
TRANSCRIPT
www.s-cube-network.eu
S-Cube Learning Package
Service Level Agreements:
Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment
Substitution
TU Wien (TUW), University of Stuttgart (USTUTT)
Branimir Wetzstein, USTUTT
Learning Package Categorization
S-Cube
Adaptable Coordinated Service Compositions
Adaptable and QoS-aware Service Compositions
Preventing SLA Violations in Service Compositions
Using Aspect-Based Fragment Substitution
Learning Package Overview
Problem Description
Aspect-based Fragment Substitution
Discussion
Conclusions
© Philipp Leitner
Let’s Consider a Scenario (1)
Assume you are a provider of a composite service
Commercial customers order products via a Web service
interface
Your process checks an internal stock, orders some missing
parts, and assembles the product
© Philipp Leitner
Let’s Consider a Scenario (2)
(Of course) there are contractual obligations
– Delivery in time
– Availability of your service
– Product quality
These can be formulated using Service Level Agreements
© Philipp Leitner
– Note: in this context not necessarily
WSLA style machine processable
SLAs – can also be just regular
contracts
Let’s Consider a Scenario (3)
As a provider, you want to receive timely notifications if these
obligations are likely to be violated
– Usually there are penalties to be paid if contractual obligations are
(repeatedly) violated
– Even if this is not the case, customer satisfaction will suffer and
existing customers may terminate their contracts
© Philipp Leitner
ReceiveOrder
CheckStock
SelectSupplier
ChargeCustomer
[everythingavailable]
Order FromSupplier 1
Order FromSupplier 2
Cancel Order
Ship Order[no supplieravailable]
Get PaymentPrefs!
Based on these notifications …
– … countermeasures can be taken (i.e.,
adaptations can be triggered)
After an SLO violation is predicted for a process instance, the goal is to adapt the
process instance in order to prevent the violation
Different types of adaptation actions:
Data Manipulation, Service Rebinding (in composition)
Environmental (adapt hosting environment)
Idea:
The provider can pre-model a set of alternative process fragments (process
variants) with different QoS characteristics
The best possible alternative(s) is then selected and executed at runtime
based on SLO prediction
Let’s Consider a Scenario (4)
Structural adaptation
(change structure of composition)
Learning Package Overview
Problem Description
Aspect-Based Fragment Substitution
Discussion
Conclusions
© Philipp Leitner
Approach: SLA Violation Prevention via Fragment Substitution
1. Define Checkpoints in the service composition
2. Use Machine Learning techniques to generate predictions for service
level objectives (SLOs) at a check point
3. Adapt service composition by substituting alternative fragments which
likely can prevent the predicted SLO violation
Background: Related Approaches in S-Cube
This S-Cube approach uses the techniques presented in the
following S-Cube Learning Package
Runtime Prediction of SLA Violations Based on Service Event Logs
See also:
Leitner, Wetzstein, Rosenberg, Michlmayr, Dustdar, and Leymann. Runtime Prediction of Service Level Agreement Violations for Composite Services. In Proceedings of the 2009 International conference on Service-Oriented Computing (ICSOC/ServiceWave'09), Springer-Verlag, Berlin, Heidelberg, 176-186.
Leitner, Michlmayr, Rosenberg, and Dustdar. Monitoring, Prediction and Prevention of SLA Violations in Composite Services. In Proceedings of the 2010 IEEE International Conference on Web Services (ICWS '10). IEEE Computer Society, Washington, DC, USA, 369-376.
Goal: predict the value of a process metric (which is the basis of an SLO) while the process
instance is still running
The prediction model is created using machine learning regression techniques (artificial
neural networks) based on historical process instances
At predefined checkpoints, both measured and estimated facts are used as input to the
prediction model (which provides a predicted numerical value as output)
Order
ID
Product
Type
Supplier
Delivery
In
Stock …
7101 Book 28 h No …
Predicted
SLO
72 h
Background: Runtime Prediction of SLA Violations
Monitoring
Database
Order
ID
Product
Type
Supplier
Delivery
In
Stock …
SLO
Value
1 Bike TourX 28 h No … 96 h
2 Bike RX - Yes … 48 h
… … … … …
Machine
Learning
Check
point
Art. Neural
Network
Art. Neural
Network
Aspect-based Fragment Substitution (1)
Aspect-Oriented Programming (AOP) terminology
– Cross-cutting concerns are implemented using loosely-coupled program fragments
(advices)
– During weaving, advices are inserted directly into the program code of target
applications at well-defined join points
– Decision of whether to insert a given advice: pointcut
At design time:
– A set of fragments (= advices) is created which can be used as alternative
implementations of parts of business logic in the target composition
– Fragments are standalone (typically “incomplete”) compositions focusing on a certain
part of business logic and are linked into the original composition via join points
– A fragment definition also contains an impact model which defines how this fragment
affects composition performance metrics
At runtime:
A predicted SLA violation at a check point triggers the adaptation
A set of adaptation alternatives is identified based on impact models; the selected
alternative is weaved into the target composition
Aspect-based Fragment Substitution (2)
Linking of Fragments and Weaving (1)
Design Time: Linking of fragments into the target composition
Defines the join points in the execution where control flow changes from the
target composition to the fragment or vice versa
Join Points: START, END, TRANSPARENT (virtual activities)
Linking of Fragments and Weaving (2)
Runtime: Selection and Weaving of fragments into the target composition
After SLO Prediction… selection of one or more fragments based on their
impact models
Dynamic weaving of new fragment logic into the running composition instance
Generic Fragments
Generic Fragments:
Fragments consisting only of virtual activities
Instantiated via linking
Used for recurring domain-independent adaptation actions such as removal,
reordering, or parallelizing of activities
Order
ID
Product
Type
Supplier
Delivery
In
Stock …
7101 Book 48 h No … Artificial
Neural
Network
Predicted
SLO
72 h
Order
ID
Product
Type
Supplier
Delivery
In
Stock …
7101 Book 32 h No …
Order
ID
Product
Type
Supplier
Delivery
In
Stock …
7101 Book 32 h No …
Order
ID
Product
Type
Supplier
Delivery
In
Stock …
7101 Book 32 h No …
Predicted
SLO after
adaptation
56 h
Impact Clauses Adaptation Impact
Predicted
SLO after
adaptation
56 h
Predicted
SLO after
adaptation
56 h
How do we determine which fragments will likely prevent the
predicted violation?
Main idea: impact models
– Describe the impact that every fragment has on the metrics that are
used to generate predictions of violations
– Can be created using e.g., SLAs, data mining, QoS aggregation, …
– repeat prediction as if adaptation has taken place
Selection of Fragments
Architectural Overview (1)
Architectural Overview (2)
1. Define SLAs (SLA DB) and a set of alternative fragments
(Advice DB)
2. Train a Prediction Model for each Checkpoint and use it at
runtime for prediction at a check point (Violation Predictor)
3. Select an optimal set of fragments based on their impact
models and the SLO prediction (Advice Selector)
4. Weave the selection into the
composition instance and resume
process execution (Advice Weaver)
VRESCo Open Source Implementation
The prototype used to do these experiments has been
developed as part of the VRESCo project
– Can be downloaded from Sourceforge
The Sourceforge package also includes the assembling case
study
– However, setup is not very user-friendly
– Get in touch with us if interested in reproducing the case study
Uses WEKA Machine Learning toolkit to implement the actual
prediction algorithms
© Philipp Leitner
Learning Package Overview
Problem Description
Aspect-Based Fragment Substitution
Discussion
Conclusions
© Philipp Leitner
Overall Performance Impact on Process Execution Time (1)
Overall Performance Impact on Process Execution Time (1)
Online weaved compositions exhibit very little overhead as
compared to statically defined compositions
Overhead consists of time necessary to…
– select the fragments
– implement the actual weaving (largest impact)
– to suspend and unsuspend
the composition
Weaving Time (1)
Weaving Time (2)
Weaving time is relatively constant in [45 : 80] ms, even for
large fragments (more than 80 activities)
This should be fast enough for most applications
As expected…
–Concrete activities are faster
to weave than transparent
activities
–Offline weaving is faster than
online weaving
Discussion - Advantages
Runtime Fragment Substitution based on SLA Predictions has
a number of clear advantages …
– Coverage of many adaptation patterns – insertion, deleting, moving,
replacement of fragments, parallelizing of activities, etc.
– Flexibility – the set of available alternative fragments can be altered
(i.e., new fragments can be created or existing ones removed) after
the process has been deployed during process runtime
– Efficiency – even though training of the machine learning models takes
some time, generating predictions and the adaptation are very fast
Discussion - Disadvantages
… but of course the approach also has some disadvantages.
– Bootstrapping problem – the approach assumes that some recorded
historical event logs are available for training of the prediction model
– Necessary monitoring – in order to know later which fragments have
been executed for a process instance
– Necessary domain knowledge – in order to define checkpoints and the
fragments and their impact models some domain knowledge is
necessary
Learning Package Overview
Problem Description
Aspect-Based Fragment Substitution
Discussion
Conclusions
© Philipp Leitner
Summary
Machine learning based techniques can be used to predict
SLA Violations in service compositions at runtime
Based on these predictions, runtime fragment substitution can
be used for preventing the SLA violation
Steps:
1. Define a checkpoint in the composition and train a machine learning
model from historical event log
2. Whenever a composition instance passes the checkpoint, use the
monitored data of the instance as input for the machine learning
based prediction
3. Based on the available fragment alternatives, select and substitute
one or more fragments which likely can prevent the predicted
violation
Further S-Cube Reading
Leitner, Philipp; Wetzstein, Branimir; Karastoyanova, Dimka; Hummer, Waldemar; Dustdar, Schahram; Leymann, Frank: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution. In: Proceedings of the 8th International Conference on Service Oriented Computing (ICSOC 2010).
Leitner, Michlmayr, Rosenberg, and Dustdar. Monitoring, Prediction and Prevention of SLA Violations in Composite Services. In Proceedings of the 2010 IEEE International Conference on Web Services (ICWS '10). IEEE Computer Society, Washington, DC, USA, 369-376.
Leitner, Wetzstein, Rosenberg, Michlmayr, Dustdar, and Leymann. Runtime Prediction of Service Level Agreement Violations for Composite Services. In Proceedings of the 2009 International conference on Service-Oriented Computing (ICSOC/ServiceWave'09), Springer-Verlag, Berlin, Heidelberg, 176-186.
Wetzstein, Leitner, Rosenberg, Brandic, Dustdar, and Leymann. Monitoring and Analyzing Influential Factors of Business Process Performance. In Proceedings of the 13th IEEE international conference on Enterprise Distributed Object Computing (EDOC'09). IEEE Press, Piscataway, NJ, USA, 118-127.
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).
© Philipp Leitner