s-cube lp: preventing sla violations in service compositions using aspect-based fragment...

31
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

Upload: virtual-campus

Post on 27-Nov-2014

499 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 2: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 3: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

Learning Package Overview

Problem Description

Aspect-based Fragment Substitution

Discussion

Conclusions

© Philipp Leitner

Page 4: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 5: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 6: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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)

Page 7: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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)

Page 8: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

Learning Package Overview

Problem Description

Aspect-Based Fragment Substitution

Discussion

Conclusions

© Philipp Leitner

Page 9: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 10: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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.

Page 11: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 12: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

Aspect-based Fragment Substitution (1)

Page 13: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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)

Page 14: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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)

Page 15: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 16: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 17: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 18: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

Architectural Overview (1)

Page 19: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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)

Page 20: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 21: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

Learning Package Overview

Problem Description

Aspect-Based Fragment Substitution

Discussion

Conclusions

© Philipp Leitner

Page 22: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

Overall Performance Impact on Process Execution Time (1)

Page 23: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 24: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

Weaving Time (1)

Page 25: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 26: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 27: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 28: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

Learning Package Overview

Problem Description

Aspect-Based Fragment Substitution

Discussion

Conclusions

© Philipp Leitner

Page 29: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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

Page 30: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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.

Page 31: S-CUBE LP: Preventing SLA Violations in Service Compositions Using Aspect-Based Fragment Substitution

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