adaptation of service-based systems - kit

47
Universitätsstr. 38 70178 Stuttgart Germany Office: 1.361 Phone: +49 (0)711 7816 476 Jun.-Prof. Dr. Dimka Karastoyanova IAAS, University of Stuttgart [email protected] Adaptation of Service-based Systems

Upload: others

Post on 09-Nov-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Adaptation of Service-based Systems - KIT

Universitätsstr. 38 70178 Stuttgart Germany Office: 1.361 Phone: +49 (0)711 7816 476

Jun.-Prof. Dr. Dimka Karastoyanova IAAS, University of Stuttgart [email protected]

Adaptation of

Service-based Systems

Page 2: Adaptation of Service-based Systems - KIT

Topics

Service-based Systems Adaptation Classification of Triggers and Approaches

Adaptation Approaches from our Research Summary/Conclusion

© Dimka Karastoyanova

Page 3: Adaptation of Service-based Systems - KIT

The Famous Travel Agency Process Choreography of several applications/compositions

© Dimka Karastoyanova

Plan Trip

Submit to Travel Agent

Receive eTickets

Select Legs

Order Tickets

Send eTickets

Get Flight Submission

Get Ticket Order

Receive Confirmation

Reserve Seats

Confirm Flights

Send Itinerary

Traveler Agent Airline

Receive Itinerary

Charge Credit Card

Page 4: Adaptation of Service-based Systems - KIT

Multi-Scale Human Skeleton Simulation

Choreography of simulations of skeleton, bone, tissue, and cell scale

Picture adopted from www.anatomium.com, www.med-ed.virgina.edu and R. Bartl University München

Page 5: Adaptation of Service-based Systems - KIT

Bone Growth Simulation

Orchestration to simulate bone growth depending on load, exercise, etc. Understand diseases, e.g. fractures

Based on the Finite Element Method (FEM) Initial and boundary condition Simulation is solved via a PDE as a matrix

equation (Ax=b)

Page 6: Adaptation of Service-based Systems - KIT

Modeled and realized as a choreography

Bone Growth Simulation

Page 7: Adaptation of Service-based Systems - KIT

Service-Based Systems: Choreographies of complex services/service-based applications

(SBAs) Services may be choreographies or orchestrations themselves

© Dimka Karastoyanova

Service-Based Systems

Choreography

Services

Orchestrations

Choreography

Services

Orchestrations

Choreography

Services

Orchestrations

Page 8: Adaptation of Service-based Systems - KIT

SBA model: Three layers Current research focus:

Model, execute, monitor and adapt on all three levels coherently

© Dimka Karastoyanova

SBA Life cycle includes adaptation Framework for QoS aware, adaptable

SBAs

Service-Based Applications

Choreography

Services

Orchestrations

Page 9: Adaptation of Service-based Systems - KIT

Service-Based Applications (SBAs)

Services: Are units of functionality Described using a unified IDL Independent of

implementation technology Self-contained stable service

interfaces Virtualization of components

SBAs comprise services And follow the principles of the

Service Oriented Architecture (SOA) style

The SOA roles and operations:

© Dimka Karastoyanova

DBMS .NET J2EE

Virtual Component

Concrete Component

Assembly StP ...

Web Service

(E)JB

implements implements implements

Transport Medium

Find

Bind

Publish

Service Requestor

Service Provider

Service Discovery

Technology for implementing SBAs is workflows

Page 10: Adaptation of Service-based Systems - KIT

Service Compositions

© Dimka Karastoyanova

What?

Who?

With?

Get Order

Check Customer

Accept Order

Reject Order

Always!

Credit Card Information

Customer Address

Worklists

Workitem

Page 11: Adaptation of Service-based Systems - KIT

Adaptation of Service Compositions (How?)

© Dimka Karastoyanova

Adaptation on all dimensions Control flow changes Functions changes Exchange human participants

On model (evolution, versioning) and instance level (ad-hoc changes) (When?)

SC Model and/or Infrastructure changes to accommodate adaptation (What realization?)

Many Triggers for Adaptation (Why?)

Page 12: Adaptation of Service-based Systems - KIT

Adaptation Triggers (Why?) Triggers can be generated on

