m-top: multi-target operator placement of query graphs for data streams nazario cipriani, oliver...

45
M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21. September 2011

Upload: rey-orme

Post on 28-Mar-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

M-TOP: Multi-Target Operator Placementof Query Graphs for Data Streams

Nazario Cipriani, Oliver Schiller, Bernhard Mitschang

IDEAS 2011 – Lisbon, 21. September 2011

Page 2: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Sample Scenario – Distributed Visualization Pipeline

Interpolator:Interpolates the

Velocity Field

Window Tracker:Tracks the

Window States

Fluid Solver:Calcutales theVector Field

Rendering:Project Primitives,

Rasterize Primitives

Mobile Client:

Display Images

Sources Operators Sinks

Update Orientation

Update User LocationPosition Tracker:

Tracks the Positionsof the Mobile Objects

Update Mobile Objects

Update Window States

CalculateStream Lines:Stream Lines

Calculation

CalculateStream Ribbons:Stream Ribbons

Calculation

Environment:Provides Data for

Environment

CalculateMagnitude:

Calculates theVelocity Magnitude

Distribute:Seeds the Stream

Lines StartingPositions

Desktop Computer:

Display Images

Rendering:Project Primitives,

Rasterize Primitives

Update Orientation

2

Page 3: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Sample Scenario – Distributed Visualization Pipeline

Interpolator:Interpolates the

Velocity Field

Window Tracker:Tracks the

Window States

Fluid Solver:Calcutales theVector Field

Rendering:Project Primitives,

Rasterize Primitives

Mobile Client:

Display Images

Sources Operators Sinks

Update Orientation

Update User LocationPosition Tracker:

Tracks the Positionsof the Mobile Objects

Update Mobile Objects

Update Window States

CalculateStream Lines:Stream Lines

Calculation

CalculateStream Ribbons:Stream Ribbons

Calculation

Environment:Provides Data for

Environment

CalculateMagnitude:

Calculates theVelocity Magnitude

Distribute:Seeds the Stream

Lines StartingPositions

Desktop Computer:

Display Images

Rendering:Project Primitives,

Rasterize Primitives

Update Orientation

3

Page 4: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

There are More Sample Scenarios…

Navigation application considering current position of mobile objects

Online trajectory compression on mobile devices

Tourist information guide

4

Page 5: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Operator Placement Problem

Static Data 2

Sensor1 Sensor2

Static Data 1

5

Page 6: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Operator Placement Problem

Static Data 2

Sensor1 Sensor2

Static Data 1

Query Document

Page 7: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Operator Placement Problem

Static Data 2

Sensor1 Sensor2

Static Data 1

Pinned operators

Page 8: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Operator Placement Problem

Static Data 2

Sensor1 Sensor2

Static Data 1

Page 9: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Operator Placement Problem

Static Data 2

Sensor1 Sensor2

Static Data 1

Page 10: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Operator Placement Problem

Static Data 2

Sensor1 Sensor2

Static Data 1

But: Placement is NP-Complete!

Approximation!

Page 11: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Agenda

Multi-Target Operator Placement Problem

Classification of Placement Strategies

M-TOP Approach

Evaluation

Conclusion and Future Work

Page 12: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Customer (c) Bandwidth

> 500 kbit

Cost No costs

Customer (b) Bandwidth

> 1 Mbit

Latency < 2 s

Cost < 1 Unit

Multi-Target Operator Placement Problem – Domain-specific Requirements

Customer (a) Bandwidth

> 10 Mbit

Latency <= 500 ms

12

Page 13: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Customer (c) Bandwidth

> 500 kbit

Cost No costs

Customer (b) Bandwidth

> 1 Mbit

Latency < 2 s

Cost < 1 Unit

Multi-Target Operator Placement Problem – Domain-specific Requirements

Customer (a) Bandwidth

> 10 Mbit

Latency <= 500 ms

13

Multi-Target Operator Placement Problem!

Different requirements for placement decision!

Page 14: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Multi-Target Operator Placement Problem – But What to Do?

14

O4O2

Q1

Q2O1

O3 S1

Bandwidth > 10 Mbit

Latency <= 500 ms

