The Operator Placement Problem G. Cugola E. Della - - PowerPoint PPT Presentation

the operator placement problem
SMART_READER_LITE
LIVE PREVIEW

The Operator Placement Problem G. Cugola E. Della - - PowerPoint PPT Presentation

Stream and Complex Event Processing The Operator Placement Problem G. Cugola E. Della Valle A. Margara Politecnico di


slide-1
SLIDE 1

Stream ¡and ¡Complex ¡Event ¡Processing ¡

The ¡Operator ¡Placement ¡Problem ¡

  • G. ¡Cugola ¡ ¡ ¡ ¡E. ¡Della ¡Valle ¡

¡ ¡ ¡A. ¡Margara ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡Politecnico ¡di ¡Milano ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Vrije ¡Universiteit ¡Amsterdam ¡

cugola@elet.polimi.it a.margara@vu.nl dellavalle@elet.polimi.it

slide-2
SLIDE 2

Deployment ¡model ¡

Centralized ¡ Distributed ¡ Clustered ¡ Networked ¡

Sources ¡ IFP ¡Engine ¡

Informa3on ¡Flows ¡ Informa3on ¡Flows ¡

  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡ Rules ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡

Rule ¡managers ¡

Sinks ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 2 ¡

slide-3
SLIDE 3

Why ¡Going ¡Distributed? ¡

  • More ¡processing ¡power ¡
  • Current ¡algorithms ¡already ¡very ¡efficient ¡but ¡… ¡
  • … ¡certain ¡computaOons ¡may ¡sOll ¡introduce ¡

boPlenecks ¡

  • Complex ¡aggregaOons ¡
  • Background ¡“Big” ¡Data ¡

– Access ¡to ¡slow ¡storage ¡(disk, ¡distributed ¡file ¡system, ¡DB) ¡ – Processing ¡required ¡on ¡background ¡data ¡ » E.g., ¡reasoning ¡(extract ¡implicit ¡knowledge ¡from ¡explicit ¡ informaOon) ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 3 ¡

slide-4
SLIDE 4

Why ¡Going ¡Distributed? ¡

  • Scalability ¡
  • Scale ¡on ¡the ¡number ¡of ¡rules ¡
  • Different ¡rules ¡on ¡different ¡machines ¡
  • Scale ¡on ¡the ¡number ¡of ¡connecOons ¡
  • Sources ¡and ¡sinks ¡
  • One ¡machine ¡can ¡(efficiently) ¡support ¡only ¡a ¡limited ¡

number ¡of ¡open ¡connecOons ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 4 ¡

slide-5
SLIDE 5

Why ¡Going ¡Distributed? ¡

  • Heterogeneous ¡hardware ¡
  • Accelerators ¡
  • Many-­‑core ¡hardware ¡
  • GP-­‑GPUs ¡
  • FPGAs ¡
  • Exploit ¡them! ¡
  • Resource-­‑constrained ¡nodes ¡
  • Sensors ¡
  • Mobile ¡devices ¡
  • Offload ¡(only ¡part ¡of ¡the) ¡computaOon! ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 5 ¡

slide-6
SLIDE 6

Why ¡Going ¡Distributed? ¡

  • Because ¡we ¡are ¡in ¡a ¡distributed ¡scenario ¡
  • Distributed ¡sources ¡
  • Distributed ¡sinks ¡
  • Distributed ¡background ¡knowledge ¡
  • Forwarders ¡
  • Network ¡can ¡be ¡the ¡scarce ¡resource ¡
  • Bandwidth ¡
  • Delay ¡
  • E.g., ¡high ¡frequency ¡traders ¡locate ¡their ¡machine ¡

close ¡to ¡the ¡sources ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 6 ¡

slide-7
SLIDE 7

How ¡to ¡Distribute? ¡An ¡Open ¡Problem ¡

  • Most ¡exisOng ¡systems ¡adopt ¡a ¡centralized ¡

soluOon ¡

  • When ¡distributed ¡processing ¡is ¡allowed, ¡it ¡is ¡

usually ¡based ¡on ¡clustered ¡soluOons ¡

  • Like ¡Google ¡
  • But ¡on ¡streaming ¡data… ¡
  • A ¡few ¡systems ¡have ¡recognized ¡the ¡importance ¡of ¡

networked ¡deployment ¡for ¡some ¡applicaOons ¡

  • In ¡most ¡cases, ¡deployment/configuraOon ¡is ¡not ¡

automaOc ¡

  • E.g., ¡Microsog ¡StreamInsight ¡ ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 7 ¡

slide-8
SLIDE 8

How ¡to ¡Distribute? ¡The ¡Goals ¡

  • Event-­‑based ¡communicaOon ¡in ¡mulO-­‑sites ¡/ ¡

mulO-­‑companies ¡environments ¡

  • Goal: ¡Reduce ¡inter-­‑company ¡communicaOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 8 ¡

slide-9
SLIDE 9

How ¡to ¡Distribute? ¡The ¡Goals ¡

  • Wireless ¡Sensor ¡Networks ¡/ ¡Mobile ¡Ad-­‑hoc ¡