each level of an SBA Value for participants - Service Networks QoS and nfp violations, KPIs – SCs and BPs SLAs violations – all layers Compliance violations – all layers Changes in policies – mostly BPs Unavailable services – Service Infrastructure

+ SCs Context change – all layers Organizational restructuring – mostly

business related Law – mostly the BP layer …

© Dimka Karastoyanova

Choreography

Services

Orchestrations

Service Network

Business Transaction

Page 13: Adaptation of Service-based Systems - KIT

Next:

• Adaptation of SCs: BPEL’n’Aspects

• SBA Adaptation: KPI Violation prediction and Adaptation

• Process Outsourcing – Fragmentation and Coordination

• Flexible Scientific Workflows

© Dimka Karastoyanova

Page 14: Adaptation of Service-based Systems - KIT

BPEL’n’Aspects

• Adaptation of SCs • Control flow change • Reaction to any kind of trigger • Standard-based • Engine extensions needed

© Dimka Karastoyanova

Page 15: Adaptation of Service-based Systems - KIT

BPEL’n’Aspects

Use of the AOP paradigm Insert WSs (aspect) into an SC

(program) as a reaction to event

Aspects are attached to processes

WS invocation before, instead or after activities i.e. control flow changes

Engine publishes process execution events

The dynamic weaving of the activities/WSs is triggered by these events

© Dimka Karastoyanova

Page 16: Adaptation of Service-based Systems - KIT

Aspect as a WS-Policy

© Dimka Karastoyanova

<wsp:PolicyAttachment> <wsp:AppliesTo> <DomainExpression/>+ </wsp:AppliesTo> (<wsp:Policy>...</wsp:Policy> | <wsp:PolicyReference>... </wsp:PolicyReference>)+ </wsp:PolicyAttachment>

<ws:Policy …> <wsp:All> <a4b:Aspect id="...">* <a4b:Advice name="..." compensating="true | false" alwaysCompensate="true | false"?> <wsa:EndpointReference>…

</wsa:EndpointReference> ... </a4b:Advice> <a4b:CompensationAspect aspectId="..."/>? <a4b:Pointcut>... <a4b:ProcessArtifact type=”activity |transitionCondition |...” identifier=”...”/> <a4b:When type= ”before | instead | after”/> </a4b:Pointcut>? </a4b:Aspect> </wsp:All> </ws:Policy>

Page 17: Adaptation of Service-based Systems - KIT

Architecture and Prototype

BPEL Engine Publishes relevant events:

activity status, variable modification, execution of implicit and

explicit CHs

Aspect Management Tool: specify and deploy aspects

© Dimka Karastoyanova

Weaver Weaves in aspects

Audit component Stores execution events

published by the engine Stores variable values at

aspect weaving time needed for later compensation

Page 18: Adaptation of Service-based Systems - KIT

Preventing Violations of KPIs

• Adaptation approach: any • Adaptation trigger: KPI violations • Engine extensions needed • Run time approach

© Dimka Karastoyanova

Page 19: Adaptation of Service-based Systems - KIT

Adaptable and QoS-Aware Service Compositions For service compositions implementing business processes:

Use adaptation as reaction to the changes in QoS parameters of a Service-Based Application

Adaptation trigger: KPI targets are not reached Approach: Analyze the reason for the KPI violation (influential factors) and optimize

through adaptation

Service Composition

KPIs

Modeling

Adaptation Monitoring

Modeling of metrics, KPIs, available adaptation actions etc.

Analysis Runtime monitoring and evaluation of KPIs

Analysis and Prediction of KPI Violations

Adaptation for optimization of process performance

Page 20: Adaptation of Service-based Systems - KIT

Runtime

© Dimka Karastoyanova

Identification of Adaptation

Requirements and Strategies

Adaptation Enactment

KPI Dependency Analysis

Metrics Model

Adaptation Action Model

Runtime KPI Prediction

Checkpoint Model

Checkpoint Model

Monitoring

Selection of an Adaptation

Strategy

Preferences Model

List of alt. Adaptation Strategies

Metric Values

Metric Values

Instance Tree(s)

Adaptation Strategy

Classification Model(s)

Page 21: Adaptation of Service-based Systems - KIT

Modeling

© Dimka Karastoyanova

Page 22: Adaptation of Service-based Systems - KIT