Page 15: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Multi-Target Operator Placement Problem – But What to Do?

15

Q2

O1

O2

S1

O4

O3Q1

Q2 O1

O2

S1

O4

O3Q1

?

Bandwidth > 10 Mbit

Latency <= 500 ms

O4O2

Q1

Q2O1

O3 S1

Optimize Bandwidth?

Optimize Latency?

Page 16: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

A Classification of Existing Placement Strategies

16

Operator Placement

TargetsSystem Load Aurora, MedusaLatency SBON, Rizou et al.

single target multi target

fixed variable

Decision Making Decision Making

Cost + Delay Mariposa

a priori a posteriori

Latency + Bandwidth Bonfils et al.Latency + Network Load Rizou et al.

a priori

Metaheuristic Search E.g.: Tabu Search,

Sinnulated Annealing

QoS-aware Placement M-TOP

Bandwidth SAND/BorealisOperator Importance ACES

Latency + System Load Zhou et al.Processing + Transmission + Storage Ying et al.

a posteriori

Page 17: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

A Classification of Existing Placement Strategies

17

Operator Placement

TargetsSystem Load Aurora, MedusaLatency SBON, Rizou et al.

single target multi target

fixed variable

Decision Making Decision Making

Cost + Delay Mariposa

a priori a posteriori

Latency + Bandwidth Bonfils et al.Latency + Network Load Rizou et al.

a priori

Metaheuristic Search E.g.: Tabu Search,

Sinnulated Annealing

QoS-aware Placement M-TOP

Bandwidth SAND/BorealisOperator Importance ACES

Latency + System Load Zhou et al.Processing + Transmission + Storage Ying et al.

a posteriori

Multi-target operator placement with variable

targets and a priori decision making

Page 18: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Target Definition

18

Query graph developers provide target specifications

Example QoS-Targets specification

bottleneck condition

relative importance

rank scheme

Target – Bandwidth

(500kBit - 50% - Max)

Page 19: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Runtime Statistics

QoS-Statistics include Bandwidth, Latency, Reliability, …

Collected during execution of operators

Node–Node QoS-statistics Describe link performance between nodes

Node–Operator QoS-statistics Describe node performance executing a certain operator

Characteristic diagram of QoS-statistics as fixed length time series Describe the expected probabilities for a certain value w.r.t. QoS-statistics Lookup returns min, avg, and max value as well as the characteristic diagram

19

Operators

QoS

Nodes

Nodes

Page 20: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach

20

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

Page 21: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Conflation

21

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

Conflation

Page 22: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Conflation

22

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

ConflationReduce

number of operators to

place!

Page 23: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach

23

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

Page 24: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Early Prune and Graph Assembly

24

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

Eliminated by Early Prune

Page 25: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Execution ofQuery Graph

The M-TOP Approach – Early Prune and Graph Assembly

25

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

MergeOperators

NodePreselection

Statistics

Eliminated by Graph Assembly

Eliminated by Early Prune

Execution ofQuery Graph

bottleneck conditionrelative importance

rank scheme

Target – Bandwidth

(500kBit - 50% - Max)

Page 26: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Early Prune and Graph Assembly

26

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

Eliminated by Graph Assembly

Eliminated by Early Prune

Reduce number of

nodes!

Page 27: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach

27

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

Page 28: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Ranking

28

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

bottleneck condition

relative importance

rank scheme

Target – Bandwidth(500kBit - 50% - Max)

Rank value 0.75

Rank value 0.6

Page 29: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Ranking

29

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

bottleneck condition

relative importance

rank scheme

Target – Bandwidth(500kBit - 50% - Max)

Rank value 0.75

Rank value 0.6

Bring to front

candidates by scoring

value!

Page 30: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach

30

Conflation

Early Prune

Graph Assembly

Ranking

Mapping

Execution

Find EdgesBetween Nodes

Rank Nodes And Edges

Map Operatorsto Nodes

Execution ofQuery Graph

MergeOperators

NodePreselection

Statistics

Page 31: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Mapping

By modeling the Mapping Problem as CSP instance NP-formalisms are applicable

