Building Dynamic Models of Service Compositions With Simulation of - - PowerPoint PPT Presentation

building dynamic models of service compositions with
SMART_READER_LITE
LIVE PREVIEW

Building Dynamic Models of Service Compositions With Simulation of - - PowerPoint PPT Presentation

Building Dynamic Models of Service Compositions With Simulation of Provision Resources Dragan Ivanovi 1 , Martin Treiber 2 , Manuel Carro 1 , Schahram Dustdar 2 1 Universidad Politcnica de Madrid 2 Technische Universitt Wien S-Cube Network


slide-1
SLIDE 1

Building Dynamic Models of Service Compositions With Simulation of Provision Resources

Dragan Ivanović1, Martin Treiber2, Manuel Carro1, Schahram Dustdar2

1Universidad Politécnica de Madrid 2Technische Universität Wien

S-Cube Network of Excellence – 7th Framework Program EU

ER 2010 Vancouver, Canada November 3, 2010

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 1 / 16

slide-2
SLIDE 2

Web Services and Service Compositions

Web Services are software components that expose their interfaces to service clients in a standards-based and platform-independent manner.

◮ XML messages, typed by XML schema definitions. ◮ Interfaces (ports, operations) abstractly described using WSDL. ◮ Message transport using SOAP/HTTP. ◮ Security, addressing, policies... ◮ But also: RESTful services, Human-Provided Services (HPS).

Service Compositions can be used to put together several (specialized) services in order to achieve more complex tasks.

◮ Also exposed as services to the outside world: composability. ◮ Usually designed around the notion of business processes. ◮ Potentially long running – possibly for hours, days. ◮ Cross organizational boundaries – loose coupling. ◮ Events, asynchronous exchanges, stateful conversations. ◮ Usually expressed in a specialized language: BPEL, YAWL, etc. ◮ Choreography (global view) vs. orchestration (control passing). Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 2 / 16

slide-3
SLIDE 3

QoS and SLA

Quality of Service (QoS) describes (mostly non-functional) properties of Web services and their compositions such as:

◮ running time, ◮ cost, ◮ availability, ◮ user experience, ◮ security/privacy, etc.

Expressed as: expected values, ranges, data (in)dependent. Service-Level Agreements (SLAs) define constraints on values of QoS attributes that the provider and the client are expected to comply with. Aspects of QoS/SLA specifications include:

◮ Definition: reference models, definition language. ◮ Assurance: prediction, proactive QoS-driven adaptation. ◮ Negotiation: contract establishment, variation, agreement. Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 3 / 16

slide-4
SLIDE 4

QoS-Driven Adaptation

Service adaptation can be used for introducing change on the provider’s side to meet some objectives — e.g. target QoS.

◮ Adapting process definitions: changing the logic. ◮ Selecting components/fragments: based on QoS values. ◮ Adjusting provision infrastructure: policies for up- and

down-scaling computation and communication resources.

From the client perspective, attributing QoS to logic, components and/or infrastructure resources is hard. Providers normally include some way of ensuring elasticity of provision resources to meet demand: different scenarios for load/request rates.

Goal

Develop dynamic (time-dependent) simulation models of service provision with QoS attributes, taking into account characteristics of the particular composition being served.

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 4 / 16

slide-5
SLIDE 5

Orchestration Modeling

Here we use (connected) place-transition networks (PT-nets or Petri Nets), which are well understood and widely used in workflow modeling.

◮ In reality, we ask for stricter

constraints w.r.t. the shape of the net.

Places (circles) stand for conditions in workflow execution (including start and finish). Tokens (dots) denote running instances and mark places.

!" #" !$ #$ !% #% !&

/617-6,

Transitions (squares) stand for workflow activities and fire when all input places (preconditions) are marked (stochastic choice). A step through a PT-net involves firing all transitions that can fire, and moving the corresponding tokens to new places.

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 5 / 16

slide-6
SLIDE 6

Places, Transitions vs. Flows, Stocks

The basic PT-nets oversimplify behavior because transition times are not taken into account (only discrete steps). In reality, transitions (activities) take definite time, while tokens (orchestration instances) do not stay in places for significant periods of time. To recover that dynamics, we use continuous-time models.

◮ Transitions are represented by stocks that measure the number of

instances of the activity at any moment of time.

◮ Places are represented as flows to and from the activity stock, and

measure the number of instances per second passing through.

Stock (S) Inflow (fi) Outflow (fo) Initial Stock (S0) S|t=0 = S0, d

dt S = fi − fo ⇔ S = S0 +

t

0(fi − fo)dt

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 6 / 16

slide-7
SLIDE 7

Conceptual Continuous-Time Model

This brings us to the conceptual orchestration continuous-time model (OCT model).

Variable Activity Var net rate activity id Rate Var place id is parameter? Quantity name value Aggregation aggregate op * 2..* OCT Model process def 1 * CCT Model composition def * 1..* Connection 1 * * 1 * 1

Choreography continuous-time models (CCT) add an aggregate view of several compositions working together.

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 7 / 16

slide-8
SLIDE 8

Overview of the Approach

Abstract BPEL Exec. BPEL YAWL

Workflow Definition

Monitoring Data

Petri Net Model

Dynamic Workflow Model Provision Resource Model