Analysis and Prediction Analyze the influential factors and

explain the KPI target violations (why?):

Explanation model is created using decision tree techniques (machine learning) based on historical process instances (monitoring)

Result is a KPI dependency tree explaining

which metrics (combinations) and

which value ranges of those metrics lead to good or bad KPI values

© Dimka Karastoyanova

Page 23: Adaptation of Service-based Systems - KIT

Analysis and Prediction

Delivery Time Shipment

Delivery Time Supplier

Order In Stock?

Order In Stock?

Delivery Time Supplier

< 2 > 4 2 < x <4

yes no yes no

< 3 > 3 < 1 > 1

green 20/1

green 50

red 20

red 10

red 80/2

green 30

green 5

Delivery Time Shipment

< 2 > 4

green 20/1

Order in Stock = No

2 < x <4

red 10

red 80/2

Instance Tree

Classification Model

Delivery Supplier = 2,0

We want to achieve this path

Try to ensure that “shipment delivery time”

< 2 days

Predict the KPI class while the process instance is still running

Using the prediction model (dependency tree) and runtime information /measured metrics

Result: an instance tree showing the KPI classes in relation to characterizing metrics of adaptable entities shows which adaptation actions are needed

Page 24: Adaptation of Service-based Systems - KIT

Identify Adaptation Actions

© Dimka Karastoyanova

Adaptation Action Type: Service Substitution

Subject: Purchase Order Process: Supplier Service

Impact max del time <= 4 days Model: delivery cost = 10€

availability WS > 0,99 reliability = 0.5

Service: Supplier A *express*

Choose and combine adaptation actions which address adaptation requirements according to their

impact model

Req Id Adaptation Strategy

1

Supplier A *express* AND Shipper 1

Supplier A *express* AND Shipper 2

Supplier A *premium* AND Shipper 2

… …

Id Adaptation Requirement Predicted KPI Classes

1 SuTime<4,5 AND ShTime<3 AND Su=A

Green AND very good

2 SuTime<4,5 AND ShTime<2 AND Su=B

Green AND good

3 SuTime<7,5 AND ShTime<2

AND Su=A

Green AND very good

4 SuTime<7,5 AND ShTime<2

AND Su=B

Green AND good

… … …

Page 25: Adaptation of Service-based Systems - KIT

Architecture of the Prototype

© Dimka Karastoyanova

Process Engine

List

ener

Prediction Dashboard

QoS Monitor

Classifier

Metrics Database

CEP Engine

Monitoring

Chec

k Po

int

List

ener

.

Decision Tree

Prediction

3

3

4

4

Delivery Time Shipment

< 2 > 4

green

2 < x <4

red red

Classification Model

Learner

Strategy Identifier &

Selector

Analysis Database

Adaptation Enactor

Performance Dashboard

Adaptation Dashboard

1

2

2

1

3

5

5 6

Adaptation

1

1

Adaptation Interface

7

Page 26: Adaptation of Service-based Systems - KIT

28

Outsourcing Processes: • Adaptation of SCs • Control flow adaptation, split into

fragments • Trigger: Organizational Adaptation • Design time (and Run time) • Language extension • Engine extension, Coordination

Infrastructure • Standard-based

Page 27: Adaptation of Service-based Systems - KIT

Outsourcing: Splitting Processes

Outsourcing part of a process using the concept of sub-processes Autonomy of sub-processes

29

P P1 P2

Split

Call as sub-process

© Dimka Karastoyanova

Page 28: Adaptation of Service-based Systems - KIT

Splitting a Process to Multiple Organizations Alternatively:

process fragment/partition is outsourced to an organization, each process is performed autonomously

© Dimka Karastoyanova

P

A1 A2 A3

A4 A5 A6

A7 A8 A9

A10

A11 A12

A13

A14

A15

O1 O2 O3

Page 29: Adaptation of Service-based Systems - KIT

Projecting Onto Organizations Step 1: Project process onto

organizations Define partitions/fragments Split control connectors

© Dimka Karastoyanova

A1 A2 A3

A4 A5

A6

A7 A8 A9

A10

A11 A12

A13

A14

P1 P2 P3

A15

O1 O2 O3

Step 2: Wire/connect the processes to model original business logic