Networks ¡

  • Goal: ¡Reduce ¡communicaOon ¡(and ¡power ¡

consumpOon!) ¡through ¡in-­‑network ¡filtering ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 9 ¡

slide-10
SLIDE 10

How ¡to ¡Distribute? ¡The ¡Goals ¡

  • Cloud ¡based ¡deployments ¡
  • Goal: ¡BePer ¡task ¡allocaOon ¡to ¡reduce ¡the ¡number ¡
  • f ¡machines ¡to ¡buy ¡(and ¡pay!) ¡
  • Goal: ¡Reduce ¡processing ¡Ome ¡(no ¡processing/

communicaOon ¡boPlenecks!) ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 10 ¡

slide-11
SLIDE 11

The ¡Problem ¡

  • Enable ¡users ¡to ¡maximize ¡the ¡performance ¡of ¡

the ¡system ¡(QoS) ¡

  • Minimize ¡communicaOon ¡costs ¡
  • Minimize ¡end-­‑to-­‑end ¡latency ¡
  • Maximize ¡resources ¡uOlizaOon ¡
  • … ¡
  • By ¡exploiOng ¡some ¡properOes ¡of ¡the ¡

distributed ¡system ¡

  • Locality ¡
  • Special ¡Hardware ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 11 ¡

slide-12
SLIDE 12

The ¡SoluOon: ¡Operator ¡Placement ¡

  • Input ¡
  • Logical ¡execuOon ¡plan ¡for ¡queries/rules ¡
  • Sources, ¡Sinks, ¡Operators ¡
  • Physical ¡topology ¡of ¡the ¡network ¡of ¡processing ¡

nodes ¡

  • Set ¡of ¡constraints ¡
  • Processing ¡capabiliOes, ¡special ¡hardware, ¡security, ¡

“pinned” ¡operators ¡

  • Measures ¡or ¡esOmates ¡of ¡availability ¡and ¡demand ¡
  • Input/Output ¡message ¡rate, ¡CPU/memory ¡

consumpOon, ¡… ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 12 ¡

slide-13
SLIDE 13

The ¡SoluOon: ¡Operator ¡Placement ¡

  • Output: ¡
  • Assignment ¡of ¡operators ¡to ¡nodes ¡
  • SaOsfying ¡the ¡constraints ¡
  • APempOng ¡to ¡opOmize ¡some ¡objecOve ¡funcOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 13 ¡

slide-14
SLIDE 14

Operator ¡Placement ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 14 ¡

slide-15
SLIDE 15

Operator ¡Placement ¡

  • Several ¡proposals ¡
  • Different ¡techniques ¡
  • Different ¡objecOve ¡funcOons ¡
  • Designed ¡for ¡different ¡environments ¡
  • Difficult ¡to ¡compare ¡
  • Impossible ¡to ¡compute ¡the ¡opOmum ¡soluOon ¡in ¡

real ¡cases ¡

  • Even ¡in ¡its ¡simplest ¡form, ¡the ¡problem ¡is ¡NP-­‑hard ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 15 ¡

slide-16
SLIDE 16

Complexity ¡

  • Very ¡simple ¡instance ¡of ¡

the ¡problem ¡

  • Pure ¡publish/subscribe ¡
  • No ¡intermediate ¡operators ¡
  • One ¡single ¡source ¡

(publisher) ¡

  • MulOple ¡sinks ¡(subscribers) ¡
  • Fixed ¡cost ¡for ¡moving ¡an ¡

event ¡through ¡link ¡L: ¡cL ¡

  • Minimize ¡the ¡overall ¡cost ¡

for ¡moving ¡events ¡from ¡the ¡ source ¡to ¡the ¡sinks ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 16 ¡

slide-17
SLIDE 17

Complexity ¡

  • Solving ¡this ¡problem ¡is ¡equivalent ¡to ¡solving ¡

the ¡Steiner ¡Tree ¡problem ¡

  • Ogen, ¡we ¡need ¡to ¡take ¡into ¡account ¡more ¡

constraints ¡

  • Node ¡processing ¡capaciOes ¡
  • Node ¡connecOons ¡capabiliOes ¡
  • Link ¡bandwidth ¡
  • MulOple ¡rules ¡
  • Share ¡operators? ¡
  • Replicate ¡operators ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 17 ¡

slide-18
SLIDE 18

Outline ¡

  • Taxonomy ¡of ¡operator ¡placement ¡algorithms ¡
  • Based ¡on ¡“Placement ¡Strategies ¡for ¡Internet-­‑Scale ¡

Data ¡Stream ¡Systems” ¡by ¡Lakshmanan ¡et ¡al, ¡2008 ¡

  • Present ¡two ¡algorithms ¡in ¡detail ¡
  • “Network-­‑aware ¡operator ¡placement ¡for ¡stream-­‑

processing ¡systems” ¡by ¡Pietzuch ¡et ¡al, ¡2006 ¡

  • “Deployment ¡strategies ¡for ¡distributed ¡Complex ¡

Event ¡Processing” ¡by ¡Cugola ¡and ¡Margara, ¡2013 ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 18 ¡

slide-19
SLIDE 19

Taxonomy ¡

slide-20
SLIDE 20

Operator ¡Placement ¡

