Modeling Informa9on Flow Processing Systems G. Cugola - - PowerPoint PPT Presentation

modeling informa9on flow processing systems
SMART_READER_LITE
LIVE PREVIEW

Modeling Informa9on Flow Processing Systems G. Cugola - - PowerPoint PPT Presentation

Stream and Complex Event Processing Modeling Informa9on Flow Processing Systems G. Cugola E. Della Valle A. Margara


slide-1
SLIDE 1

Stream ¡and ¡Complex ¡Event ¡Processing ¡

Modeling ¡Informa9on ¡Flow ¡Processing ¡Systems ¡

  • 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

Background ¡

  • Ac9ve ¡Database ¡Systems ¡
  • Data ¡Stream ¡Management ¡Systems ¡
  • Event ¡Based ¡Systems ¡& ¡Complex ¡Event ¡

Processing ¡

2 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-3
SLIDE 3

Ac9ve ¡DBMSs ¡

  • Standard ¡DBMSs ¡
  • Purely ¡passive: ¡Human-­‑ac(ve ¡

database-­‑passive ¡(HADP) ¡

  • Execu9on ¡happens ¡only ¡when ¡

asked ¡by ¡clients ¡(through ¡queries) ¡

  • Ac9ve ¡DBMSs ¡
  • The ¡reac9ve ¡behavior ¡moves ¡

(in ¡part) ¡from ¡the ¡applica9on ¡ to ¡the ¡DB ¡layer… ¡

  • …which ¡executes ¡Event ¡Condi9on ¡Ac9on ¡(ECA) ¡rules ¡

3 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-4
SLIDE 4

Ac9ve ¡DBMSs ¡

  • As ¡a ¡DBMS ¡extension ¡
  • Rules ¡may ¡only ¡refer ¡to ¡the ¡internal ¡state ¡of ¡the ¡

DB ¡

  • Closed ¡DB ¡applica9ons ¡
  • Rules ¡may ¡support ¡the ¡seman9cs ¡of ¡the ¡

applica9on, ¡but ¡external ¡sources ¡of ¡events ¡are ¡not ¡ allowed ¡

  • Open ¡DB ¡applica9ons ¡
  • Events ¡may ¡come ¡from ¡external ¡sources ¡

4 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-5
SLIDE 5

Data ¡Stream ¡Management ¡Systems ¡

  • Data ¡streams ¡are ¡(unbounded) ¡

sequences ¡of ¡9me-­‑varying ¡ data ¡elements ¡

  • Represent: ¡
  • an ¡(almost) ¡“con9nuous” ¡flow ¡of ¡informa9on ¡ ¡
  • with ¡the ¡recent ¡informa9on ¡being ¡more ¡relevant ¡

as ¡it ¡describes ¡the ¡current ¡state ¡of ¡a ¡dynamic ¡ system ¡

5 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

9me ¡

slide-6
SLIDE 6

Data ¡Stream ¡Management ¡Systems ¡

  • The ¡con9nuous ¡nature ¡of ¡streams ¡requires ¡a ¡

paradigma9c ¡change: ¡

  • from ¡persistent ¡data ¡stored ¡and ¡queried ¡on ¡demand ¡
  • One-­‑(me ¡seman(cs ¡
  • to ¡transient ¡data ¡consumed ¡on ¡the ¡fly ¡by ¡con9nuous ¡

queries ¡

  • Con(nuous ¡

seman(cs ¡

  • Con9nuous ¡queries ¡
  • Yen ¡operates ¡

through ¡windows ¡ ¡

6 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

window ¡ input ¡ streams ¡

  • utput ¡

streams ¡ (answer) ¡

Registered ¡ Con9nuous ¡ Query ¡

slide-7
SLIDE 7

Event-­‑based ¡systems ¡

  • Components ¡collaborate ¡by ¡

exchanging ¡informa9on ¡ about ¡occurrent ¡events. ¡In ¡ par9cular: ¡

  • Components ¡publish ¡

no9fica9ons ¡about ¡the ¡events ¡ they ¡observe, ¡or ¡

  • they ¡subscribe ¡to ¡the ¡events ¡

they ¡are ¡interested ¡to ¡be ¡ no9fied ¡about ¡

  • Communica9on ¡is: ¡
  • Purely ¡message ¡based ¡
  • Asynchronous ¡
  • Mul9cast ¡
  • Implicit ¡
  • Anonymous ¡

7 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

topic=fire* ¡ & ¡place=* ¡ topic=* ¡& ¡ place=1st ¡floor ¡ topic=fire ¡ alarm ¡& ¡ place=* ¡ fire ¡alarm ¡at ¡ 1st ¡floor ¡ fire ¡alarm ¡at ¡ 1st ¡floor ¡ fire ¡alarm ¡at ¡ 1st ¡floor ¡ fire ¡alarm ¡at ¡ 1st ¡floor ¡ fire ¡training ¡at ¡ 1st ¡floor ¡ fire ¡training ¡at ¡ 1st ¡floor ¡ fire ¡training ¡at ¡ 1st ¡floor ¡

slide-8
SLIDE 8

The ¡event ¡dispatcher ¡

  • In ¡event-­‑based ¡systems ¡a ¡special ¡component ¡of ¡the ¡

architecture, ¡the ¡event ¡dispatcher, ¡is ¡in ¡charge ¡of ¡collec9ng ¡ subscrip9ons ¡and ¡rou9ng ¡event ¡no9fica9ons ¡based ¡on ¡such ¡ subscrip9ons ¡

  • For ¡scalability ¡reasons, ¡its ¡implementa9on ¡can ¡be ¡distributed ¡

8 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

Event ¡dispatcher ¡

Subscribe ¡ me ¡to ¡XXX ¡ Subscribe ¡ me ¡to ¡YYY ¡ Subscribe ¡ me ¡to ¡XXX ¡ XXX ¡ XXX ¡ YYY ¡

slide-9
SLIDE 9

Complex ¡Event ¡Processing ¡(CEP) ¡

  • CEP ¡systems ¡adds ¡the ¡ability ¡to ¡deploy ¡rules ¡that ¡

describe ¡how ¡composite ¡events ¡can ¡be ¡generated ¡ from ¡primi9ve ¡(or ¡composite) ¡ones ¡

  • Typical ¡CEP ¡rules ¡search ¡

for ¡sequences ¡of ¡ ¡ events ¡

  • Raise ¡C ¡if ¡A→B ¡
  • Time ¡is ¡a ¡key ¡aspect ¡

in ¡CEP ¡

9 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

Rules ¡

  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
  • ­‑-­‑-­‑-­‑-­‑ ¡
slide-10
SLIDE 10

The ¡current ¡situa9on ¡

  • Back ¡in ¡2007 ¡CEP ¡was ¡

already ¡a ¡hot ¡topic… ¡

  • … ¡but ¡having ¡a ¡good ¡grasp ¡
  • f ¡the ¡area ¡was ¡rather ¡hard ¡
  • As ¡observed ¡by ¡Opher ¡

Etzion ¡the ¡area ¡was ¡looking ¡ like ¡the ¡“Tower ¡of ¡Babel” ¡

  • Event ¡Processing ¡and ¡the ¡Babylon ¡

Tower ¡– ¡Event ¡process ¡thinking ¡blog ¡ – ¡Sept. ¡8, ¡2007 ¡

event ¡ data ¡ stream ¡ message ¡ flow ¡ publish ¡ subscribe ¡ no9fy ¡ adver9se ¡ pahern ¡ sequence ¡ primi9ve ¡ complex ¡ composite ¡ join ¡ send ¡ receive ¡ middleware ¡ system ¡ applica9on ¡ protocol ¡ rou9ng ¡ network ¡ query ¡ rule ¡ condi9on ¡ ac9on ¡

10 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-11
SLIDE 11

The ¡current ¡situa9on ¡

  • Several ¡communi9es ¡

were ¡contribu9ng ¡to ¡ the ¡area… ¡

  • … ¡each ¡bringing ¡its ¡own ¡

exper9se ¡and ¡ vocabulary… ¡

  • …but ¡oYen ¡working ¡in ¡

isola9on ¡

event ¡ data ¡ stream ¡ message ¡ flow ¡ publish ¡subscribe ¡ no9fy ¡ adver9se ¡ pahern ¡ sequence ¡ primi9ve ¡ complex ¡ composite ¡ join ¡ send ¡receive ¡ middleware ¡ system ¡applica9on ¡ protocol ¡ rou9ng ¡ network ¡ query ¡ rule ¡ condi9on ¡ ac9on ¡

ad-­‑hoc ¡tools ¡ (intrusion ¡det., ¡…) ¡ data ¡management ¡ & ¡databases ¡ DEBS ¡ process ¡modeling ¡ & ¡automa9on ¡ DBMSs ¡ applica9on ¡ servers ¡ middleware ¡ systems ¡

Researchers ¡ Tool ¡vendors ¡

11 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-12
SLIDE 12

The ¡current ¡situa9on ¡

  • That ¡was ¡2007. ¡What ¡about ¡today? ¡
  • Things ¡did ¡not ¡change ¡much ¡
  • From ¡the ¡“Event ¡Process ¡Thinking” ¡blog ¡

[Which ¡is] ¡the ¡rela9on ¡between ¡event ¡processing ¡and ¡data ¡stream ¡management? ¡

  • 1. They ¡are ¡aliases ¡-­‑-­‑ ¡stream ¡is ¡just ¡a ¡collec9on ¡of ¡events, ¡likewise, ¡an ¡event ¡is ¡

just ¡a ¡member ¡in ¡a ¡stream, ¡and ¡the ¡func9onality ¡is ¡the ¡same ¡

  • 2. Stream ¡management ¡is ¡a ¡subset ¡of ¡event ¡processing ¡-­‑-­‑ ¡there ¡are ¡different ¡

ways ¡to ¡do ¡event ¡processing, ¡streams ¡is ¡one ¡of ¡them ¡

  • 3. Event ¡processing ¡is ¡a ¡subset ¡of ¡stream ¡management ¡-­‑-­‑ ¡event ¡streams ¡is ¡just ¡
  • ne ¡type ¡of ¡stream, ¡but ¡there ¡are ¡voice ¡stream, ¡video ¡stream, ¡… ¡
  • 4. Event ¡processing ¡and ¡stream ¡management ¡are ¡dis9nct ¡and ¡there ¡is ¡no ¡
  • verlapping ¡between ¡them ¡
  • At ¡the ¡same ¡9me ¡tool ¡vendors ¡are ¡building ¡tools ¡that ¡try ¡to ¡combine ¡ ¡

¿ ¡juxtapose ¡? ¡ ¡different ¡approaches ¡

12 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-13
SLIDE 13

Our ¡goal ¡

  • We ¡would ¡like ¡to ¡compare ¡different ¡systems ¡in ¡a ¡precise ¡way ¡
  • We ¡would ¡like ¡to ¡compare ¡different ¡approaches ¡in ¡a ¡precise ¡way ¡
  • We ¡would ¡like ¡to ¡help ¡people ¡coming ¡from ¡different ¡areas ¡communicate ¡

and ¡compare ¡their ¡work ¡with ¡others ¡

  • We ¡would ¡like ¡to ¡isolate ¡the ¡open ¡issues ¡from ¡those ¡already ¡solved ¡
  • We ¡would ¡like ¡to ¡precisely ¡iden9fy ¡the ¡challenges ¡
  • We ¡would ¡like ¡to ¡isolate ¡the ¡best ¡part ¡of ¡the ¡various ¡approaches… ¡
  • … ¡finding ¡a ¡way ¡to ¡combine ¡them ¡

We ¡need ¡a ¡modeling ¡framework ¡ that ¡could ¡accommodate ¡all ¡the ¡proposals ¡

¡ ¡

13 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

  • G. ¡Cugola, ¡A. ¡Margara: ¡"Processing ¡Flows ¡of ¡Informa>on: ¡From ¡Data ¡Stream ¡to ¡Complex ¡

Event ¡Processing”. ¡ACM ¡Compu)ng ¡Surveys, ¡44(3), ¡ACM ¡Press, ¡June ¡2012 ¡

slide-14
SLIDE 14

Forget ¡your ¡own ¡vocabulary ¡ (temporarily) ¡

  • CEP, ¡DSMSs, ¡Stream ¡reasoning, ¡Ac9ve ¡

DBMSs… ¡ ¡

  • All ¡these ¡terms ¡hide ¡a ¡peculiar ¡view ¡of ¡the ¡domain ¡

we ¡have ¡in ¡mind ¡

  • With ¡subtle, ¡“unsaid” ¡(and ¡oYen ¡unclear) ¡

differences ¡

  • Before ¡learning ¡something ¡new ¡we ¡have ¡to ¡

forget ¡what ¡we ¡already ¡know ¡

14 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-15
SLIDE 15

The ¡Informa9on ¡Flow ¡Processing ¡domain ¡

  • The ¡IFP ¡engine ¡processes ¡incoming ¡flows ¡of ¡informa(on ¡according ¡to ¡a ¡set ¡of ¡

processing ¡rules ¡

  • Processing ¡is ¡“on ¡line” ¡
  • Sources ¡produce ¡the ¡incoming ¡informa9on ¡flows, ¡sinks ¡consume ¡the ¡results ¡of ¡

processing, ¡rule ¡managers ¡add ¡or ¡remove ¡rules ¡

  • Informa9on ¡flows ¡are ¡composed ¡of ¡informa(on ¡items ¡
  • Items ¡part ¡of ¡the ¡same ¡flow ¡are ¡neither ¡necessarily ¡ordered ¡nor ¡of ¡the ¡same ¡kind ¡
  • Processing ¡involve ¡filtering, ¡

combining, ¡and ¡aggrega9ng ¡ flows, ¡item ¡by ¡item ¡as ¡they ¡ enter ¡the ¡engine ¡

Sources ¡ Sinks ¡ IFP ¡Engine ¡

Informa(on ¡Flows ¡ Informa(on ¡Flows ¡

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

Rule ¡managers ¡

15 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-16
SLIDE 16

IFP: ¡One ¡name ¡several ¡incarna9ons ¡

  • A ¡lot ¡of ¡applica9ons ¡
  • Environmental ¡monitoring ¡through ¡sensor ¡networks ¡
  • Financial ¡applica9ons ¡
  • Fraud ¡detec9on ¡tools ¡
  • Network ¡intrusion ¡detec9on ¡systems ¡
  • RFID-­‑based ¡inventory ¡management ¡
  • Manufacturing ¡control ¡systems ¡
  • … ¡
  • Several ¡technologies ¡
  • Ac9ve ¡databases ¡
  • DSMSs ¡
  • CEP ¡Systems ¡

16 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-17
SLIDE 17

One ¡model, ¡several ¡models ¡

  • Different ¡models ¡to ¡capture ¡different ¡

viewpoints ¡

  • Func9onal ¡model ¡
  • Processing ¡model ¡
  • Deployment ¡model ¡
  • Interac9on ¡model ¡
  • Time ¡model ¡
  • Data ¡model ¡
  • Rule ¡model ¡
  • Language ¡model ¡

17 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-18
SLIDE 18

Func9onal ¡model ¡

Receiver Forwarder Clock ¡

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

Decider ¡

History ¡ History ¡

History ¡

Producer ¡

A ¡ A ¡ A ¡

Seq ¡

Rules ¡ Knowledge ¡ base ¡

  • Implements the transport protocol to

move information items along the net

  • Acts as a demultiplexer
  • Implements the transport protocol to

move information items along the net

  • Acts as a multiplexer

18 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-19
SLIDE 19

A ¡short ¡digression ¡

  • We ¡assume ¡rules ¡can ¡be ¡(logically) ¡

decomposed ¡in ¡two ¡parts: ¡C ¡→ ¡A ¡

  • C ¡is ¡the ¡condi(on ¡
  • A ¡is ¡the ¡ac(on ¡
  • Example ¡(in ¡CQL): ¡

Select IStream(Count(*)) From F1 [Range 1 Minute] Where F1.A > 0

  • This ¡way ¡we ¡can ¡split ¡processing ¡in ¡two ¡phases: ¡
  • The ¡detec(on ¡phase ¡determines ¡the ¡items ¡that ¡trigger ¡the ¡rule ¡
  • The ¡produc(on ¡phase ¡use ¡those ¡items ¡to ¡produce ¡the ¡output ¡of ¡the ¡

rule ¡

Receiver Forwarder Clock ¡

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

Decider ¡

History ¡ History ¡ History ¡

Producer ¡

A ¡ A ¡ A ¡ Seq ¡

Rules ¡ Knowledge ¡ base ¡

condi9on ¡ ac9on ¡

19 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-20
SLIDE 20

Func9onal ¡model ¡

Receiver Forwarder Clock ¡

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

Decider ¡

History ¡ History ¡

History ¡

Producer ¡

A ¡ A ¡ A ¡

Seq ¡

Rules ¡ Knowledge ¡ base ¡

  • Implements the detection phase
  • Accumulates partial results into the history
  • When a rule fires passes to the producer its

action part and the triggering items

  • Implements the production phase
  • Uses the items in Seq as stated in action A
  • Some systems allow rules to be

added or removed at processing time

  • Some systems allows rules to combine

flowing items with items previously stored into a (read only) storage

  • If present models the ability of

performing recursive processing building hierarchies of items

  • Optional component
  • Periodically creates special information

items holding current time

  • Its presence models the ability of

performing periodic processing of inputs

20 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-21
SLIDE 21

Func9onal ¡model: ¡Considera9ons ¡

  • The ¡detec9on-­‑produc9on ¡cycle ¡
  • Fired ¡by ¡a ¡new ¡item ¡I ¡entering ¡the ¡engine ¡through ¡the ¡Receiver ¡
  • Including ¡those ¡periodically ¡produced ¡by ¡the ¡Clock, ¡if ¡present ¡
  • Detec9on ¡phase: ¡Evaluates ¡all ¡the ¡rules ¡to ¡find ¡those ¡enabled ¡
  • Using ¡item ¡I ¡plus ¡the ¡data ¡into ¡the ¡Knowledge ¡base, ¡if ¡present ¡
  • The ¡item ¡I ¡can ¡be ¡accumulated ¡into ¡the ¡History ¡for ¡par9ally ¡enabled ¡rules ¡
  • The ¡ac9on ¡part ¡of ¡the ¡enabled ¡rules ¡together ¡with ¡the ¡triggering ¡items ¡(A+Seq) ¡is ¡

passed ¡to ¡the ¡producer ¡

  • Produc9on ¡phase: ¡Produces ¡the ¡output ¡items ¡
  • Combining ¡the ¡items ¡that ¡triggered ¡the ¡rule ¡with ¡data ¡present ¡in ¡the ¡Knowledge ¡

base, ¡if ¡present ¡

  • New ¡items ¡are ¡sent ¡to ¡subscribed ¡sinks ¡(through ¡the ¡Forwarder)… ¡
  • …but ¡they ¡could ¡also ¡be ¡sent ¡internally ¡to ¡be ¡processed ¡again ¡(recursive ¡processing) ¡
  • In ¡some ¡systems ¡the ¡ac9on ¡part ¡of ¡fired ¡rules ¡may ¡also ¡change ¡the ¡set ¡of ¡deployed ¡

rules ¡

21 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-22
SLIDE 22

Func9onal ¡model: ¡Considera9ons ¡

  • Maximum ¡length ¡of ¡Seq ¡a ¡key ¡aspect ¡
  • 1 ¡≈ ¡PubSub ¡
  • Bounded ¡⇒ ¡ ¡
  • CQL ¡like ¡languages ¡without ¡9me ¡based ¡windows ¡
  • Pahern ¡based ¡languages ¡without ¡a ¡Kleene+ ¡operator ¡
  • Other ¡key ¡aspects ¡that ¡impact ¡expressiveness ¡
  • Presence ¡of ¡the ¡Clock ¡
  • Models ¡the ¡ability ¡to ¡process ¡rules ¡

periodically ¡

  • Available ¡in ¡almost ¡half ¡of ¡the ¡systems ¡

reviewed ¡

  • Most ¡Ac9ve ¡DBMSs ¡and ¡DSMSs ¡but ¡

few ¡CEP ¡systems ¡

Receiver Forwarder Clock ¡

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

Decider ¡

History ¡ History ¡ History ¡

Producer ¡

A ¡ A ¡ A ¡ Seq ¡

Rules ¡ Knowledge ¡ base ¡

22 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-23
SLIDE 23

Func9onal ¡model: ¡Considera9ons ¡

  • Presence ¡of ¡the ¡Knowledge ¡base ¡
  • Only ¡available ¡in ¡systems ¡coming ¡from ¡the ¡database ¡community ¡
  • Presence ¡of ¡the ¡looping ¡flow ¡exi9ng ¡

the ¡Producer ¡

  • Models ¡the ¡ability ¡of ¡performing ¡recursive ¡

processing ¡

  • Half ¡CEP ¡systems ¡have ¡it ¡
  • All ¡Ac9ve ¡DBMSs ¡but ¡very ¡few ¡DSMSs ¡

have ¡it ¡

– They ¡have ¡nested ¡rules ¡

  • Support ¡to ¡dynamic ¡rule ¡change ¡
  • Few ¡systems ¡support ¡it ¡
  • Can ¡be ¡implemented ¡externally… ¡

– Through ¡sinks ¡ac9ng ¡also ¡as ¡rule ¡managers ¡

  • …but ¡we ¡think ¡it ¡is ¡nice ¡to ¡have ¡it ¡internally ¡

Receiver Forwarder Clock ¡

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

Decider ¡

History ¡ History ¡ History ¡

Producer ¡

A ¡ A ¡ A ¡ Seq ¡

Rules ¡ Knowledge ¡ base ¡

23 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-24
SLIDE 24

The ¡seman9cs ¡of ¡processing ¡

  • What ¡determines ¡the ¡output ¡of ¡each ¡detec9on-­‑produc9on ¡cycle? ¡
  • The ¡new ¡item ¡entering ¡the ¡engine ¡
  • The ¡set ¡of ¡deployed ¡rules ¡
  • The ¡items ¡stored ¡into ¡the ¡History ¡
  • The ¡content ¡of ¡the ¡Knowledge ¡Base ¡
  • Is ¡this ¡enough? ¡
  • Example ¡(in ¡Padres ¡and ¡CQL):
  • Smoke && Temp>50
  • Select IStream(Smoke.area)

From Smoke[Rows 30 Slide 10], Temp[Rows 50 Slide 5] Where Smoke.area = Temp.area AND Temp.value > 50

Rules ¡

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

Decider ¡

History ¡ History ¡

History ¡

Producer ¡

A ¡ A ¡ A ¡

Seq ¡

Knowledge ¡ base ¡

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

History ¡

Knowledge ¡ base ¡

24 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-25
SLIDE 25

Processing ¡model ¡

  • Three ¡policies ¡affect ¡the ¡behavior ¡of ¡the ¡

system ¡

  • The ¡selec(on ¡policy ¡
  • The ¡consump(on ¡policy ¡
  • The ¡load ¡shedding ¡policy ¡

25 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-26
SLIDE 26

Selec9on ¡policy ¡

  • Determines ¡if ¡a ¡rule ¡fires ¡once ¡or ¡mul9ple ¡

9mes ¡and ¡the ¡items ¡actually ¡selected ¡from ¡the ¡ History ¡

  • Example: ¡

Receiver Decider ¡

A

A ¡ A ¡A ¡

B

? ¡ A ¡∧B ¡

A0 ¡A1 ¡

A0 ¡ ¡B ¡

R ¡

A1 ¡ ¡B ¡

R ¡

A0 ¡ ¡B ¡

R ¡

A1 ¡ ¡B ¡

R ¡

single ¡ mul9ple ¡

  • r ¡

26 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-27
SLIDE 27

Selec9on ¡policy: ¡Considera9ons ¡

  • Most ¡systems ¡adopt ¡a ¡mul9ple ¡selec9on ¡policy ¡
  • It ¡is ¡simpler ¡to ¡implement ¡
  • Is ¡it ¡adequate? ¡
  • Example: ¡Alert ¡fire ¡when ¡smoke ¡and ¡high ¡temperature ¡in ¡a ¡short ¡

9me ¡frame ¡

– If ¡10 ¡sensors ¡read ¡high ¡temperature ¡and ¡immediately ¡aYerward ¡one ¡ detects ¡smoke ¡I ¡would ¡like ¡to ¡receive ¡a ¡single ¡alert, ¡not ¡10 ¡

  • A ¡few ¡systems ¡allow ¡this ¡policy ¡to ¡be ¡programmed… ¡
  • …some ¡of ¡them ¡on ¡a ¡per-­‑rule ¡base ¡
  • E.g., ¡Amit, ¡T-­‑Rex ¡

27 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-28
SLIDE 28

Selec9on ¡policy: ¡The ¡TESLA ¡case ¡

  • TESLA ¡(Trio-­‑based ¡Event ¡Specifica9on ¡Language): ¡the ¡T-­‑Rex ¡language ¡
  • A ¡rule ¡language ¡for ¡CEP. ¡Tries ¡to ¡combine ¡expressiveness ¡and ¡efficiency ¡
  • Has ¡a ¡formally ¡defined ¡seman9cs ¡
  • Expressed ¡in ¡Trio, ¡a ¡Metric ¡Temporal ¡Logic ¡(see ¡DEBS ¡2010) ¡
  • Allows ¡rule ¡managers ¡to ¡choose ¡their ¡own ¡selec9on ¡policy ¡on ¡a ¡per ¡rule ¡base ¡
  • Example: ¡Mul9ple ¡selec9on ¡

define Fire(area: string, measuredTemp: double) from Smoke(area=$a) and each Temp(area=$a and val>50) within 1min. from Smoke where area=Smoke.area and measuredTemp=Temp.value

  • Example: ¡Single ¡selec9on ¡

define Fire(area: string, measuredTemp: double) from Smoke(area=$a) and last Temp(area=$a and val>50) within 1min. from Smoke where area=Smoke.area and measuredTemp=Temp.val ¡

  • Alternatively you may use:
  • first…within
  • n-first…within n-last…within

28 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-29
SLIDE 29

Consump9on ¡policy ¡

  • Determines ¡how ¡the ¡history ¡changes ¡aYer ¡

firing ¡of ¡a ¡rule ¡⇒ ¡what ¡happens ¡when ¡new ¡ items ¡enter ¡the ¡Decider ¡

  • Example: ¡

Receiver Decider ¡

A

A ¡

B

? ¡ A ¡∧B ¡

A ¡ ¡ ¡ ¡B ¡

R ¡

selected ¡ zero ¡

A ¡ ¡ ¡ ¡B ¡

R ¡

29 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-30
SLIDE 30

Consump9on ¡policy: ¡Considera9ons ¡

  • Most ¡systems ¡couple ¡a ¡mul9ple ¡selec9on ¡policy ¡with ¡a ¡zero ¡

consump9on ¡policy ¡

  • This ¡is ¡the ¡common ¡case ¡with ¡DSMSs, ¡which ¡use ¡(sliding) ¡

windows ¡to ¡select ¡relevant ¡events ¡

  • Example ¡(in ¡CQL) ¡

Select IStream(Smoke.area) From Smoke[Range 1 min], Temp[Range 1 min] Where Smoke.area = Temp.area AND Temp.val > 50

  • The ¡systems ¡that ¡allow ¡the ¡selec9on ¡policy ¡to ¡be ¡programmed ¡
  • Yen ¡allow ¡the ¡consump9on ¡policy ¡to ¡be ¡programmed, ¡too ¡
  • E.g., ¡Amit, ¡T-­‑Rex ¡

30 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-31
SLIDE 31

Consump9on ¡policy: ¡The ¡TESLA ¡case ¡

  • Zero ¡consump9on ¡policy ¡
  • define Fire(area: string, measuredTemp: double)

from Smoke(area=$a) and each Temp(area=$a and val>50) within 1min. from Smoke where area=Smoke.area and measuredTemp=Temp.value

  • Selected ¡consump9on ¡policy ¡
  • define Fire(area: string, measuredTemp: double)

from Smoke(area=$a) and each Temp(area=$a and val>50) within 1min. from Smoke where area=Smoke.area and measuredTemp=Temp.value consuming Temp

T ¡ T ¡ T ¡ T ¡ S ¡ Fire! ¡ Fire! ¡ Fire! ¡ Fire! ¡ S ¡ Fire! ¡ Fire! ¡ Fire! ¡ Fire! ¡ T ¡ T ¡ T ¡ T ¡ S ¡ Fire! ¡ Fire! ¡ Fire! ¡ Fire! ¡ T ¡ T ¡ T ¡ T ¡ S ¡ 31 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-32
SLIDE 32

Load ¡shedding ¡policy ¡

  • Problem: ¡How ¡to ¡manage ¡bursts ¡of ¡input ¡data ¡
  • It ¡may ¡seem ¡a ¡system ¡issue ¡
  • i.e., ¡an ¡issue ¡to ¡solve ¡into ¡the ¡

Receiver ¡

  • But ¡it ¡strongly ¡impacts ¡the ¡results ¡

produced ¡

  • i.e., ¡the ¡“seman9cs” ¡of ¡the ¡rules ¡
  • Accordingly, ¡some ¡systems ¡allows ¡this ¡issue ¡to ¡be ¡determined ¡on ¡a ¡per-­‑

rule ¡basis ¡

  • e.g., ¡Aurora ¡allows ¡rules ¡to ¡specify ¡the ¡expected ¡QoS ¡and ¡sheds ¡input ¡

to ¡stay ¡within ¡limits ¡with ¡the ¡available ¡resources ¡

  • Conceptually ¡the ¡issue ¡is ¡addressed ¡into ¡the ¡decider ¡

Receiver Forwarder Clock ¡

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

Decider ¡

History ¡ History ¡ History ¡

Producer ¡

A ¡ A ¡ A ¡ Seq ¡

Rules ¡ Knowledge ¡ base ¡

32 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-33
SLIDE 33

Deployment ¡model ¡

  • IFP ¡applica9ons ¡may ¡

include ¡a ¡large ¡number ¡of ¡ sources ¡and ¡sinks ¡

  • Possibly ¡dispersed ¡over ¡a ¡

wide ¡geographical ¡area ¡

  • It ¡becomes ¡important ¡to ¡

consider ¡the ¡deployment ¡ architecture ¡of ¡the ¡engine ¡

  • How ¡the ¡components ¡of ¡

the ¡func9onal ¡model ¡can ¡ be ¡distributed ¡to ¡achieve ¡ scalability ¡

33 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-34
SLIDE 34

Deployment ¡model ¡

Centralized ¡ Distributed ¡ Clustered ¡ Networked ¡

Sources ¡ IFP ¡Engine ¡

Informa(on ¡Flows ¡ Informa(on ¡Flows ¡

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

Rule ¡managers ¡

Sinks ¡

34 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-35
SLIDE 35

Deployment ¡Model ¡

  • Most ¡exis9ng ¡systems ¡adopt ¡a ¡centralized ¡

solu9on ¡

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

usually ¡based ¡on ¡clustered ¡solu9ons ¡

  • A ¡few ¡systems ¡have ¡recognized ¡the ¡importance ¡of ¡

networked ¡deployment ¡for ¡some ¡applica9ons ¡

  • E.g. ¡MicrosoY ¡StreamInsight ¡(part ¡of ¡SQLServer) ¡
  • Filtering ¡near ¡sources ¡
  • Aggrega9on ¡and ¡correla9on ¡in-­‑network ¡
  • Analy9cs ¡and ¡historical ¡data ¡in ¡a ¡centralized ¡server/cluster ¡
  • In ¡most ¡cases, ¡deployment/configura9on ¡is ¡not ¡

automa9c ¡

35 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-36
SLIDE 36

Deployment ¡model ¡

  • Automa9c ¡distribu9on ¡of ¡

processing ¡introduces ¡the ¡

  • perator ¡placement ¡problem ¡
  • Given ¡a ¡set ¡of ¡rules ¡(composed ¡
  • f ¡operators) ¡and ¡a ¡set ¡of ¡

nodes ¡

  • How ¡to ¡split ¡the ¡processing ¡

load ¡

  • How ¡to ¡assign ¡operators ¡to ¡

available ¡nodes ¡

  • In ¡other ¡words ¡(Event ¡

Processing ¡in ¡Ac9on) ¡

  • Given ¡an ¡event ¡processing ¡

network ¡

  • How ¡to ¡map ¡it ¡onto ¡the ¡

physical ¡network ¡of ¡nodes ¡

36 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-37
SLIDE 37

Operator ¡placement ¡

  • The ¡operator ¡placement ¡problem ¡is ¡s9ll ¡open ¡
  • Several ¡proposals ¡
  • OYen ¡adop9ng ¡techniques ¡coming ¡from ¡the ¡

Opera9onal ¡Research ¡

  • Difficult ¡to ¡compare ¡solu9ons ¡and ¡results ¡
  • Even ¡in ¡its ¡simplest ¡form ¡the ¡problem ¡is ¡NP-­‑hard ¡

[more ¡on ¡this ¡later ¡during ¡the ¡course] ¡

37 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-38
SLIDE 38

More ¡on ¡deployment ¡model ¡

  • Operator ¡placement ¡is ¡only ¡part ¡of ¡the ¡problem ¡
  • Other ¡issues ¡
  • How ¡to ¡build ¡the ¡network ¡of ¡nodes? ¡
  • How ¡to ¡maintain ¡it? ¡
  • How ¡to ¡gather ¡the ¡informa9on ¡required ¡to ¡solve ¡the ¡
  • perator ¡placement ¡problem? ¡
  • How ¡to ¡actually ¡“place” ¡the ¡operators? ¡
  • How ¡to ¡“replace” ¡them ¡when ¡the ¡situa9on ¡changes? ¡
  • New ¡rules ¡added, ¡old ¡rules ¡removed… ¡
  • …new ¡sources/sinks ¡

38 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-39
SLIDE 39

Deployment ¡model ¡and ¡dynamics ¡

  • 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 ¡
  • Several ¡works ¡published ¡in ¡DEBS, ¡not ¡to ¡men9on ¡other ¡

major ¡conferences/journals ¡

  • May ¡we ¡reuse ¡some ¡of ¡this ¡work? ¡

39 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-40
SLIDE 40

Interac9on ¡Model ¡

  • It ¡is ¡interes9ng ¡to ¡study ¡the ¡characteris9cs ¡of ¡the ¡

interac9ons ¡among ¡the ¡main ¡component ¡of ¡an ¡ IFP ¡system ¡

  • Who ¡starts ¡the ¡communica9on? ¡

Sources ¡ Sinks ¡ IFP ¡Engine ¡

40 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-41
SLIDE 41

Interac9on ¡Model ¡

Sources ¡ Sinks ¡ IFP ¡Engine ¡

  • Push ¡
  • Pull ¡

Observation Model

  • Push ¡
  • Pull ¡

Forwarding Model

  • Push ¡
  • Pull ¡

Notification Model

41 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-42
SLIDE 42

Time ¡Model ¡

  • Rela9onship ¡between ¡informa9on ¡items ¡and ¡

passing ¡of ¡9me ¡

  • Ability ¡of ¡an ¡IFP ¡system ¡to ¡associate ¡some ¡kind ¡of ¡

happened-­‑before ¡(ordering) ¡rela9onship ¡to ¡ informa9on ¡items ¡

  • We ¡iden9fied ¡4 ¡classes: ¡
  • 1. Stream-­‑only ¡
  • 2. Causal ¡
  • 3. Absolute ¡
  • 4. Interval ¡

42 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-43
SLIDE 43

Stream-­‑Only ¡Time ¡Model ¡

  • Used ¡in ¡original ¡DSMSs ¡
  • Timestamps ¡may ¡be ¡present ¡
  • r ¡not ¡
  • When ¡present, ¡they ¡are ¡used ¡
  • nly ¡to ¡order ¡items ¡before ¡

entering ¡the ¡engine, ¡then ¡they ¡ are ¡forgohen ¡

  • They ¡are ¡not ¡exposed ¡to ¡the ¡

language ¡

  • With ¡the ¡excep9on ¡of ¡

windowing ¡constructs ¡

  • Ordering ¡in ¡output ¡streams ¡is ¡

conceptually ¡separate ¡from ¡ the ¡ordering ¡in ¡input ¡streams ¡

CQL/Stream Select DStream(*) From F1[Rows 5], F2[Range 1 Minute] Where F1.A = F2.A

Relational Tables

Stream Stream S2R R2S R2R 43 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-44
SLIDE 44

Causal ¡Time ¡Model ¡

  • Each ¡item ¡has ¡a ¡label ¡

reflec9ng ¡some ¡kind ¡of ¡ causal ¡rela9onship ¡

  • Par9al ¡order ¡
  • E.g. ¡Rapide ¡
  • An ¡event ¡is ¡causally ¡
  • rdered ¡aYer ¡all ¡events ¡

that ¡led ¡to ¡its ¡occurrence ¡

Gigascope Select count(*) From A, B Where A.a-1 <= B.b and A.a+1 > B.b A.a, B.b monotonically increase

A ¡ B ¡ C ¡

44 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-45
SLIDE 45

Absolute ¡Time ¡Model ¡

  • Informa9on ¡items ¡have ¡

an ¡associated ¡ 9mestamp ¡

  • Defining ¡a ¡single ¡point ¡

in ¡9me ¡w.r.t. ¡a ¡ (logically)unique ¡clock ¡

  • Total ¡order ¡
  • Timestamps ¡are ¡fully ¡

exposed ¡to ¡the ¡language ¡

  • Informa9on ¡items ¡can ¡

be ¡9mestamped ¡at ¡ source ¡or ¡entering ¡the ¡ engine ¡

TESLA/T-Rex Define Fire(area: string, measuredTemp: double) From Smoke(area=$a) and last Temp(area=$a and value>45) within 5 min. from Smoke Where area=Smoke.area and measuredTemp=Temp.value

45 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-46
SLIDE 46

Interval ¡Time ¡Model ¡

  • Used ¡for ¡events ¡to ¡include ¡“dura9on” ¡
  • SnoopIB, ¡Cayuga, ¡NextCEP, ¡… ¡
  • At ¡a ¡first ¡sight, ¡it ¡is ¡a ¡simple ¡extension ¡of ¡the ¡

absolute ¡9me ¡model ¡

  • Timestamps ¡with ¡two ¡values: ¡start ¡9me ¡and ¡end ¡

9me ¡

  • However, ¡it ¡opens ¡many ¡issues ¡
  • What ¡is ¡the ¡successor ¡of ¡an ¡event? ¡
  • What ¡is ¡the ¡9mestamp ¡associated ¡to ¡a ¡composite ¡

event? ¡

46 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-47
SLIDE 47

Interval ¡Time ¡Model ¡

  • Which ¡is ¡the ¡immediate ¡

successor ¡of ¡A? ¡

  • Choose ¡according ¡to ¡end ¡9me ¡only: ¡

B ¡

  • But ¡it ¡started ¡before ¡A! ¡
  • Exclude ¡B: ¡C, ¡D ¡
  • Both ¡of ¡them? ¡
  • Which ¡of ¡them? ¡
  • No ¡other ¡event ¡strictly ¡between ¡A ¡

and ¡its ¡successor: ¡C, ¡D, ¡E ¡

  • Seems ¡a ¡natural ¡defini9on ¡
  • Unfortunately ¡we ¡loose ¡associa9vity! ¡

– Xà(YàZ) ¡≠ ¡(X ¡àY)àZ ¡

  • May ¡impede ¡some ¡rule ¡rewri9ng ¡for ¡

processing ¡op9miza9ons ¡

A B C D E

47 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-48
SLIDE 48

Interval ¡Time ¡Model ¡

  • “What ¡is ¡“Next” ¡in ¡event ¡processing?” ¡by ¡White ¡
  • et. ¡Al ¡
  • Proposes ¡a ¡number ¡of ¡desired ¡proper9es ¡to ¡be ¡

sa9sfied ¡by ¡the ¡“Next” ¡func9on ¡

  • There ¡is ¡one ¡model ¡that ¡sa9sfies ¡them ¡all ¡
  • Complete ¡History ¡
  • It ¡is ¡not ¡sufficient ¡to ¡encode ¡9mestamps ¡using ¡a ¡

couple ¡of ¡values ¡

  • Timestamps ¡of ¡composite ¡events ¡must ¡embed ¡the ¡

9mestamps ¡of ¡all ¡the ¡events ¡that ¡led ¡to ¡their ¡

  • ccurrence ¡
  • Possibly, ¡9mestamps ¡of ¡unbounded ¡size ¡
  • In ¡case ¡of ¡unbounded ¡Seq ¡

48 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-49
SLIDE 49

Data ¡Model ¡

  • Studies ¡how ¡the ¡different ¡

systems ¡

  • Represent ¡single ¡data ¡items ¡
  • Organize ¡them ¡into ¡data ¡

flows ¡

Data

  • Generic ¡Data ¡
  • Event ¡No9fica9ons ¡
  • Records ¡
  • Tuples ¡
  • Objects ¡
  • … ¡

Data Items Nature of Items Format Support for Uncertainty Data Flows

  • Homogeneous ¡
  • Heterogeneous ¡

49 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-50
SLIDE 50

Nature ¡of ¡Items ¡

  • The ¡meaning ¡we ¡associate ¡to ¡

informa9on ¡items ¡

  • Generic ¡data ¡
  • Event ¡no9fica9ons ¡
  • Deeply ¡influences ¡several ¡
  • ther ¡aspects ¡of ¡an ¡IFP ¡system ¡
  • Time ¡model ¡!!! ¡
  • Rule ¡language ¡
  • Seman9cs ¡of ¡processing ¡
  • Heritage ¡of ¡the ¡

heterogeneous ¡backgrounds ¡

  • f ¡different ¡communi9es ¡

Data

  • Generic ¡Data ¡
  • Event ¡No9fica9ons ¡
  • Records ¡
  • Tuples ¡
  • Objects ¡
  • … ¡

Data Items Nature of Items Format Support for Uncertainty Data Flows

  • Homogeneous ¡
  • Heterogeneous ¡

50 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-51
SLIDE 51

Nature ¡of ¡Items ¡

CQL/Stream ¡(Generic ¡Data) ¡

Select IStream(*) From F1[Rows 5], F2[Range 1 Minute] Where F1.A = F2.A

¡ TESLA/T-­‑Rex ¡(Event ¡No>fica>ons) ¡

Define Fire (area: string, measuredTemp: double) From Smoke(area=$a)and last Temp(area=$a and value>45) within 5 min. from Smoke Where area=Smoke.area and measuredTemp=Temp.value

Relational Tables

Stream Stream S2R R2S R2R

51 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-52
SLIDE 52

Format ¡of ¡Items ¡

  • How ¡informa9on ¡is ¡

represented ¡

  • Influences ¡the ¡way ¡items ¡

are ¡processed ¡

  • E.g., ¡Rela9onal ¡model ¡

requires ¡tuples ¡

Data

  • Generic ¡Data ¡
  • Event ¡No9fica9ons ¡
  • Records ¡
  • Tuples ¡
  • Objects ¡
  • … ¡

Data Items Nature of Items Format Support for Uncertainty Data Flows

  • Homogeneous ¡
  • Heterogeneous ¡

52 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-53
SLIDE 53

Support ¡for ¡Uncertainty ¡

  • Ability ¡to ¡associate ¡a ¡degree ¡of ¡

uncertainty ¡to ¡informa9on ¡items ¡

  • To ¡the ¡content ¡of ¡items ¡
  • Imprecise ¡temperature ¡reading ¡
  • To ¡the ¡presence ¡of ¡an ¡item ¡

(occurrence ¡of ¡an ¡event) ¡

  • Spurious ¡RFID ¡reading ¡
  • When ¡present, ¡probabilis9c ¡

informa9on ¡is ¡usually ¡exploited ¡ in ¡rules ¡during ¡processing ¡ [more ¡on ¡this ¡later] ¡

Data

  • Generic ¡Data ¡
  • Event ¡No9fica9ons ¡
  • Records ¡
  • Tuples ¡
  • Objects ¡
  • … ¡

Data Items Nature of Items Format Support for Uncertainty Data Flows

  • Homogeneous ¡
  • Heterogeneous ¡

53 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-54
SLIDE 54

Data ¡Flows ¡

  • Homogeneous ¡
  • Each ¡flow ¡contains ¡data ¡with ¡the ¡

same ¡format ¡and ¡“kind” ¡

  • E.g. ¡Tuples ¡with ¡iden9cal ¡

structure ¡

  • OYen ¡associated ¡with ¡

“database-­‑like” ¡rule ¡languages ¡

  • Heterogeneous ¡
  • Informa9on ¡flows ¡are ¡seen ¡as ¡

channels ¡connec9ng ¡sources, ¡ processors, ¡and ¡sinks ¡

  • Each ¡channel ¡may ¡transport ¡

items ¡with ¡different ¡kind ¡and ¡ format ¡

Data

  • Generic ¡Data ¡
  • Event ¡No9fica9ons ¡
  • Records ¡
  • Tuples ¡
  • Objects ¡
  • … ¡

Data Items Nature of Items Format Support for Uncertainty Data Flows

  • Homogeneous ¡
  • Heterogeneous ¡

54 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-55
SLIDE 55

Rule ¡Model ¡

  • Rules ¡are ¡much ¡more ¡complex ¡

en99es ¡than ¡data ¡items ¡

  • Large ¡number ¡of ¡different ¡

approaches ¡

  • Already ¡observed ¡in ¡the ¡

previous ¡slides ¡

  • Looking ¡back ¡to ¡our ¡func9onal ¡

model, ¡we ¡classify ¡them ¡into ¡ two ¡macro ¡classes ¡

  • Transforming ¡rules ¡
  • Detec9ng ¡rules ¡

Rule

  • Transforming ¡Rules ¡
  • Detec9ng ¡Rules ¡

Type of Rules Support for Uncertainty

55 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-56
SLIDE 56

Transforming ¡Rules ¡

  • Do ¡not ¡present ¡an ¡explicit ¡dis9nc9on ¡

between ¡detec9on ¡and ¡produc9on ¡

  • Define ¡an ¡execu9on ¡plan ¡combining ¡

primi(ve ¡operators ¡

  • Each ¡operator ¡transforms ¡one ¡or ¡more ¡

input ¡flows ¡into ¡one ¡or ¡more ¡output ¡ flows ¡

  • The ¡execu9on ¡plan ¡can ¡be ¡defined ¡
  • explicitly ¡(e.g., ¡through ¡graphical ¡

nota9on) ¡

  • implicitly ¡(using ¡a ¡high ¡level ¡language) ¡
  • OYen ¡used ¡with ¡homogeneous ¡

informa9on ¡flows ¡

  • To ¡take ¡advantage ¡of ¡the ¡predefined ¡

structure ¡of ¡input ¡and ¡output ¡

Rule

  • Transforming ¡Rules ¡
  • Detec9ng ¡Rules ¡

Type of Rules Support for Uncertainty

56 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-57
SLIDE 57

Detec9ng ¡Rules ¡

  • Present ¡an ¡explicit ¡

dis9nc9on ¡between ¡ detec9on ¡and ¡produc9on ¡

  • Usually, ¡the ¡detec9on ¡is ¡

based ¡on ¡a ¡logical ¡predicate ¡ that ¡captures ¡paKerns ¡of ¡ interest ¡in ¡the ¡history ¡of ¡ received ¡items ¡

Rule

  • Transforming ¡Rules ¡
  • Detec9ng ¡Rules ¡

Type of Rules Support for Uncertainty

57 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-58
SLIDE 58

Support ¡for ¡Uncertainty ¡

  • Two ¡orthogonal ¡aspects ¡
  • Support ¡for ¡uncertain ¡input ¡
  • Allows ¡rules ¡to ¡deal ¡with/

reason ¡about ¡uncertain ¡input ¡ data ¡

  • Support ¡for ¡uncertain ¡output ¡
  • Allows ¡rules ¡to ¡associate ¡a ¡

degree ¡of ¡uncertainty ¡to ¡the ¡

  • utput ¡produced ¡

[more ¡on ¡this ¡later] ¡

Rule

  • Transforming ¡Rules ¡
  • Detec9ng ¡Rules ¡

Type of Rules Support for Uncertainty

58 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-59
SLIDE 59

Language ¡Model ¡

  • Specify ¡opera9ons ¡to ¡
  • Filter ¡
  • Join ¡
  • Aggregate ¡
  • input ¡flows ¡… ¡
  • … ¡to ¡produce ¡one ¡or ¡

more ¡output ¡flows ¡

  • Following ¡the ¡rule ¡

model, ¡we ¡define ¡two ¡ classes ¡of ¡languages: ¡

  • Transforming ¡languages ¡
  • Declara9ve ¡languages ¡
  • Impera9ve ¡languages ¡
  • Detec9ng ¡languages ¡
  • Pahern-­‑based ¡

59 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-60
SLIDE 60
  • Following ¡the ¡rule ¡

model, ¡we ¡define ¡two ¡ classes ¡of ¡languages: ¡

  • Transforming ¡languages ¡
  • Declara9ve ¡languages ¡
  • Impera9ve ¡languages ¡
  • Detec9ng ¡languages ¡
  • Pahern-­‑based ¡

Language ¡Model ¡

  • Specify ¡the ¡expected ¡

result ¡rather ¡than ¡the ¡ desired ¡execu9on ¡flow ¡

  • Usually ¡derive ¡from ¡

rela9onal ¡languages ¡

  • Rela9onal ¡algebra ¡/ ¡SQL ¡

CQL/Stream: Select IStream(*) From F1[Rows 5], F2[Rows 10] Where F1.A = F2.A

60 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-61
SLIDE 61
  • Following ¡the ¡rule ¡

model, ¡we ¡define ¡two ¡ classes ¡of ¡languages: ¡

  • Transforming ¡languages ¡
  • Declara9ve ¡languages ¡
  • Impera9ve ¡languages ¡
  • Detec9ng ¡languages ¡
  • Pahern-­‑based ¡

Language ¡Model ¡

  • Specify ¡the ¡desired ¡

execu9on ¡flow ¡

  • Star9ng ¡from ¡primi9ve ¡
  • perators ¡
  • Can ¡be ¡user-­‑defined ¡
  • Usually ¡adopt ¡a ¡

graphical ¡nota9on ¡

61 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-62
SLIDE 62

Impera9ve ¡Languages ¡

Aurora (Boxes & Arrows Model)

62 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-63
SLIDE 63

Hybrid ¡Languages ¡

Oracle CEP

63 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-64
SLIDE 64
  • Following ¡the ¡rule ¡

model, ¡we ¡define ¡two ¡ classes ¡of ¡languages: ¡

  • Transforming ¡languages ¡
  • Declara9ve ¡languages ¡
  • Impera9ve ¡languages ¡
  • Detec9ng ¡languages ¡
  • Pahern-­‑based ¡

Language ¡Model ¡

  • Specify ¡a ¡firing ¡

condi9on ¡as ¡a ¡pahern ¡

  • Select ¡a ¡por9on ¡of ¡

incoming ¡flows ¡through ¡

  • Logic ¡operators ¡
  • Content ¡/ ¡9ming ¡

constraints ¡

  • The ¡ac9on ¡uses ¡

selected ¡items ¡to ¡ produce ¡new ¡ knowledge ¡

64 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-65
SLIDE 65

Detec9ng ¡Languages ¡

TESLA / T-Rex Define Fire(area: string, measuredTemp: double) From Smoke(area=$a) and last Temp(area=$a and value>45) within 5 min. from Smoke Where area=Smoke.area and measuredTemp=Temp.value

65 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-66
SLIDE 66

Language ¡Model ¡

  • Different ¡syntaxes ¡/ ¡constructs ¡/ ¡operators ¡
  • Comparison ¡of ¡languages ¡seman9cs ¡and ¡

expressiveness ¡s9ll ¡an ¡open ¡issue ¡

  • Our ¡approach: ¡
  • Review ¡all ¡operators ¡encountered ¡in ¡the ¡analysis ¡
  • f ¡systems ¡
  • Specifying ¡the ¡classes ¡of ¡languages ¡adop9ng ¡them ¡
  • Trying ¡to ¡capture ¡some ¡seman9cs ¡rela9onship ¡
  • Among ¡operators ¡

66 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-67
SLIDE 67

Language ¡Model ¡

  • Single-­‑Item ¡operators ¡
  • Selec9on ¡operators ¡
  • Filter ¡items ¡according ¡to ¡their ¡

content ¡

  • Elabora9on ¡operators ¡
  • Projec9on ¡

– Extracts ¡a ¡part ¡of ¡the ¡content ¡

  • f ¡an ¡item ¡
  • Renaming ¡

– Changes ¡the ¡name ¡of ¡a ¡field ¡in ¡ languages ¡based ¡on ¡records ¡or ¡ tuples ¡

  • Present ¡in ¡all ¡languages ¡
  • Defined ¡as ¡primi9ve ¡operators ¡in ¡

impera9ve ¡languages ¡

  • Declara9ve ¡languages ¡inherit ¡

selec9on, ¡projec9on, ¡and ¡ renaming ¡from ¡rela9onal ¡algebra ¡

67 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

Select RStream (I.Price as HighPrice) From Items[Rows 1] as I Where I.Price > 100

Renaming Projection Selection

slide-68
SLIDE 68

Language ¡Model ¡

  • Single-­‑Item ¡operators ¡
  • Selec9on ¡operators ¡
  • Filter ¡items ¡according ¡to ¡their ¡

content ¡

  • Elabora9on ¡operators ¡
  • Projec9on ¡

– Extracts ¡a ¡part ¡of ¡the ¡content ¡

  • f ¡an ¡item ¡
  • Renaming ¡

– Changes ¡the ¡name ¡of ¡a ¡field ¡in ¡ languages ¡based ¡on ¡records ¡or ¡ tuples ¡

  • Pahern-­‑based ¡languages ¡
  • Selec9on ¡inside ¡the ¡condi9on ¡

part ¡(pahern) ¡

  • Elabora9on ¡as ¡part ¡of ¡the ¡

ac9on ¡

68 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

Define ExpensiveItem (highPrice: double) From Item(price>100) Where highPrice = price

Selection Renaming Projection

slide-69
SLIDE 69

Language ¡Model ¡

  • Logic ¡Operators ¡
  • Conjunc9on ¡
  • Disjunc9on ¡
  • Repe99on ¡
  • Nega9on ¡
  • Explicitly ¡present ¡in ¡pahern-­‑

based ¡languages ¡

69 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

PADRES (A & B) || (C & D)

Conjunction Disjunc9on

slide-70
SLIDE 70

Language ¡Model ¡

  • Logic ¡Operators ¡
  • Conjunc9on ¡
  • Disjunc9on ¡
  • Repe99on ¡
  • Nega9on ¡
  • Some ¡logic ¡operators ¡are ¡blocking ¡
  • Express ¡pahern ¡whose ¡validity ¡

cannot ¡be ¡decided ¡into ¡a ¡ bounded ¡amount ¡of ¡9me ¡

  • E.g., ¡Nega9on ¡
  • Used ¡in ¡conjunc9on ¡with ¡

windows ¡

70 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

Define Fire() From Smoke(area=$a) and not Rain(area=$a) within 10 min from Smoke

Nega9on Window

slide-71
SLIDE 71

Language ¡Model ¡

  • Logic ¡Operators ¡
  • Conjunc9on ¡
  • Disjunc9on ¡
  • Repe99on ¡
  • Nega9on ¡
  • Tradi(onally, ¡logic ¡operators ¡

were ¡not ¡explicitly ¡offered ¡by ¡ declara9ve ¡and ¡impera9ve ¡ languages ¡

  • However, ¡they ¡could ¡be ¡

expressed ¡as ¡transforma9on ¡of ¡ input ¡flows ¡

71 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

Select IStream (F1.A, F2.B) From F1 [Rows 10], F2 [Rows 20]

Conjunc9on ¡of ¡A ¡and ¡B

slide-72
SLIDE 72

Language ¡Model ¡

  • Sequences ¡
  • Similar ¡to ¡logic ¡operators ¡
  • Based ¡on ¡9ming ¡

rela9ons ¡among ¡items ¡

  • Present ¡in ¡almost ¡all ¡

pahern-­‑based ¡ languages ¡

72 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

Define Fire() From Smoke(area=$a) and last Temp(area=$a and value>45) within 5 min. from Smoke

Sequence ¡(9me-­‑bounded)

slide-73
SLIDE 73

Language ¡Model ¡

  • Sequences ¡
  • Similar ¡to ¡logic ¡operators ¡
  • Based ¡on ¡9ming ¡

rela9ons ¡among ¡items ¡

  • Tradi(onally, ¡transforming ¡

languages ¡did ¡not ¡provide ¡ sequences ¡explicitly ¡

  • Could ¡be ¡expressed ¡with ¡an ¡

explicit ¡reference ¡to ¡ 9mestamps ¡

  • If ¡present ¡inside ¡items ¡

73 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

Select IStream (F1.A, F2.B) From F1 [Rows 10], F2 [Rows 20] Where F1.timestamp < F2.timestamp

Impose ¡9mestamp ¡order

slide-74
SLIDE 74

Language ¡Model ¡

  • Itera9ons ¡
  • Express ¡possibly ¡unbounded ¡sequences ¡of ¡items ¡… ¡
  • … ¡sa9sfying ¡an ¡itera(ng ¡condi9on ¡
  • Implicitly ¡defines ¡an ¡ordering ¡among ¡items ¡

SASE+ PATTERN SEQ(Alert a, Shipment+ b[ ]) WHERE skip_till_any_match(a, b[ ]) { a.type = ’contaminated’ and b[1].from = a.site and b[i].from = b[i-1].to } WITHIN 3 hours

Itera9on ¡(Kleene ¡+)

74 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-75
SLIDE 75

Language ¡Model ¡

  • Logic ¡operators, ¡

sequences, ¡and ¡ itera9ons ¡tradi(onally ¡ not ¡offered ¡by ¡ transforming ¡languages ¡

  • And ¡now? ¡
  • Current ¡trend: ¡
  • Embed ¡paherns ¡inside ¡

declara9ve ¡languages ¡

  • Especially ¡adopted ¡in ¡

commercial ¡systems ¡

  • IMO: ¡difficult ¡to ¡write ¡/ ¡

understand ¡

  • Mailing ¡list ¡of ¡Esper! ¡

Esper Select A.price From pattern [every (A à(B or C))] Where A.price > 100

75 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-76
SLIDE 76

Language ¡Model ¡

  • Windows ¡
  • Kind: ¡
  • Logical ¡(Time-­‑Based) ¡
  • Physical ¡(Count-­‑

Based) ¡

  • User-­‑Defined ¡

Logical Select IStream(Count(*)) From F1[Range 1 Minute] Physical Select IStream(Count(*)) From F1[Rows 50 Slide 10]

76 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-77
SLIDE 77

Language ¡Model ¡

  • Windows ¡are ¡used ¡to ¡limit ¡the ¡scope ¡of ¡blocking ¡operators ¡
  • They ¡are ¡generally ¡available ¡in ¡declara9ve ¡and ¡impera9ve ¡

languages ¡

  • They ¡are ¡not ¡present ¡in ¡all ¡pahern-­‑based ¡languages ¡
  • Some ¡of ¡them ¡do ¡not ¡include ¡blocking ¡operators ¡
  • Some ¡of ¡them ¡“embed” ¡windows ¡inside ¡operators ¡
  • Making ¡them ¡unblocking ¡

CEDR EVENT Test-Rule WHEN UNLESS(A, B, 12 hours) WHERE A.a < B.b

77 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-78
SLIDE 78

Language ¡Model ¡

  • Windows ¡movement ¡
  • Fixed: ¡do ¡not ¡move ¡at ¡all ¡
  • Landmark: ¡have ¡a ¡fixed ¡lower ¡bound, ¡while ¡the ¡upper ¡

bound ¡advances ¡every ¡9me ¡a ¡new ¡informa9on ¡item ¡ enters ¡the ¡system ¡

  • E.g., ¡all ¡items ¡since ¡1/1/2013 ¡
  • Sliding: ¡have ¡a ¡fixed ¡size, ¡both ¡lower ¡and ¡upper ¡

bounds ¡advance ¡when ¡new ¡items ¡enter ¡the ¡system ¡

  • Pane: ¡both ¡the ¡lower ¡and ¡the ¡upper ¡bounds ¡move ¡by ¡

k ¡elements, ¡as ¡k ¡elements ¡enter ¡the ¡system ¡

  • K ¡is ¡smaller ¡than ¡the ¡window ¡size ¡
  • Tumble: ¡same ¡as ¡above ¡
  • K ¡is ¡greater ¡or ¡equal ¡to ¡the ¡window ¡size ¡

78 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-79
SLIDE 79

Language ¡Model ¡

  • Flow ¡management ¡operators ¡
  • Required ¡by ¡declara9ve ¡and ¡impera9ve ¡languages ¡to ¡

merge, ¡split, ¡organize, ¡and ¡process ¡incoming ¡flows ¡of ¡ informa9on ¡

Flow Management Operators Join Bag Operators Duplicate Union Except Intersect Remove-duplicates Group By Order By Flow Creation

79 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-80
SLIDE 80

Language ¡Model ¡

  • Parameteriza9on ¡
  • Allows ¡the ¡binding ¡of ¡

different ¡informa9on ¡ items ¡based ¡on ¡their ¡ content ¡

  • Offered ¡implicitly ¡by ¡

declara9ve ¡and ¡ impera9ve ¡languages ¡

  • Through ¡a ¡combina9on ¡of ¡

join ¡and ¡selec9on ¡

  • Offered ¡as ¡an ¡explicit ¡
  • perator ¡in ¡pahern-­‑

based ¡languages ¡

CQL / Stream Select IStream (F1.A, F2.B) From F1 [Rows 10], F2 [Rows 20] Where F1.A > F2.B Cartesian ¡ product Selec9on Explicit ¡Parameter TESLA / T-Rex Define Fire() From Smoke(area=$a) and last Temp(area=$a and value>45) within 5 min. from Smoke ¡

80 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-81
SLIDE 81

Language ¡Model ¡

Aggregates

  • Detec9on ¡Aggregates ¡
  • Produc9on ¡Aggregates ¡

Scope Definition

  • Predefined ¡
  • User-­‑defined ¡

Define Fire(area: string, measuredTemp: double) From Smoke(area=$a) and 45 < Avg(Temp(area=$a).value within 5 min. from Smoke) Where area=Smoke.area and measuredTemp=Temp.value Define Fire(area: string, measuredTemp: double) From Smoke(area=$a) and last Temp(area=$a and value>45) within 5 min. from Smoke) Where area=Smoke.area and measuredTemp=Avg(Temp(area=$a).value) within 1 hour from Smoke Detec9on ¡ Aggregate Produc9on ¡ Aggregate

81 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-82
SLIDE 82

Discussion ¡

82 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-83
SLIDE 83

Abstrac9on ¡

  • IFP ¡languages ¡and ¡

systems ¡offer ¡a ¡level ¡of ¡ abstrac9on ¡over ¡flowing ¡ informa9on ¡

  • Similar ¡to ¡the ¡role ¡SQL ¡/ ¡

DBMSs ¡play ¡for ¡sta9c ¡data ¡

  • The ¡heterogeneity ¡of ¡

solu9ons ¡suggests ¡that ¡ finding ¡the ¡“right” ¡ abstrac9on ¡is ¡s9ll ¡an ¡open ¡ issue ¡

  • Several ¡open ¡ques9ons ¡

IFP System Applications API (Including Rules)

83 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-84
SLIDE 84

Abstrac9on ¡

  • Which ¡are ¡the ¡requirements ¡of ¡applica9ons? ¡
  • According ¡to ¡the ¡results ¡of ¡EPTS ¡survey ¡(2010) ¡
  • Simple ¡opera9ons ¡(mainly ¡aggregate ¡/ ¡join) ¡
  • Few ¡sources ¡(mainly ¡1-­‑10, ¡and ¡10-­‑100) ¡
  • Low ¡rates ¡(mainly ¡10-­‑100, ¡and ¡100-­‑1000 ¡event/s) ¡
  • Data ¡coming ¡from ¡DBMSs ¡/ ¡files ¡

84 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-85
SLIDE 85

Abstrac9on ¡

  • How ¡can ¡we ¡explain ¡these ¡answers? ¡
  • IFP ¡systems ¡used ¡as ¡“enhanced” ¡DBMSs ¡
  • IMO, ¡companies ¡are ¡using ¡the ¡technology ¡they ¡know ¡

– E.g. ¡Language: ¡no ¡need ¡for ¡paherns ¡or ¡no ¡knowledge ¡about ¡ paherns? ¡

  • Features ¡vs ¡Simplicity/Integra9on ¡
  • This ¡is ¡the ¡“consolidated” ¡part ¡of ¡IFP ¡systems ¡
  • IMO, ¡raising ¡the ¡level ¡of ¡abstrac9on ¡would ¡make ¡IFP ¡

systems ¡more ¡appealing ¡for ¡a ¡larger ¡audience ¡

– Is ¡it ¡possible ¡to ¡combine ¡advanced ¡features ¡and ¡ease ¡of ¡use? ¡

85 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-86
SLIDE 86

Abstrac9on ¡

  • Other ¡details ¡are ¡present ¡in ¡the ¡EPTS ¡survey ¡
  • Most ¡of ¡the ¡people ¡was ¡referring ¡to ¡technologies ¡that ¡

were ¡“already ¡deployed” ¡or ¡“in ¡development” ¡

  • The ¡systems ¡were ¡chosen ¡based ¡on ¡the ¡trust ¡on ¡the ¡

vendor ¡

  • This ¡suggests ¡that ¡the ¡last ¡(research) ¡

advancements ¡in ¡event ¡processing ¡may ¡be ¡s9ll ¡ unknown ¡

  • They ¡lack ¡a ¡solid ¡implementa9on ¡… ¡
  • … ¡that ¡can ¡easily ¡work ¡side ¡by ¡side ¡with ¡exis9ng ¡data ¡

processing ¡systems ¡

86 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-87
SLIDE 87

Abstrac9on ¡

  • How ¡many ¡kinds ¡of ¡languages ¡/ ¡abstrac9ons? ¡
  • Tradi9onally, ¡two ¡
  • Transforming ¡rules ¡

– Based ¡on ¡the ¡Stream ¡model ¡

  • Detec9ng ¡rules ¡

– Based ¡on ¡paherns ¡

  • OYen ¡merged ¡together ¡in ¡commercial ¡systems ¡
  • “Merged ¡together” ¡does ¡not ¡mean ¡“organically ¡combined” ¡
  • The ¡underlying ¡model ¡is ¡usually ¡derived ¡from ¡the ¡Stream ¡

model ¡

– Good ¡integra9on ¡with ¡rela9onal ¡languages ¡ – Difficult ¡to ¡integrate ¡with ¡paherns ¡ – Difficult ¡to ¡understand ¡the ¡seman9cs ¡of ¡rules ¡

  • Can ¡we ¡offer ¡a ¡beher ¡model ¡/ ¡formalism? ¡

87 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-88
SLIDE 88

Abstrac9on ¡

  • Do ¡we ¡really ¡need ¡“One ¡abstrac9on ¡to ¡rule ¡‘em ¡all”? ¡
  • Again, ¡we ¡need ¡to ¡beher ¡understand ¡applica9on ¡

requirements ¡… ¡

  • … ¡but ¡we ¡also ¡need ¡to ¡beher ¡analyze ¡the ¡expressiveness ¡

and ¡seman9cs ¡of ¡languages! ¡

  • In ¡our ¡survey, ¡we ¡offer ¡a ¡descrip9on ¡of ¡exis9ng ¡
  • perators ¡
  • Open ¡issues: ¡
  • How ¡do ¡operators ¡contribute ¡to ¡the ¡overall ¡expressiveness ¡
  • f ¡languages? ¡
  • Is ¡it ¡possible ¡to ¡find ¡a ¡“minimal ¡set” ¡of ¡operators ¡to ¡
  • rganically ¡combine ¡the ¡capabili9es ¡of ¡transforming ¡and ¡

detec9ng ¡rules? ¡

88 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-89
SLIDE 89

Our ¡Proposal: ¡TESLA ¡

  • “One ¡size ¡fits ¡all” ¡language ¡does ¡not ¡exist ¡
  • At ¡least, ¡we ¡have ¡to ¡find ¡it ¡yet ¡
  • We ¡started ¡from ¡the ¡following ¡requirements ¡
  • Focus ¡specifically ¡on ¡events ¡
  • Not ¡generic ¡data ¡processing ¡
  • Define ¡a ¡clear ¡and ¡precise ¡seman9cs ¡
  • Issues ¡of ¡selec9on ¡and ¡consump9on ¡policies ¡
  • General ¡issue ¡of ¡formal ¡seman9cs ¡
  • Be ¡expressive ¡
  • Useful ¡for ¡applica9ons ¡
  • Keep ¡it ¡simple ¡
  • Easy ¡to ¡read ¡and ¡write ¡

89 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-90
SLIDE 90

Define CE(Att1 : Type1, …, Attn : Typen) From Pattern Where Att1 = f1(..), …, Attn = fn(..) Consuming e1, …, em

TESLA ¡

90 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-91
SLIDE 91

B ¡ CE ¡ CE ¡

Paherns ¡in ¡TESLA ¡

  • Selec9on ¡of ¡a ¡single ¡event ¡
  • A(x>10)
  • Timer()
  • Selec9on ¡of ¡sequences ¡
  • A(x>10) and each B

within 5 min from A

  • A(x>10) and last B

within 5 min from A

  • A(x>10) and first B

within 5 min from A

  • Generaliza9on ¡
  • n-­‑first ¡/ ¡n-­‑last ¡

A ¡(X=15) ¡ B ¡ B ¡ CE ¡ A ¡ (X=15) ¡ B ¡ A ¡(X=15) ¡ B ¡ B ¡ A ¡(X=15) ¡ B ¡ B ¡ CE ¡ CE ¡ 5 ¡min ¡

91 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-92
SLIDE 92

Paherns ¡in ¡TESLA ¡

  • TESLA ¡allows ¡*-­‑within ¡operators ¡to ¡be ¡composed ¡

with ¡each ¡other: ¡

  • In ¡chains ¡of ¡events ¡
  • A and each B

within 3 min from A and last C within 2 min from B

  • In ¡parallel ¡
  • A and each B

within 3 min from A and last C within 4 min from A

  • Parameters ¡can ¡be ¡added ¡between ¡events ¡in ¡a ¡

pahern ¡

A ¡ B ¡ C ¡ B ¡ A ¡ C ¡

92 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-93
SLIDE 93

Nega9ons ¡and ¡Aggregates ¡

  • Two ¡kinds ¡of ¡nega9ons: ¡
  • Interval ¡based: ¡
  • A and last B

within 3 min from A and not C between B and A

  • Time ¡based: ¡
  • A and not C within 3 min from A
  • Similarly, ¡two ¡kinds ¡of ¡aggregates ¡
  • Interval ¡based ¡
  • Use ¡values ¡appearing ¡between ¡two ¡events ¡
  • Time ¡based ¡
  • Use ¡values ¡appearing ¡in ¡a ¡9me ¡interval ¡

93 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-94
SLIDE 94

Itera9ons ¡

  • We ¡believe ¡that ¡explicit ¡operators ¡for ¡

repe99ons ¡are ¡difficult ¡to ¡use/understand ¡

  • Especially ¡when ¡different ¡selec9on/consump9on ¡

policies ¡are ¡allowed ¡

  • We ¡achieve ¡the ¡same ¡goal ¡using ¡hierarchies ¡of ¡

events ¡

  • Complex ¡events ¡can ¡be ¡used ¡to ¡define ¡(more) ¡

complex ¡events ¡

  • Recurring ¡schemes ¡of ¡repe99ons ¡
  • Macros! ¡ ¡

94 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-95
SLIDE 95

Formal ¡Seman9cs ¡

  • The ¡seman9cs ¡of ¡each ¡TESLA ¡operator ¡/ ¡rule ¡is ¡formally ¡

defined ¡through ¡a ¡set ¡of ¡TRIO ¡metric ¡temporal ¡logic ¡ formulas ¡

  • They ¡define ¡an ¡equivalence ¡between ¡the ¡presence ¡of ¡a ¡given ¡

pahern ¡and ¡the ¡occurrence ¡of ¡one ¡or ¡more ¡complex ¡events, ¡ specifying: ¡

  • The ¡occurrence ¡(me ¡of ¡complex ¡events ¡
  • The ¡content ¡of ¡complex ¡events ¡
  • The ¡set ¡of ¡consumed ¡events ¡
  • The ¡language ¡is ¡unambiguous ¡
  • A ¡user ¡can ¡in ¡advance ¡check ¡the ¡seman9cs ¡of ¡her ¡rules ¡
  • This ¡makes ¡it ¡possible ¡to ¡check ¡the ¡correctness ¡of ¡an ¡event ¡

detec9on ¡engine ¡using ¡a ¡model ¡checker ¡

  • Given ¡a ¡history ¡of ¡events ¡and ¡a ¡set ¡of ¡TESLA ¡rules ¡… ¡
  • … ¡does ¡the ¡engine ¡sa9sfy ¡all ¡the ¡formulas ¡? ¡

95 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-96
SLIDE 96

Abstrac9on ¡

  • Support ¡for ¡uncertainty ¡
  • Many ¡applica9ons ¡deal ¡with ¡imprecise ¡(or ¡even ¡

incorrect) ¡data ¡from ¡sources ¡

  • E.g., ¡sensors, ¡RFID, ¡… ¡
  • Uncertain ¡rules ¡may ¡increase ¡the ¡expressiveness ¡/ ¡

usefulness ¡of ¡an ¡IFP ¡system ¡ [more ¡on ¡this ¡later] ¡

96 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-97
SLIDE 97

Abstrac9on ¡

  • Support ¡for ¡QoS ¡policies ¡
  • Allow ¡users ¡to ¡define ¡applica9on-­‑dependent ¡policies ¡
  • Which ¡data ¡is ¡more ¡important? ¡
  • Which ¡items ¡is ¡it ¡beher ¡to ¡discard ¡in ¡case ¡of ¡system ¡
  • verload? ¡
  • Which ¡QoS ¡metric ¡is ¡more ¡significant ¡for ¡the ¡applica9on? ¡

– Completeness ¡of ¡results ¡ – Latency ¡ – … ¡

  • Tradi9onally ¡offered ¡only ¡by ¡DSMSs ¡
  • Most ¡systems ¡simply ¡adopt ¡a ¡best-­‑effort ¡strategy ¡

97 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-98
SLIDE 98

Abstrac9on ¡

  • Support ¡for ¡a ¡Knowledge ¡Base ¡
  • Some ¡systems ¡offer ¡special ¡opera9ons ¡to ¡read ¡

from ¡persistent ¡storage ¡

  • Possibly ¡a ¡key-­‑feature ¡for ¡the ¡integra9on ¡with ¡

exis9ng ¡DBMSs ¡

  • Support ¡for ¡periodic ¡evalua9on ¡of ¡rules ¡
  • As ¡opposed ¡to ¡purely ¡reac9ve ¡evalua9on ¡

98 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-99
SLIDE 99

Abstrac9on ¡

  • Capability ¡to ¡dynamically ¡change ¡the ¡set ¡of ¡

deployed ¡rules ¡

  • Add ¡/ ¡Remove ¡
  • Ac9vate ¡/ ¡Deac9vate ¡
  • Context ¡awareness ¡
  • Tutorial ¡at ¡DEBS ¡2010 ¡
  • Could ¡be ¡used ¡to ¡increase ¡the ¡expressiveness ¡of ¡IFP ¡… ¡
  • … ¡but ¡also ¡to ¡simplify ¡/ ¡speedup ¡processing ¡
  • Context ¡/ ¡Situa9on ¡used ¡to ¡reason ¡on ¡the ¡status ¡of ¡the ¡

system ¡/ ¡applica9on ¡

  • Possibly ¡combined ¡with ¡the ¡possibility ¡to ¡ac9vate ¡/ ¡

deac9vate ¡rules ¡

99 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-100
SLIDE 100

Abstrac9on ¡

  • Where ¡to ¡offer ¡the ¡IFP ¡abstrac9on? ¡
  • As ¡a ¡standalone ¡product/system ¡
  • Similar ¡to ¡DBMSs ¡
  • As ¡a ¡middleware ¡component ¡
  • Similar ¡to ¡a ¡Publish/Subscribe ¡system ¡
  • To ¡guide ¡the ¡interac9on ¡of ¡other ¡components ¡
  • As ¡part ¡of ¡a ¡programming ¡language ¡
  • Similar ¡to ¡what ¡LINQ ¡(Language-­‑Integrated ¡Query) ¡
  • ffers ¡to ¡C# ¡and ¡to ¡the ¡.Net ¡Framework ¡
  • Explored ¡in ¡EventJava ¡

– Extension ¡of ¡Java ¡for ¡event ¡correla9on ¡

100 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-101
SLIDE 101

Time ¡

  • Many ¡exis9ng ¡systems ¡offer ¡operators ¡that ¡rely ¡of ¡

some ¡no9on ¡of ¡9me ¡

  • Main ¡problem: ¡out-­‑of-­‑order ¡arrival ¡of ¡informa9on ¡

items ¡

  • Requirements ¡
  • Preserve ¡the ¡seman9cs ¡of ¡processing ¡
  • Keep ¡the ¡delay ¡for ¡obtaining ¡results ¡as ¡small ¡as ¡possible ¡
  • Solu9ons ¡
  • Trade-­‑off ¡between ¡correct ¡and ¡low ¡latency ¡processing ¡

– Some9mes ¡controlled ¡by ¡users ¡through ¡predefined ¡or ¡customizable ¡ policies ¡

  • Open ¡issues ¡
  • Solu9ons ¡for ¡distributed ¡/ ¡incremental ¡processing ¡may ¡introduce ¡

delay ¡at ¡each ¡processing ¡step ¡

– Problem ¡not ¡addressed ¡in ¡exis9ng ¡solu9ons ¡for ¡distributed ¡processing ¡

101 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-102
SLIDE 102

Processing ¡

  • Many ¡processing ¡algorithms ¡proposed ¡
  • DSMSs ¡cannot ¡exploit ¡tradi9onal ¡indexing ¡techniques ¡
  • New ¡effort ¡is ¡required ¡to ¡efficiently ¡evaluate ¡standing ¡queries ¡
  • Most ¡CEP ¡systems ¡are ¡based ¡on ¡automata ¡… ¡
  • … ¡or ¡in ¡general ¡incremental ¡processing ¡
  • Perform ¡processing ¡incrementally, ¡as ¡new ¡informa9on ¡is ¡available ¡
  • Academia: ¡ODE, ¡Cayuga, ¡NextCEP, ¡Amit, ¡TRex, ¡etc. ¡
  • Industry: ¡Esper/Nesper ¡
  • We ¡inves9gated ¡other ¡solu9ons ¡
  • Keep ¡the ¡whole ¡history ¡of ¡all ¡received ¡informa9on ¡items ¡
  • Ad-­‑hoc ¡data ¡structures ¡that ¡simplify ¡informa9on ¡retrieval ¡
  • Start ¡evalua9on ¡only ¡when ¡required ¡
  • Faster! ¡
  • Easier ¡to ¡parallelize ¡

102 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-103
SLIDE 103

Processing ¡

  • Are ¡we ¡using ¡the ¡right ¡algorithms? ¡
  • Can ¡we ¡isolate ¡the ¡best ¡algorithm ¡for ¡a ¡par9cular ¡

set ¡of ¡operators? ¡

  • Accurate ¡analysis ¡of ¡performance ¡
  • Can ¡we ¡switch ¡among ¡different ¡algorithms ¡

depending ¡from ¡the ¡workload? ¡

  • Deployed ¡rules ¡… ¡
  • … ¡but ¡also ¡analysis ¡of ¡traffic ¡

– Adap9ve ¡middleware ¡

103 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-104
SLIDE 104

Processing ¡

  • Exploit ¡parallel ¡hardware ¡
  • Mul9-­‑core ¡CPUs, ¡but ¡also ¡GP-­‑GPUs ¡
  • To ¡handle ¡several ¡rules ¡concurrently ¡
  • To ¡speedup ¡complex ¡opera9ons ¡inside ¡a ¡single ¡

rule ¡

  • Only ¡par9ally ¡inves9gated ¡

– E.g., ¡streaming ¡aggregates ¡

  • Can ¡be ¡extended ¡to ¡different ¡operators? ¡
  • Also ¡in ¡this ¡case ¡the ¡best ¡solu9on ¡may ¡depend ¡

from ¡the ¡workload ¡

104 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-105
SLIDE 105

Our ¡Experience ¡

0.01 0.1 1 10 100 2 2.5 3 3.5 4 4.5 5 Processing Time (ms) Number of States AIP Multiple Selection CDP CPU Multiple Selection CDP GPU Multiple Selection AIP Single Selection CDP CPU Single Selection CDP GPU Single Selection

105 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-106
SLIDE 106

Our ¡Experience ¡

  • GPU ¡can ¡significantly ¡speedup ¡huge ¡

computa9ons ¡

  • Fixed ¡overhead ¡to ¡ac9vate ¡it ¡makes ¡it ¡unsuitable ¡for ¡

simple ¡tasks ¡

  • Op9mal ¡workload: ¡reduced ¡set ¡of ¡very ¡complex ¡rules ¡
  • Addi9onal ¡advantage: ¡CPU ¡cores ¡are ¡free ¡for ¡other ¡

task ¡

  • Process ¡simple ¡rules ¡… ¡
  • … ¡but ¡also ¡handle ¡marshalling/unmarshalling ¡and ¡

communica9on ¡with ¡sources ¡and ¡sinks ¡

  • The ¡trend. ¡GPUs ¡are ¡becoming: ¡
  • Easier ¡to ¡program ¡
  • Suitable ¡for ¡an ¡increasing ¡number ¡of ¡tasks ¡
  • Not ¡only ¡data ¡parallel ¡algorithms ¡

106 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-107
SLIDE 107

Processing ¡

  • Exploit ¡exis9ng ¡models ¡for ¡computa9on ¡on ¡

clusters ¡/ ¡clouds ¡

  • Recently ¡received ¡great ¡ahen9on ¡
  • E.g. ¡Map-­‑Reduce ¡
  • Are ¡these ¡models ¡suitable ¡for ¡IFP ¡systems? ¡
  • To ¡efficiently ¡support ¡the ¡expressiveness ¡of ¡exis9ng ¡

languages ¡

  • Can ¡we ¡create ¡new ¡models? ¡
  • Explicitly ¡conceived ¡to ¡deal ¡with ¡IFP ¡rules ¡

107 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-108
SLIDE 108

Distribu9on ¡of ¡Processing ¡

  • Most ¡systems ¡rely ¡on ¡centralized ¡processing ¡
  • When ¡distributed ¡processing ¡is ¡allowed, ¡a ¡clustered ¡

deployment ¡model ¡is ¡oYen ¡adopted ¡

  • Coopera9ng ¡processors ¡are ¡co-­‑located ¡
  • The ¡problem ¡of ¡networked ¡distribu9on ¡has ¡been ¡

addressed ¡only ¡marginally ¡

  • Are ¡there ¡applica9ons ¡that ¡involve ¡large ¡scale ¡scenarios? ¡
  • E.g. ¡monitoring ¡applica9ons ¡
  • Poten9ally ¡introduce ¡new ¡issues ¡
  • Bandwidth ¡may ¡become ¡a ¡bohleneck ¡
  • Data ¡may ¡be ¡transferred ¡over ¡non-­‑dedicated ¡channels ¡
  • Several ¡applica9ons ¡may ¡run ¡on ¡the ¡same ¡“processing ¡network” ¡

108 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-109
SLIDE 109

Workloads ¡

  • A ¡major ¡problem ¡when ¡it ¡comes ¡to ¡evaluate ¡and ¡

compare ¡different ¡systems ¡is ¡the ¡lack ¡of ¡workloads ¡

  • Benchmark ¡
  • Only ¡one ¡benchmark ¡available: ¡Linear ¡Road ¡
  • Strongly ¡tailored ¡for ¡the ¡Stream ¡model ¡
  • Difficult ¡to ¡adapt ¡to ¡other ¡systems ¡
  • Huge ¡parameter ¡space ¡
  • Difficult ¡to ¡isolate ¡relevant ¡cases ¡
  • DEBS ¡Grand ¡Challenge ¡may ¡be ¡a ¡first ¡step ¡in ¡this ¡direc9on ¡

… ¡

  • Data ¡coming ¡from ¡real ¡/ ¡realis9c ¡use ¡cases ¡
  • To ¡understand ¡which ¡operators ¡are ¡more ¡important ¡… ¡
  • … ¡and ¡what ¡to ¡op9mize ¡in ¡the ¡processing ¡algorithm ¡

109 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-110
SLIDE 110

Security ¡/ ¡Privacy ¡

  • Define ¡security ¡models ¡and ¡policies ¡
  • Which ¡pieces ¡of ¡informa9on ¡can ¡be ¡consumed ¡be ¡

a ¡single ¡operator ¡or ¡a ¡set ¡of ¡operators ¡

  • Important: ¡output ¡data ¡may ¡have ¡a ¡different ¡

visibility ¡w.r.t. ¡input ¡data! ¡

  • The ¡system ¡may ¡be ¡allowed ¡to ¡consume ¡single ¡data ¡

items, ¡but ¡not ¡to ¡extract ¡new ¡informa9on ¡from ¡them, ¡

  • r ¡to ¡distribute ¡this ¡informa9on ¡
  • Implement ¡protocols ¡and ¡algorithms ¡to ¡

enforce ¡them ¡

110 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-111
SLIDE 111

Thanks ¡for ¡your ¡Ahen9on! ¡

111 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡

slide-112
SLIDE 112

Ques9ons? ¡

112 ¡ Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Models ¡