O1 O2 O3

A1 A2 A3

A4 A5

A6

A7 A8 A9

A10

A11 A12

A13

A14

A15

P1 P2 P3

Page 30: Adaptation of Service-based Systems - KIT

Step 1: Deriving the Wiring

Splitting Control Links

© Dimka Karastoyanova

O2

A B

A B B’

q

A’ q

Control Signal

O1

L

Split

Page 31: Adaptation of Service-based Systems - KIT

Deriving the Wiring (2)

Splitting Control Links

© Dimka Karastoyanova

O2

A B

A B B’

q

A+ q

O1

L

S

A– FH

trueq

falseq

Scope

Fault Handler, catching “q=0” as join-fault

in=trueq

Page 32: Adaptation of Service-based Systems - KIT

Join Nodes

Splitting Control Links leading to join nodes

© Dimka Karastoyanova

O2

A B

A

B B’

q

A+ q

O1 A–

trueq

falseq

in=trueq

C C’

C+ r

O3 C–

truer

falser

C r

in=truer

j

j

Page 33: Adaptation of Service-based Systems - KIT

Projecting Onto Organizations

© Dimka Karastoyanova

A1 A2 A3

A4 A5

A6

A7 A8 A9

A10

A11 A12

A13

A14

A15

O1 O2 O3

P2 P3

a3 a1

a4

a4 ´ a6

a14 a10

a10 ´

a12 a15

a7 a8

a5

a13

P1

Step 3: Deploy partitions onto infrastructures Wires are split control connectors No changes in standards necessary if no structured activities are split

Page 34: Adaptation of Service-based Systems - KIT

Splitting a Scope

© Dimka Karastoyanova

A

B C

D E

S

O1

O2

A

B

S1

O1

C

D E

S2

O2

split

Coordinator

• C can only start if A completed successfully • If C completed successfully D may only run after S1

completed successfully • DPE: Link CE may be set to false in case S1 detects a fault

(but S2 did not) • S2 may get compensated although no fault occurred at S2 • … Coordination required

Page 35: Adaptation of Service-based Systems - KIT

Flexible Scientific Workflows

• Adaptation of SCs • Control flow change; any available

approach • Reaction to change in simulation

workflow model • Standard-based • Engine extensions needed

© Dimka Karastoyanova

Page 36: Adaptation of Service-based Systems - KIT

Scientific Workflows Scientific experiments/computations/

simulations modeled and executed as workflows

Characteristics: deal with huge amounts of data, are often long-running, usually data driven, can integrate multiple data sources

(i.e. sensors, data bases, file systems, etc.)

Bone Growth Simulation:

Scientific Workflows

© Dimka Karastoyanova

Page 37: Adaptation of Service-based Systems - KIT

SimTech Differences in life cycles: scientific workflows vs. service compositions Goal: enable scientific workflows using the life cycle of SCs

© Dimka Karastoyanova

Phase

User

Legend

Action

Analysis

Scientist

Modeling

Pause

Run/Resume

Execution and Monitoring

Scientist

Deployment

Functions Dimension Adaptation

Logic Dimension Adaptation

Modeling

Adaptation

Analysis

Execution and Monitoring

Page 38: Adaptation of Service-based Systems - KIT

Execution of Partially Specified Processes? Execution of process instances is based on process model The model is considered to be complete by the execution engine

i.e. the instances are terminated after the last activity

© Dimka Karastoyanova

A

B C

E D

F G

H

Initial version of the model

A

B C

E D

F G

H

Subsequent version of the model

Execute instance

I J

A

B C

E D

F G

H

I J

K

Execute instance

Next version

Page 39: Adaptation of Service-based Systems - KIT

Our Approach: Model-as-you-go

© Dimka Karastoyanova

Analysis

Execution and Monitoring

Run/Resume

Modeling

Scientist

Modeling

Suspend

In what workflow life cycle phase we are … What the scientist experiences …

Page 40: Adaptation of Service-based Systems - KIT

Model-as-you-go

© Dimka Karastoyanova

Analysis

Execution and Monitoring

Run/Resume

Modeling

Scientist

Execution and Monitoring

In what workflow life cycle phase we are … What the scientist experiences …

Suspend

Computation is suspended at