Operator ¡ Placement ¡

Goal ¡/ ¡ Metrics ¡ Algorithm ¡ Structure ¡ Architecture ¡ Operator ¡ ReplicaOon ¡ User-­‑defined ¡ QOS ¡ Heterogeneous ¡ Resources ¡ Rule ¡ RewriOng ¡ Lead ¡ Shedding ¡ Operator ¡ Reuse ¡ ReconfiguraOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 20 ¡

slide-21
SLIDE 21

Operator ¡Placement ¡

Operator ¡ Placement ¡

Goal ¡/ ¡ Metrics ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 21 ¡

slide-22
SLIDE 22

Goal ¡/ ¡Metrics ¡

  • Load ¡
  • Aggregate ¡CPU ¡usage ¡of ¡all ¡the ¡operators ¡

deployed ¡in ¡each ¡node ¡

  • Different ¡variants ¡
  • Minimize ¡average ¡load ¡
  • Minimize ¡maximum ¡load ¡(avoid/limit ¡boPlenecks) ¡
  • Minimize ¡load ¡variance ¡(avoid/limit ¡bursts) ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 22 ¡

slide-23
SLIDE 23

Goal ¡/ ¡Metrics ¡

  • Latency ¡
  • Different ¡variants ¡
  • Minimize ¡average ¡latency ¡
  • Minimize ¡maximum ¡latency ¡
  • Minimize ¡latency ¡for ¡“important” ¡events ¡
  • Bandwidth ¡
  • Minimize ¡resource ¡uOlizaOon ¡of ¡link ¡bandwidth ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 23 ¡

slide-24
SLIDE 24

Goal ¡/ ¡Metrics ¡

  • Latency ¡and ¡Load ¡
  • IniOal ¡placement ¡
  • Based ¡on ¡network ¡cost ¡(latency) ¡
  • Load-­‑balancing ¡strategy ¡
  • To ¡adapt ¡to ¡changes ¡in ¡data ¡and ¡resource ¡condiOons ¡
  • Latency ¡and ¡Bandwidth ¡
  • Minimize ¡network ¡usage ¡u ¡= ¡∑ ¡DR(L)*Lat(L) ¡
  • Tolerates ¡paths ¡with ¡addiOonal ¡latency ¡
  • If ¡they ¡reduce ¡the ¡overall ¡stream ¡bandwidth ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 24 ¡

slide-25
SLIDE 25

Operator ¡Placement ¡

Operator ¡ Placement ¡

Heterogeneous ¡ Resources ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 25 ¡

slide-26
SLIDE 26

Heterogeneous ¡Resources ¡

  • AddiOonal ¡constraints ¡
  • SaOsfy ¡deployment ¡of ¡operators ¡on ¡machines ¡with ¡

suitable ¡hardware ¡for ¡supporOng ¡them ¡

  • Opportunity ¡
  • Presence ¡of ¡accelerators ¡
  • Possibility ¡to ¡speed-­‑up ¡specific ¡instrucOons/
  • perators ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 26 ¡

slide-27
SLIDE 27

Operator ¡Placement ¡

Operator ¡ Placement ¡

User-­‑defined ¡ QOS ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 27 ¡

slide-28
SLIDE 28

User-­‑Defined ¡QoS ¡

  • Operator ¡importance ¡
  • User-­‑defined ¡priority ¡(weight) ¡
  • Operator ¡level, ¡query ¡level ¡
  • Maximize ¡the ¡weighted ¡throughput ¡
  • AddiOonal ¡constraints ¡
  • Desired ¡throughput ¡
  • Maximum ¡latency ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 28 ¡

slide-29
SLIDE 29

Operator ¡Placement ¡

Operator ¡ Placement ¡

Architecture ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 29 ¡

slide-30
SLIDE 30

Architecture ¡

  • Sogware ¡implementaOon ¡that ¡executes ¡

placement ¡decisions ¡

Architecture ¡ Independent ¡ Integrated ¡ Hybrid ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 30 ¡

slide-31
SLIDE 31

Architecture ¡

  • Independent ¡placement ¡module ¡
  • Requires ¡constant ¡updates ¡on ¡the ¡condiOon ¡of ¡

networks ¡and ¡nodes ¡

  • Reduces ¡computaOon ¡at ¡nodes ¡
  • Increases ¡communicaOon ¡requirements ¡
  • Frequency ¡of ¡updates ¡may ¡impact ¡on ¡response ¡

Ome ¡in ¡presence ¡of ¡dynamic ¡changes ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 31 ¡

slide-32
SLIDE 32

Architecture ¡

  • Integrated ¡placement ¡decision ¡logic ¡
  • Implemented ¡locally ¡at ¡each ¡node ¡
  • Ogen ¡associated ¡with ¡distributed ¡algorithms ¡
  • Consider ¡only ¡local ¡informaOon ¡
  • Reduces ¡communicaOon ¡requirements ¡
  • ReacOve ¡to ¡sudden ¡changes ¡in ¡network ¡condiOons ¡
  • Hybrid ¡
  • IniOal ¡/ ¡periodic ¡global ¡placement ¡from ¡an ¡