Use a meta heuristic to solve the complex problem Genetic Algorithm (GA) but also other methods (Backtracking, …) are possible

Reason: Computationally too expensive to calculate all possibilities and pick best solution

A Genetic Algorithm (GA) is inspired by the Darwinian law that the fittest individuals (or solutions) have higher probability to survive than others

E.g., fitter ones can better adapt to changing conditions

31

Page 32: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Mapping as Genetic Algorithm

Loop until termination condition is true Maximum number m of iterations reached or best solution did not change

over last k steps

32

Page 33: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Mapping as Genetic Algorithm

Loop until termination condition is true Maximum number m of iterations reached or best solution did not change

over last k steps

Step1: Assign fitness values to individuals Corresponds to the objective function for the mapping step with additional

constraints

33

Page 34: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Mapping as Genetic Algorithm

Loop until termination condition is true Maximum number m of iterations reached or best solution did not change

over last k steps

Step1: Assign fitness values to individuals Corresponds to the objective function for the mapping step with additional

constraints

34

Page 35: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Mapping as Genetic Algorithm

Loop until termination condition is true Maximum number m of iterations reached or best solution did not change

over last k steps

Step1: Assign fitness values to individuals Corresponds to the objective function for the mapping step with additional

constraints

Step2: Select individuals for recombination and mutation Step3: Recombine and mutate individuals

35

Page 36: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Loop until termination condition is true Maximum number m of iterations reached or best solution did not change

over last k steps

Step1: Assign fitness values to individuals Corresponds to the objective function for the mapping step with additional

constraints

Step2: Select individuals for recombination and mutation Step3: Recombine and mutate individuals

The M-TOP Approach – Mapping as Genetic Algorithm

36

potentialrecombination points

Page 37: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Mapping as Genetic Algorithm

Loop until termination condition is true Maximum number m of iterations reached or best solution did not change

over last k steps

Step1: Assign fitness values to individuals Corresponds to the objective function for the mapping step with additional

constraints

Step2: Select individuals for recombination and mutation Step3: Recombine and mutate individuals Step4: Store fittest individuals, go to Step1 if term. condition is false

Return the fittest (the best) individual

37

Page 38: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

The M-TOP Approach – Mapping as Genetic Algorithm

Loop until termination condition is true Maximum number m of iterations reached or best solution did not change

over last k steps

Step1: Assign fitness values to individuals Corresponds to the objective function for the mapping step with additional

constraints

Step2: Select individuals for recombination and mutation Step3: Recombine and mutate individuals Step4: Store fittest individuals, go to Step1 if term. condition is false

Return the fittest (the best) individual

38

Mapping

Page 39: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Evaluation – Runtime Measurements

39

Page 40: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Evaluation – Runtime Measurements – Mapping

40

Runtime:much faster than simply probing

Page 41: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Evaluation – Runtime Measurements – Mapping

41

Runtime:much faster than simply probing

Objective value:approximation works well (maybe better for bigger

candidate node cardinalities)

Page 42: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Evaluation – Runtime Measurements – Mapping

42

Runtime:much faster than simply probing

Objective value:approximation works well (maybe better for bigger

candidate node cardinalities)

Additive QoS:approximation and best

latency possible not far-off

Page 43: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Evaluation – Runtime Measurements – Mapping

43

Runtime:much faster than simply probing

Objective value:approximation works well (maybe better for bigger

candidate node cardinalities)

Additive QoS:approximation and best

latency possible not far-off

M-TOP achieves approx. 90%-95%

of optimal solution.

Page 44: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Conclusion and Future Work

Multi-target operator placement with variable targets and a priori decision making

Specify placement requirements in terms of QoS-targets Bottleneck condition, relative importance, rank scheme

To find possible solutions M-TOP adopts a meta-heuristic in form of a GA to sample the search space

Future work include Consider already running query graphs, adapt to changing conditions (e.g.,

operator migration)

44

Page 45: M-TOP: Multi-Target Operator Placement of Query Graphs for Data Streams Nazario Cipriani, Oliver Schiller, Bernhard Mitschang IDEAS 2011 – Lisbon, 21

Universität StuttgartSFB 627

Finish… And Flowers for You!

45