QoS Estimates What-If Analysis Policy Testing Sensitivity etc.

Simulation

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 8 / 16

slide-9
SLIDE 9

Automatic CT-Model Derivation

The CT scheme for a place is simple: non-input places aggregate

  • utputs from one or more activities.

··· p p(t) = ∑m∈•p{om(t)}

It is a bit more complex for transitions with several input places.

··· m

  • m

mp(t): a new stock ∀p ∈ •m qt = argminp∈•m{mp(t)} m(t) = mqt(t)

d dt mp(t) = p(t)wpm −om(t), ∀p ∈ •m

  • m(t) =
  • m(t)/Tm

Tm > 0 qt(t)wqtm Tm = 0

Luckily, the model derivation process can be fully automated.

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 9 / 16

slide-10
SLIDE 10

Composability

We can easily model asynchronous message exchange between services:

··· As sA Ae rA ··· Ar

We can “open” the transition boxes that represent component or partner services and interpolate their CT-models. To account for failures, we can introduce failure probabilities, and a common failure sink.

··· m ··· m 1−φm Φ φm ⇒ Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 10 / 16

slide-11
SLIDE 11

Example

Format Service Check Service Calibration Service Data Checker Service Storage Service Add Service Search Service HPS Machine Service hit no hit multiple hits no hit hit condition Service invoke Logging Service Loop Parallel Execution precision not ok Service Service

pin A

Formatter service

p1

AND-split

p2 p3 C

Search Service

p4 E

Check Service

w4mh p5 F

Calibration Service

w5p w5nh p6 w4nh w4h G

Add Service

w5h p7

AND-join (J)

B

Log Service

p8 p9 H

Storage Service

pout

d dt A(t) = pin(t)− p1(t)

  • F(t) = F(t)/TF

p1(t) = A(t)/TA p6(t) = p4(t)w4nh + p5(t)w5nh p2(t) = p1(t) d dt G(t) = p6(t)−oG(t) d dt B(t) = p2(t)− p8(t)

  • G(t) = G(t)/TG

p8(t) = B(t)/TB p7(t) = p4(t)w4h +oG(t)+ p5(t)w5h p3(t) = p1(t)+oF(t) d dt Jp8(t) = p8(t)− p9(t) d dt C(t) = p3(t)− p4(t) d dt Jp7(t) = p7(t)− p9(t) p4(t) = C(t)/TC d dt E(t) = p4(t)w4mh − p5(t) p9(t) =

  • p8(t)

Jp8(t) ≤ Jp7(t) p7(t) Jp7(t) < Jp8(t) p5(t) = E(t)/TE d dt H(t) = p9(t)− pout(t) d dt F(t) = p5(t)w5p −oF(t) pout(t) = H(t)/TH

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 11 / 16

slide-12
SLIDE 12

Framework Model

We plug the OCT model into a modeling framework.

R Incoming Requests i E Rejects e = R/Te Te S Successful finishes pout F Failures pfail OCT Model Resource Model Tin β pin = β ·R/Tin S Successful finishes pout F Failures pfail

The resource model uses the aggregations from the OCT model to model provision infrastructure capacity and load.

◮ The blocking factor (β) quenches the request inflow when

capacities are exceeded.

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 12 / 16

slide-13
SLIDE 13

Model Simulation

The framework simulation model can be fed to a standard dynamic simulation tool: Simulating a set of concurrently served orchestrations under different input regimes. Running time and reliability QoS “for free”, others like cost easily derivable. Typical simulations: what-if, goal-seek, sensitivity.

◮ We are working on a custom simulation tool that is better tailored

for the service setting.

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 13 / 16

slide-14
SLIDE 14

Sample Results

We have applied the automatically derived OCT to a number of sample PT-nets and observed good fitting between the model

  • utput (median times) and results of discrete simulations.

We have also run experiments with the sample orchestration (involving parallel flows and multiple branches), again with good correspondence between the model output and the empiric data.

◮ Using simplified exponential

decay for transition running times.

◮ Calibration of the model

with empirical data is crucial.

  • Ivanović, Treiber et al. (UPM, TUW, S-Cube)

Dynamic Models of Service Compositions 2010-11-03 14 / 16

slide-15
SLIDE 15

Conclusions

Automatically derived dynamic models of service orchestrations with provision resources can be used as a handy tool for testing scenarios, assessing expected QoS and infrastructure management policies. Working on integration with tools for automatic derivation of PT-net models from executable orchestration specs. Aiming on modeling elasticity in cloud infrastructures. Challenge: cover other, more advanced and data-gnostic service composition descriptions e.g.:.

◮ Concrete abstract and executable process specifications (e.g.,

BPEL)

◮ Colored Petri-nets ◮ other formalisms Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 15 / 16

slide-16
SLIDE 16

Building Dynamic Models of Service Compositions With Simulation of Provision Resources

Dragan Ivanović1, Martin Treiber2, Manuel Carro1, Schahram Dustdar2

1Universidad Politécnica de Madrid 2Technische Universität Wien

S-Cube Network of Excellence – 7th Framework Program EU

ER 2010 Vancouver, Canada November 3, 2010

Ivanović, Treiber et al. (UPM, TUW, S-Cube) Dynamic Models of Service Compositions 2010-11-03 16 / 16