independent ¡placement ¡module ¡

  • Local ¡controllers ¡perform ¡adjustments ¡in ¡case ¡of ¡

changes ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 32 ¡

slide-33
SLIDE 33

Operator ¡Placement ¡

Operator ¡ Placement ¡

Algorithm ¡ Structure ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 33 ¡

slide-34
SLIDE 34

Algorithm ¡Structure ¡

  • Centralized ¡
  • Has ¡access ¡to ¡global ¡network’s ¡informaOon ¡
  • Target ¡finding ¡global ¡“opOmum” ¡
  • Ogen ¡approximate ¡soluOons ¡/ ¡heurisOcs ¡
  • Constant ¡updates ¡required ¡
  • Vulnerable ¡to ¡scalability ¡issues ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 34 ¡

slide-35
SLIDE 35

Algorithm ¡Structure ¡

  • Decentralized ¡
  • Has ¡access ¡to ¡local ¡state ¡/ ¡informaOon ¡from ¡

neighbors ¡

  • No ¡guarantees ¡that ¡local ¡decision ¡are ¡globally ¡
  • pOmal ¡
  • Some ¡soluOons ¡can ¡achieve ¡convergence ¡toward ¡an ¡
  • pOmal ¡state, ¡if ¡some ¡assumpOons ¡hold ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 35 ¡

slide-36
SLIDE 36

Operator ¡Placement ¡

Operator ¡ Placement ¡

Operator ¡ Reuse ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 36 ¡

slide-37
SLIDE 37

Operator ¡Reuse ¡

  • Enables ¡an ¡addiOonal ¡degree ¡of ¡opOmizaOon ¡
  • PotenOally ¡useful ¡if ¡rules ¡execute ¡(parOally) ¡

idenOcal ¡operaOons ¡on ¡the ¡input ¡flow ¡

  • Possibly, ¡allocaOng ¡new ¡operators ¡can ¡become ¡a ¡

waste ¡of ¡resources ¡

  • Operator ¡reuse ¡reduces ¡the ¡number ¡of ¡such ¡

allocaOons ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 37 ¡

slide-38
SLIDE 38

Operator ¡Reuse ¡

