event processing lead: a formal specification for · contributions 10 a pattern algebra that...
TRANSCRIPT
![Page 1: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/1.jpg)
Anas Al Bassit, R&D@EURANOVA Sabri Skhiri, R&D@EURANOVA1
LEAD: A Formal Specification For Event Processing
![Page 2: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/2.jpg)
EURA NOVAOur business model
ENX Product factory
ENX R&D
ENX Cust. services
EURA NOVA (ENX) COLLABORATORS
CustomersPartners
InvestorsAcademics
EURA NOVA in figures
4 main areas of expertise: High performance & Distributed architecture, Graphs, Machine learning
10 years of research, development, and services in data & information management
24 thesis & master thesis produced in collaboration with 4 renowned universities30 Publications in scientific papers.5 open source projects released3 workshops colocated with IEEE Int. conference on Big Data (2016 - 2017 - 2018)
Currently supporting 4 major data shifts in 3 distinct industries
![Page 3: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/3.jpg)
Introduction
3
What is Complex Event Processing?
Systems that are able to detect interesting situations by correlating events from different streams, transforming and aggregating them, and then generating actions
are referred to as CEP engines
![Page 4: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/4.jpg)
Introduction
4
What is Complex Event Processing?
Systems that are able to detect interesting situations by correlating events from different streams, transforming and aggregating them, and then generating actions
are referred to as CEP engines
IF Temperature > 50 within 3 minutes followed by Smoke
Raise Fire Alarm
Temperature Stream
Smoke Stream
![Page 5: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/5.jpg)
Introduction
5
Applications
CEPSurveillance
Network intrusion detection
Traffic congestion detection
Risk prediction
RFID processing
Market analysis
![Page 6: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/6.jpg)
CEP Challenges
Technical
● Performance● Maintainability● Scalability
6
![Page 7: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/7.jpg)
CEP Challenges
Technical
● Performance● Maintainability● Scalability
7
Logical
● Ambiguous Semantics (Absence of formalisms and Selection & Consumption policies)
● Lack of Expressiveness and User-friendliness● Missing operators (Negations, Sequences,
Repetitions … etc)
![Page 8: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/8.jpg)
MotivationA mobile gaming company wants to profile its applications. We assume the following four streams: installations, accesses, artifacts bought and shares; and the following four actions per each user and game and within the first 3 days from installation:
8
Product Roll-up Tracking
3. Middle-success (M)
≥3, and not (S) nor (L)
4. Failure (F)
≤2, 0, 0
1. Success (S)
≥5, ≥2, ≥2
2. Middle-success & Leaving (L)
≥3 and ≤5, 0, 0 and the user did not connect within 2 days after the last access
![Page 9: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/9.jpg)
MotivationA mobile gaming company wants to profile its applications. We assume the following four streams: installations, accesses, artifacts bought and shares; and the following four actions per each user and game and within the first 3 days from installation:
9
Product Roll-up Tracking
3. Middle-success (M)
≥3, and not (S) nor (L)
4. Failure (F)
≤2, 0, 0
1. Success (S)
≥5, ≥2, ≥2
2. Middle-success & Leaving (L)
≥3 and ≤5, 0, 0 and the user did not connect within 2 days after the last access
There is no CEP framework capable of formulating this problem with less than four queries, although the patterns are similar to each other and have inter-dependencies.
![Page 10: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/10.jpg)
Contributions
10
A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1, 2], a logic-based specification language aggrandized with temporal features
A rule grammar that, using our pattern algebra, allows users to obtain different kinds of actions, depending on the characteristics of a matched pattern
A novel logical execution plan created based on a combination of timed colored petri nets with aging tokens [3] and prioritized petri nets [4], that we believe will facilitate the deployment of this plan in the future.
1
2
3
![Page 11: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/11.jpg)
Roadmap
Algebraic Operators
![Page 12: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/12.jpg)
Pattern Model Access (GID: 123, UID: 321): 999
12
Event Representation & Formal Definitions
Event Type
Attributes
ValuesEvent Time
Sequence Operator Repetition Operator
![Page 13: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/13.jpg)
Pattern Model
13
Basic Operators:
● Renaming
● Filtering
LEAD Operators
Core Operators:
● Conjunction
● Disjunction
● Negation
● Sequence
● Repetition
● Subcontext
Temporal Constraints
● Within
● Wait
Selection & Consumption Policies:
● First
● Last
● Adjacent
● Every
● All
● All … Consume
● Repetition Max
● Repetition Min
![Page 14: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/14.jpg)
Pattern Model
14
Context and Sub-context
time
Context
installed installed + 3 days || ac::6
ac::1 ac::2
Middle-success & Leaving (L)
● 3≤ accesses ≤5 ● The user did not connect within 2 days after the last access
![Page 15: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/15.jpg)
Pattern Model
15
Context and Sub-context
ac::3 time
Context
Sub-context
installed
ac::1 ac::2 ac::3 + 2 days
installed + 3 days || ac::6
Middle-success & Leaving (L)
● 3≤ accesses ≤5 ● The user did not connect within 2 days after the last access
![Page 16: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/16.jpg)
Pattern Model
16
Context and Sub-context
ac::3 time
Context
Sub-context
installed
ac::1 ac::2 ac::4 + 2 daysac::4
installed + 3 days || ac::6
Middle-success & Leaving (L)
● 3≤ accesses ≤5 ● The user did not connect within 2 days after the last access
![Page 17: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/17.jpg)
Roadmap
17
Algebraic Operators
Rule Grammar
![Page 18: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/18.jpg)
Rule Grammar
18
Grammar
![Page 19: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/19.jpg)
Rule Grammar
19
Grammar
![Page 20: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/20.jpg)
Rule GrammarProduct Roll-up Tracking Rule
20
![Page 21: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/21.jpg)
Rule GrammarProduct Roll-up Tracking Rule
21
Context
Sub-Context
![Page 22: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/22.jpg)
Rule GrammarProduct Roll-up Tracking Rule
22
![Page 23: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/23.jpg)
Rule GrammarProduct Roll-up Tracking Rule
23
![Page 24: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/24.jpg)
Roadmap
24
Algebraic Operators
Rule Grammar
Logical Execution Plan
![Page 25: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/25.jpg)
LOGICAL EXECUTION PLAN
25
Why Petri Nets?
Concurrency & Synchronization
Places, Transitions, Edges and Tokens
Probabilistic CEP
![Page 26: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/26.jpg)
LOGICAL EXECUTION PLAN
N = (Σ, P, I, IC, OC, TT, 𝛑, IT, G, r0 )
Σ: is a finite set of types (colours),Σ ⊆ E[n], n ∈ N;
P≣ [p1, p2,..., p|P| ]: is a finite set of places, which can be either stateless, i.e. they pass tokens between transitions, or stateful, i.e. they preserve tokens in ordered structures;
I: is a finite set of transitions . Transitions are either temporal guards, consumers or intermediate transitions;
IC ⊆ (P x I): is a finite non-empty set of input arcs;
OC ⊆ (I x P): is a finite non-empty set of output arcs;
TT: P ⇒ Σ: is a color function, where each place has a single type that belongs to Σ, and all the tokens on this place must be of the same type;
𝛑: IC ⇒ NO is a priority function;
IT: I ⇒ R is a time expression function;
G: I ⇒ boolean is a guard function that maps each transition i ∈ I to a boolean expression over all the incoming arcs IC(i) ⊆ IC;
r0 ∈ R is an initial marking from the set of all markings R.
26
APCPN Definition
![Page 27: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/27.jpg)
LOGICAL EXECUTION PLAN
27
LEAD Rules in APCPN
LEAD Rule in APCPN
![Page 28: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/28.jpg)
LOGICAL EXECUTION PLAN
28
LEAD Rules in APCPN
LEAD Rule in APCPN
Source Pattern Compact version
![Page 29: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/29.jpg)
Within Operator:
A within 10s from B
Sequence Operator:
A followed by B
LOGICAL EXECUTION PLAN
29
LEAD Rules in APCPN
Two forms of sequencing events
![Page 30: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/30.jpg)
LOGICAL EXECUTION PLAN
30
Product Roll-up Tracking APCPN
![Page 31: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/31.jpg)
Roadmap
31
Algebraic Operators
Rule Grammar
Logical Execution Plan
Streaming Job
![Page 32: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/32.jpg)
Status & Future Work
32
Current Status
● 𝛼 DSL and compiler for LEAD rules
● 𝛼 library built to help mapping APCPNs to the physical plan in Apache Flink
Future Work
● Discussing and implement query optimizations on both logical and physical levels● Demonstrating the power of our approach by benchmarking the performance of LEAD CEP● Probabilistic CEP
![Page 33: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/33.jpg)
Summary
33
● Both technical and logical challenges were the reasons behind LEAD;
● 18 operators were introduced and formalized using TRIO trying to eliminate ambiguous behaviours;
● The decent set of operators and extending the capabilities of the query language were meant to
increase the expressive power in CEP;
● Aging tokens prioritized colored petri nets, as a logical execution plan, is where logical optimizations
take place, and our intentions for a highly performant scalable engine are shown;
● Benchmarking LEAD and probabilistic CEP are the next topics to tackle as soon as LEAD is ready and
well integrated with Apache Flink.
![Page 35: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/35.jpg)
35
![Page 36: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/36.jpg)
History of CEP
36
Starting from Event Stream to data mining2003
Pattern & state matching
Event STreamsGeneric EPGlobal Sch.
ML languageLoop aware sc.
Cache aware sc.Iteration Mng
In-Memory
Event StreamsCQ & CQL
Pattern Match.Hist. StorageCentralized
Op. PlacementRich Operators
Event TreeChronicle QL
Pattern Match.Tree STorageDistributed
Leaf placementRich Predicates
Event StreamsCQL
Pattern Match.Hist. STorage
Adaptive Sched.Op. PlacementRich Operators
(1) Stream processing only (2) Pattern matching only as Cont. queries
2005
2006
2012
Data Str. from Storage
Dist. StorageRich OperatorsOp PlacementCo-Loc Sched.
Mining on Data Stream
Data Stream Processing
Borealis - Aurora (MIT - Brown)
STREAM (Stanford)Telegraph (Berkeley)NiagaraCQ
(Univ. of Winsconsin)
Twitter StormTwitter HeronApache S4IBM infoSphere (System S)Flink StreamingSpark StreamingSAMZA
Event TreeCQ & CQL
Pattern Match.Tree/NFA states
DistributedLeaf placementRich Predicate
Event TreeChronicle QL
Pattern Match.Tree StorageCentralized
Leaf Placement
Clox (Univ. of Brussels)Orange Labs
Microsoft DryadNephele (TU Berlin)Hyracks (Univ. California - Yahoo!)AROM (Univ. Brussels)SparkFlinkSamza
Microsoft NaiadMeteor/Sopremo (TU Berlin)Scalops (Univ. California - Yahoo!)SAMOA
Event Stream Processing &
CEP
Event Stream
Processing
CEP
CEP 2.0
Chronicle 2.0
Orange CRSAUSTRAL
Chronicle
Oracle CEP (BEA)
ESper
Tibco BE
IBM-Coral8
Rule Core
SiddhiT-RexSASECayuga
2014
![Page 37: Event Processing LEAD: A Formal Specification For · Contributions 10 A pattern algebra that extends the common set of operators in CEP, and defines them formally using TRIO [1,](https://reader034.vdocument.in/reader034/viewer/2022042022/5e7a56d903963a59d1413617/html5/thumbnails/37.jpg)
History of CEP
37
Starting from Event Stream to data mining2003
Pattern & state matching
Event STreamsGeneric EPGlobal Sch.
ML languageLoop aware sc.
Cache aware sc.Iteration Mng
In-Memory
Event StreamsCQ & CQL
Pattern Match.Hist. StorageCentralized
Op. PlacementRich Operators
Event TreeChronicle QL
Pattern Match.Tree STorageDistributed
Leaf placementRich Predicates
Event StreamsCQL
Pattern Match.Hist. STorage
Adaptive Sched.Op. PlacementRich Operators
(1) Stream processing only (2) Pattern matching only as Cont. queries
2005
2006
2012
Data Str. from Storage
Dist. StorageRich OperatorsOp PlacementCo-Loc Sched.
Data Stream Processing
Borealis - Aurora (MIT - Brown)
STREAM (Stanford)Telegraph (Berkeley)NiagaraCQ
(Univ. of Winsconsin)
Twitter StormTwitter HeronApache S4IBM infoSphere (System S)Flink StreamingSpark StreamingSAMZA
Event TreeCQ & CQL
Pattern Match.Tree/NFA states
DistributedLeaf placementRich Predicate
Event TreeChronicle QL
Pattern Match.Tree StorageCentralized
Leaf Placement
Clox (Univ. of Brussels)Orange Labs
Microsoft DryadNephele (TU Berlin)Hyracks (Univ. California - Yahoo!)AROM (Univ. Brussels)
Microsoft NaiadMeteor/Sopremo (TU Berlin)Scalops (Univ. California - Yahoo!)SAMOA
Event Stream Processing &
CEP
Event Stream
Processing
CEP
CEP 2.0
Chronicle 2.0
Orange CRSAUSTRAL
Chronicle
Oracle CEP (BEA)
ESper
Tibco BE
IBM-Coral8
Rule Core
SiddhiT-RexSASECayuga
2014
Pattern Matching & Stream Processing
Design for network monitoring
Pure Centralized CEP using internal Stream & DB
Efficient CEP Impl
Distributed CEP using automation concepts
Focus on batch data processing using
streams
Focus on event stream processing
Mining on Data Stream