this point

Page 41: Adaptation of Service-based Systems - KIT

Model-as-you-go

© Dimka Karastoyanova

Analysis

Execution and Monitoring

Run/Resume

Modeling

Scientist

Modeling

In what workflow life cycle phase we are … What the scientist experiences …

Suspend

Computation is suspended at

this point

Page 42: Adaptation of Service-based Systems - KIT

Model-as-you-go

© Dimka Karastoyanova

Analysis

Execution and Monitoring

Run/Resume

Modeling

Scientist

Execution and Monitoring

In what workflow life cycle phase we are … What the scientist experiences …

Suspend

Computation is suspended at

this point

Page 43: Adaptation of Service-based Systems - KIT

Model-as-you-go

© Dimka Karastoyanova

Analysis

Execution and Monitoring

Run/Resume

Modeling

Scientist

Modeling

In what workflow life cycle phase we are … What the scientist experiences …

Suspend

Computation is suspended at

this point

Page 44: Adaptation of Service-based Systems - KIT

Model-as-you-go – Major Extensions

© Dimka Karastoyanova

All-in-one

Modeling

Monitoring

Execution

Adaptation

1) 2) Execution control 3) Adaptation as modeling experience

4) Iteration 5) Breakpoints 6) History of variable data Var A = 1

Var A = 2

Var A = 2

Failure!

Page 45: Adaptation of Service-based Systems - KIT

© Dimka Karastoyanova

Model-as-you-go Framework

Workflow Engine

Monitoring

Workflow Editor

Modeling

Migration, Versioning, …

Provenance Mining

Process Mining

Pre-Deployment

WSDL Generator DD Generator

Monitor Instance Monitor

Adaptation

Validation Logic Dimension

Functions Dimension

Process Repair

Deployment Strategy

Change Tracking

III Auditing

Provenance EI

ECI Adaptation Interface Deployment Interface

III = Instance Information Interface EI = Event Interface ECI = Execution Control Interface

Breakpoint Registry

Execution Control

Result Display

(run, suspend, resume, (de-)register breakpoints)

Single, integrated tool from user

perspective

Adaptation as modeling

experience

Breakpoints for automatic suspension

Control over workflow execution

Variable history

Component

Model-as-you-go framework

Interaction between components

Page 46: Adaptation of Service-based Systems - KIT

© Dimka Karastoyanova

Adaptation of Service Based Systems and Applications: Relevant for many application domains

Can be carried out on one or more layers of an application / system and

across organizational boundaries

Is complex - consider dependencies to other aspects – data, domain, SBA architecture, triggers, etc.

Still a lot to be done

Future: Coherent cross-layer adaptation

Coherent approach to select adaptation action(s) for a trigger

Choreography adaptation, Cross organizational adaptation, split and merge

Views for different user types (Business Transactions, Service Networks) and their use for adaptation

Summary

Page 47: Adaptation of Service-based Systems - KIT

References NoE S-Cube: http://www.s-cube-network.eu/

Excellence Cluster SimTech: http://www.simtech.uni-stuttgart.de/

IAAS at the University of Stuttgart: http://www.iaas.uni-stuttgart.de/ Wetzstein, Branimir; Zengin, Asli; Kazhamiakin, Raman; Marconi, Annapaoloa; Pistore,

Marco; Karastoyanova, Dimka; Leymann, Frank: Preventing KPI Violations in Business Processes based on Decision Tree Learning and Proactive Runtime Adaptation. In: Journal of Systems Integration, January, 2012.

Guinea, Sam; Kecskemeti, Gabor; Marconi, Annapaola; Wetzstein, Branimir: Multi-layered Monitoring and Adaptation. In Proceedings of ICSOC 2011.

Khalaf, Rania; Leymann, Frank: Coordination for Fragmented Loops and Scopes in a Distributed Business Process. In Proceedings of BPM 2010.

Sonntag, Mirko; Karastoyanova, Dimka: Next Generation Interactive Scientific Experimenting Based On The Workflow Technology. In International Conference on Modelling and Simulation (MS 2010).

Sonntag, Mirko; Karastoyanova, Dimka: Compensation of Adapted Service Orchestration Logic in BPEL’n’Aspects. In Proceedings of BPM 2011.