Before ¡ A(er ¡

38 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡

slide-39
SLIDE 39

Operator ¡Placement ¡

Operator ¡ Placement ¡

Operator ¡ ReplicaOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 39 ¡

slide-40
SLIDE 40

Operator ¡ReplicaOon ¡

  • Conceptually ¡“inverse” ¡of ¡reuse ¡
  • Reuse ¡adopts ¡a ¡single ¡instance ¡of ¡an ¡operator ¡for ¡

serving ¡mulOple ¡queries ¡

  • ReplicaOon ¡creates ¡different ¡instances ¡of ¡an ¡
  • perator ¡to ¡serve ¡a ¡single ¡query ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 40 ¡

slide-41
SLIDE 41

Operator ¡ReplicaOon ¡

Before ¡ A(er ¡

41 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡

slide-42
SLIDE 42

Operator ¡ReplicaOon ¡

  • Useful ¡in ¡case ¡of ¡resource ¡demanding ¡
  • perators ¡
  • Different ¡algorithms ¡for ¡scheduling ¡

computaOon ¡on ¡available ¡replica ¡

  • Not ¡always ¡possible ¡/ ¡easy ¡to ¡implement ¡
  • Trivial ¡for ¡stateless ¡operators ¡
  • In ¡the ¡general ¡case, ¡each ¡replica ¡must ¡be ¡able ¡to ¡

Omely ¡access ¡the ¡(porOon ¡of) ¡state ¡it ¡needs ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 42 ¡

slide-43
SLIDE 43

Operator ¡Placement ¡

Operator ¡ Placement ¡

Lead ¡ Shedding ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 43 ¡

slide-44
SLIDE 44

Load ¡Shedding ¡

  • Problem: ¡How ¡to ¡manage ¡bursts ¡of ¡input ¡data ¡
  • Some ¡systems ¡drop ¡input ¡packets ¡… ¡
  • In ¡the ¡Receiver ¡
  • … ¡but, ¡it ¡strongly ¡impacts ¡the ¡results ¡produced ¡
  • The ¡“semanOcs” ¡of ¡the ¡rules ¡
  • Accordingly, ¡some ¡systems ¡drop ¡packets ¡on ¡a ¡per-­‑rule ¡basis ¡
  • In ¡the ¡Decider ¡

Receiver Forwarder Clock

  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡

Decider

History ¡ History ¡

History Producer

A ¡ A ¡ A ¡

Seq Rules Knowledge base

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 44 ¡

slide-45
SLIDE 45

Load ¡Shedding ¡and ¡ Operator ¡Placement ¡

  • Load ¡shedding ¡decisions ¡can ¡be ¡applied ¡at ¡
  • perator ¡level ¡
  • It ¡is ¡natural ¡to ¡specify ¡QoS ¡constraints ¡for ¡rules ¡
  • Based ¡on ¡the ¡importance ¡of ¡the ¡results ¡produced ¡
  • Requires ¡decision ¡making ¡process ¡to ¡select ¡

load ¡shedding ¡policy ¡for ¡individual ¡operators ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 45 ¡

slide-46
SLIDE 46

Operator ¡Placement ¡

Operator ¡ Placement ¡

Rule ¡ RewriOng ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 46 ¡

slide-47
SLIDE 47

Rule ¡RewriOng ¡

  • High-­‑level ¡user-­‑defined ¡rules ¡are ¡translated ¡

into ¡a ¡workflow ¡for ¡execuOon ¡

  • Composed ¡of ¡elementary ¡operators ¡
  • MulOple ¡translaOons ¡are ¡possible ¡
  • SemanOcally ¡equivalent ¡
  • Given ¡a ¡cost ¡funcOon, ¡it ¡is ¡possible ¡to ¡select ¡the ¡

less ¡expensive ¡translaOon ¡

  • E.g., ¡execute ¡filtering ¡operaOons ¡first, ¡to ¡reduce ¡the ¡

amount ¡of ¡data ¡in ¡subsequent ¡computaOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 47 ¡

slide-48
SLIDE 48

Rule ¡RewriOng ¡

  • The ¡cost ¡funcOon ¡may ¡also ¡take ¡into ¡account ¡

the ¡interacOon ¡between ¡different ¡rules ¡

  • Lot ¡of ¡literature ¡on ¡mulO ¡query ¡opOmizaOon ¡

(MQO) ¡in ¡database ¡systems ¡

  • Ogen ¡used ¡in ¡associaOon ¡with ¡with ¡operator ¡

reuse ¡

  • E.g., ¡“Distributed ¡Complex ¡Event ¡Processing ¡with ¡Query ¡

RewriOng” ¡by ¡Schultz ¡Moller ¡et ¡al, ¡2009 ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 48 ¡

slide-49
SLIDE 49

Operator ¡Placement ¡

Operator ¡ Placement ¡

ReconfiguraOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 49 ¡

slide-50
SLIDE 50

ReconfiguraOon ¡

  • The ¡reconfiguraOon ¡strategies ¡defines ¡
  • Which ¡changes ¡can ¡trigger ¡a ¡new ¡evaluaOon ¡of ¡the ¡
  • perator ¡placement ¡
  • How ¡the ¡algorithm ¡reacts ¡to ¡such ¡changes ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 50 ¡

slide-51
SLIDE 51

ReconfiguraOon ¡

  • We ¡can ¡organize ¡changes ¡into ¡3 ¡main ¡classes ¡
  • Network ¡infrastructure ¡
  • Nodes ¡are ¡added, ¡removed ¡
  • Links ¡are ¡added, ¡removed ¡
  • Links ¡become ¡congested ¡or ¡unreliable ¡
  • Data ¡characterisOcs ¡
  • Changes ¡in ¡the ¡content ¡/ ¡distribuOon ¡of ¡data ¡
  • Bursts ¡
  • Operators ¡graph ¡
  • Sources ¡/ ¡sinks ¡added, ¡removed, ¡moved ¡
  • Rules ¡added, ¡remove, ¡modified ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 51 ¡

slide-52
SLIDE 52

ReconfiguraOon ¡

  • When ¡to ¡react? ¡
  • Performance ¡threshold ¡
  • Trigger ¡a ¡reconfiguraOon ¡when ¡performance ¡falls ¡below ¡

a ¡user-­‑specified ¡threshold ¡

  • Constraint ¡violaOon ¡
  • Trigger ¡a ¡reconfiguraOon ¡when ¡the ¡current ¡placement ¡

violates ¡some ¡QoS ¡constraints, ¡e.g., ¡end-­‑to-­‑end ¡latency ¡

  • Periodic ¡evaluaOon ¡
  • Periodically ¡computes ¡a ¡new ¡placement ¡and ¡migrates ¡

to ¡the ¡new ¡strategy ¡if ¡the ¡benefits ¡are ¡large ¡w.r.t. ¡some ¡ cost ¡funcOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 52 ¡

slide-53
SLIDE 53

ReconfiguraOon ¡

  • Two ¡main ¡response ¡strategies ¡to ¡changes ¡
  • StaOc ¡algorithms ¡re-­‑compute ¡the ¡placement ¡of ¡all ¡
  • perators ¡offline ¡
  • Dynamic ¡algorithms ¡respond ¡to ¡changes ¡during ¡

runOme ¡

  • Without ¡interrupOng ¡the ¡system’s ¡funcOonality ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 53 ¡

slide-54
SLIDE 54

AddiOonal ¡Open ¡Problems ¡

  • How ¡to ¡cope ¡with ¡mobile ¡nodes? ¡
  • Mobile ¡sinks ¡and ¡sources… ¡
  • …but ¡also ¡mobile ¡“processors” ¡
  • The ¡issue ¡is ¡relevant ¡
  • We ¡leave ¡in ¡a ¡mobile ¡world ¡
  • Very ¡few ¡proposals ¡
  • A ¡lot ¡of ¡work ¡in ¡the ¡area ¡of ¡pure ¡publish/subscribe ¡
  • May ¡we ¡reuse ¡some ¡of ¡this ¡work? ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 54 ¡

slide-55
SLIDE 55

Examples ¡

Stream-­‑Based ¡Overlay ¡Network ¡ (SBON) ¡

slide-56
SLIDE 56

SBON ¡

  • First ¡concrete ¡proposal ¡for ¡the ¡operator ¡

placement ¡problem ¡

  • ICDE ¡2006 ¡
  • A ¡few ¡previous ¡soluOons ¡
  • Based ¡on ¡DHT ¡
  • APempt ¡to ¡solve ¡the ¡problem ¡at ¡DTH ¡level ¡
  • Minimize ¡number ¡of ¡“virtual” ¡hops ¡
  • No ¡guarantees ¡of ¡good ¡mapping ¡on ¡the ¡underlying ¡

physical ¡network ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 56 ¡

slide-57
SLIDE 57

SBON ¡-­‑ ¡MoOvaOons ¡

  • Good ¡placement ¡
  • No ¡heurisOcs ¡that ¡consider ¡only ¡a ¡subset ¡of ¡nodes ¡
  • Scalability ¡
  • In ¡the ¡number ¡of ¡concurrent ¡rules ¡
  • In ¡the ¡number ¡of ¡nodes ¡
  • AdapOve ¡
  • When ¡condiOons ¡change ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 57 ¡

slide-58
SLIDE 58

SBON ¡-­‑ ¡Idea ¡

  • Define ¡a ¡(mulO-­‑dimensional) ¡virtual ¡cost-­‑space ¡
  • Each ¡node ¡is ¡a ¡point ¡in ¡the ¡space ¡
  • It ¡is ¡a ¡metric ¡space ¡
  • It ¡is ¡possible ¡to ¡define ¡a ¡distance ¡between ¡every ¡two ¡

points ¡(nodes) ¡

  • Solve ¡the ¡problem ¡in ¡the ¡cost ¡space ¡
  • Decide ¡the ¡opOmal ¡posiOon ¡(point) ¡to ¡place ¡
  • perators ¡
  • Move ¡back ¡to ¡the ¡physical ¡network ¡
  • Place ¡each ¡operator ¡to ¡the ¡closest ¡node ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 58 ¡

slide-59
SLIDE 59

SBON ¡– ¡Cost ¡Space ¡

  • How ¡to ¡define ¡the ¡cost ¡space? ¡
  • Must ¡capture ¡the ¡cost ¡for ¡rouOng ¡data ¡between ¡nodes ¡
  • Must ¡be ¡easy ¡to ¡manage ¡
  • Each ¡node ¡should ¡easily ¡determine ¡its ¡posiOon ¡in ¡the ¡space ¡
  • SoluOon ¡
  • Latency ¡
  • Expressed ¡as ¡a ¡3-­‑dimensional ¡space ¡
  • Load ¡
  • Can ¡be ¡computed ¡locally ¡at ¡each ¡node ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 59 ¡

slide-60
SLIDE 60

SBON ¡– ¡Cost ¡Space ¡

  • How ¡to ¡design ¡a ¡latency ¡space? ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 60 ¡

slide-61
SLIDE 61

SBON ¡– ¡Cost ¡Space ¡

  • How ¡to ¡design ¡a ¡latency ¡space? ¡
  • Euclidean ¡n-­‑dimensional ¡space ¡
  • Assume ¡triangle ¡inequality ¡holds ¡
  • Only ¡geographical ¡distance ¡maPers? ¡
  • A ¡2-­‑dimensional ¡space ¡is ¡sufficient ¡
  • This ¡proved ¡to ¡be ¡inefficient ¡
  • [Vivaldi ¡algorithm, ¡SIGCOMM ¡04] ¡
  • BePer ¡predicOons ¡when ¡we ¡consider ¡more ¡dimensions ¡
  • 3-­‑dimensional ¡space ¡good ¡tradeoff ¡between ¡complexity ¡

and ¡precision ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 61 ¡

slide-62
SLIDE 62

SBON ¡– ¡Cost ¡Space ¡

  • How ¡to ¡efficiently ¡

maintain ¡a ¡latency ¡ space? ¡

  • Assume ¡triangle ¡

inequality ¡holds ¡

  • Compute ¡euclidean ¡

distance ¡

  • From ¡well ¡known ¡

landmark ¡nodes ¡

  • From ¡random ¡nodes ¡
  • ApproximaOon ¡… ¡
  • … ¡but ¡small ¡predicOon ¡

error ¡in ¡tests ¡( ¡< ¡11%) ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 62 ¡

slide-63
SLIDE 63

SBON ¡– ¡Cost ¡Space ¡

  • Performance ¡may ¡be ¡dominated ¡by ¡CPU ¡load ¡
  • Each ¡node ¡monitors ¡its ¡load ¡
  • Load ¡considered ¡when ¡posiOoning ¡a ¡node ¡in ¡the ¡

cost ¡space ¡

  • It ¡becomes ¡a ¡weighOng ¡factor ¡
  • Nodes ¡with ¡high ¡load ¡will ¡move ¡away ¡in ¡the ¡cost ¡space ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 63 ¡

slide-64
SLIDE 64

SBON ¡– ¡ ¡ObjecOve ¡FuncOon ¡

  • Minimize ¡the ¡network ¡usage ¡of ¡a ¡link ¡L ¡
  • Network ¡usage ¡
  • u ¡= ¡∑ ¡DR(L)*cost(L) ¡
  • Where ¡
  • DR(L) ¡is ¡the ¡Data ¡Rate ¡
  • Amount ¡of ¡data ¡that ¡transit ¡over ¡link ¡L ¡given ¡a ¡certain ¡

placement ¡of ¡operators ¡

  • cost(L) ¡is ¡the ¡cost ¡of ¡L ¡in ¡the ¡latency-­‑load ¡cost ¡

space ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 64 ¡

slide-65
SLIDE 65

SBON ¡– ¡Spring ¡RelaxaOon ¡Algorithm ¡

  • Idea: ¡physical ¡analogy ¡with ¡spring ¡relaxaOon ¡
  • Latency ¡represented ¡by ¡the ¡length ¡of ¡the ¡spring ¡
  • Data ¡rate ¡represented ¡by ¡the ¡sOffness ¡of ¡the ¡

spring ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 65 ¡

slide-66
SLIDE 66

SBON ¡– ¡Spring ¡RelaxaOon ¡Algorithm ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 66 ¡

slide-67
SLIDE 67

SBON ¡– ¡Spring ¡RelaxaOon ¡Algorithm ¡

  • MulOple ¡possible ¡implementaOons ¡
  • Centralized ¡
  • Decentralized ¡
  • Each ¡node ¡relaxes ¡its ¡directly ¡connected ¡springs ¡
  • MulOple ¡iteraOons ¡are ¡performed ¡
  • Each ¡iteraOon ¡decreases ¡the ¡total ¡force ¡of ¡the ¡system ¡
  • The ¡system ¡converges ¡towards ¡a ¡low ¡energy ¡state ¡
  • Used ¡together ¡
  • Centralized ¡implementaOon ¡for ¡first ¡deployment ¡
  • Decentralized ¡implementaOon ¡for ¡subsequent ¡

refinements ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 67 ¡

slide-68
SLIDE 68

SBON ¡– ¡Spring ¡RelaxaOon ¡Algorithm ¡

  • Strategy ¡
  • MigraOon ¡only ¡when ¡the ¡advantages ¡overcome ¡a ¡

minimum ¡migraOon ¡threshold ¡

  • Operators ¡reuse ¡
  • When ¡migraOng ¡an ¡operator, ¡the ¡algorithm ¡looks ¡

for ¡idenOcal/compaOble ¡operators ¡in ¡the ¡same ¡ area ¡

  • If ¡a ¡compaOble ¡operator ¡is ¡available, ¡the ¡algorithm ¡

reuses ¡it ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 68 ¡

slide-69
SLIDE 69

SBON ¡– ¡EvaluaOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 69 ¡

slide-70
SLIDE 70

SBON ¡– ¡EvaluaOon ¡– ¡MigraOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 70 ¡

slide-71
SLIDE 71

Examples ¡

Distributed ¡T-­‑Rex ¡ (DisTRex) ¡

slide-72
SLIDE 72

DisTRex ¡

  • Our ¡own ¡experience ¡with ¡operator ¡placement ¡
  • TESLA ¡rule ¡language ¡
  • T-­‑Rex ¡(CDP) ¡processing ¡algorithm ¡
  • OmNet++ ¡network ¡simulator ¡
  • We ¡defined ¡and ¡compared ¡different ¡

deployment ¡strategies ¡

  • Load ¡distribuOon ¡… ¡
  • Of ¡different ¡rules ¡
  • … ¡as ¡well ¡as ¡incremental ¡processing ¡
  • Of ¡a ¡single ¡rule ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 72 ¡

slide-73
SLIDE 73

DisTRex ¡-­‑ ¡MoOvaOons ¡

  • Good ¡placement ¡
  • No ¡heurisOcs ¡that ¡consider ¡only ¡a ¡subset ¡of ¡nodes ¡
  • Scalability ¡
  • In ¡the ¡number ¡of ¡concurrent ¡rules ¡
  • In ¡the ¡number ¡of ¡nodes ¡
  • AdapOve ¡
  • When ¡condiOons ¡change ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 73 ¡

slide-74
SLIDE 74

DisTRex ¡-­‑ ¡MoOvaOons ¡

  • ObservaOons ¡
  • In ¡our ¡experiments ¡with ¡T-­‑Rex, ¡load ¡is ¡hardly ¡ever ¡

a ¡problem ¡

  • Time ¡dominated ¡by ¡network ¡transfers ¡
  • Large ¡volumes ¡of ¡informaOon ¡flow ¡through ¡the ¡

network ¡

  • Filtering ¡as ¡close ¡as ¡possible ¡to ¡sources ¡

– Decreases ¡network ¡transfer ¡ – Decreases ¡intermediate ¡nodes ¡load ¡

  • Start ¡sending ¡informaOon ¡only ¡when ¡really ¡needed ¡

– Do ¡not ¡send ¡all ¡informaOon ¡as ¡soon ¡as ¡it’s ¡ready ¡(push) ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 74 ¡

slide-75
SLIDE 75

DisTRex ¡– ¡Idea ¡

  • Deployment ¡based ¡only ¡on ¡network ¡topology ¡
  • For ¡each ¡rule ¡
  • We ¡create ¡a ¡tree ¡of ¡operators ¡
  • We ¡push ¡(filtering) ¡operators ¡as ¡close ¡as ¡possible ¡to ¡

sources ¡

  • SelecOon, ¡but ¡also ¡evaluaOon ¡of ¡sequence ¡/ ¡parameter ¡

constraints ¡

  • We ¡invesOgate ¡different ¡variants ¡and ¡compare ¡

them ¡

  • Given ¡the ¡low ¡impact ¡of ¡nodes’ ¡load ¡… ¡
  • … ¡we ¡study ¡soluOons ¡that ¡massively ¡replicate ¡

computaOon ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 75 ¡

slide-76
SLIDE 76

DisTRex ¡

Processing ¡ (filtering) ¡near ¡ sources ¡ Incremental ¡ processing ¡at ¡ intermediate ¡nodes ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 76 ¡

slide-77
SLIDE 77

DisTRex ¡

  • What ¡if ¡we ¡have ¡mulOple ¡sinks? ¡
  • Two ¡possibiliOes ¡
  • Single ¡processing ¡tree ¡
  • Each ¡rule ¡is ¡considered ¡only ¡once ¡ ¡
  • Need ¡to ¡distribute ¡composite ¡events ¡ager ¡detecOon ¡
  • One ¡processing ¡tree ¡for ¡each ¡sink ¡
  • PrimiOve ¡events ¡potenOally ¡flow ¡through ¡mulOple ¡trees ¡
  • Possible ¡replicaOon ¡of ¡processing ¡
  • No ¡need ¡to ¡distribute ¡composite ¡events ¡ager ¡detecOon ¡
  • We ¡measure ¡latency ¡and ¡network ¡usage ¡

(bandwidth) ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 77 ¡

slide-78
SLIDE 78

DisTRex ¡– ¡Push/Pull ¡InteracOon ¡

  • Significant ¡differences ¡in ¡event ¡

generaOon ¡rates ¡

  • Frequent ¡temperature ¡readings ¡
  • Rare ¡smoke ¡detecOon ¡
  • No ¡need ¡to ¡propagate ¡(push) ¡all ¡

temperature ¡readings ¡

  • Can ¡ask ¡them ¡(pull) ¡only ¡when ¡

Smoke ¡is ¡detected ¡

  • Each ¡node ¡monitors ¡the ¡rates ¡of ¡

events ¡… ¡

  • … ¡to ¡select ¡push/pull ¡parts ¡for ¡

each ¡rule ¡

Smoke ¡ Temperature ¡ Fire ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 78 ¡

slide-79
SLIDE 79

DisTRex ¡-­‑ ¡Strategy ¡

  • A ¡new ¡placement ¡for ¡a ¡rule ¡is ¡computed ¡
  • When ¡the ¡set ¡of ¡sources ¡changes ¡
  • When ¡the ¡network ¡condiOons ¡change ¡
  • Checked ¡periodically ¡
  • When ¡the ¡set ¡of ¡subscribers ¡change ¡
  • Only ¡for ¡MulO-­‑Tree ¡approaches ¡
  • When ¡the ¡distribuOon ¡of ¡input ¡events ¡change ¡
  • Only ¡for ¡push/pull ¡mechanism ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 79 ¡

slide-80
SLIDE 80

Performance: ¡Network ¡Usage ¡

5 10 15 20 25 5 10 15 20 25 30 Network traffic (KB/s) Number of subscriptions per node Centralized Distributed (ST) Distributed (MT) Push-Pull (ST) Push-Pull (MT)

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 80 ¡

slide-81
SLIDE 81

Performance: ¡Delay ¡

10 20 30 40 50 60 70 5 10 15 20 25 30 Average delay (ms) Number of subscriptions per node Centralized Distributed (ST) Distributed (MT) Push-Pull (ST) Push-Pull (MT)

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 81 ¡

slide-82
SLIDE 82

Performance: ¡a ¡Scenario ¡for ¡Push-­‑Pull ¡

  • Each ¡primiOve ¡event ¡

parOcipates ¡in ¡a ¡very ¡ small ¡number ¡of ¡rules ¡

  • RelaOvely ¡small ¡

windows ¡

  • Making ¡sequence ¡
  • perators ¡more ¡selecOve ¡
  • Large ¡network ¡
  • Advantage ¡of ¡storing ¡

events ¡instead ¡pushing ¡ them ¡immediately ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 82 ¡

slide-83
SLIDE 83

DisTRex ¡-­‑ ¡Conclusions ¡

  • Significant ¡advantages ¡w.r.t. ¡a ¡centralized ¡

deployment ¡

  • Best ¡distribuOon ¡strategy ¡depends ¡from ¡the ¡

workload ¡and ¡from ¡the ¡applicaOon ¡ requirements ¡

  • Tradeoff ¡between ¡propagaOon ¡delay ¡and ¡

bandwidth ¡consumpOon ¡

  • Limited ¡advantages ¡of ¡push/pull ¡in ¡most ¡of ¡the ¡

scenarios ¡we ¡tested ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡The ¡Operator ¡Placement ¡Problem ¡ 83 ¡