SlideShare uma empresa Scribd logo
1 de 46
Baixar para ler offline
A Formalization of 
Complex Event 
Stream Processing 
SYLVAIN HALLÉ 
SIMON VARVARESSOS
Context 
The execution of information systems 
produces events
Events 
An event is an element e taken from some 
set E, called the event type 
B 
Booleans 
3 
4π 
R 
2 
Numbers 
abc 
S 
Strings 
X→ Y 
Functions 
2X 
Sets 
Primitive 
types 
Composite 
types
A sample log 
[10:24:31] INFO Game starts 
[10:24:33] WARN Lemming into Blocker...[ 
[10:25:01] DEBG Lemming into Floater, id: 32, 
x: 320, y: 67 ; id: 31, x: 450, y: 43 ; 
id: 23, x: 229, y: 40 ; ... ... 
A file (or stream) of events 
Each event has one or more 
data elements 
Actual (physical) format not relevant 
for us
Searching the log 
Select AVG(closingPrice) 
From ClosingStockPrices 
Where stockSymbol = `MSFT' 
for (t = ST; t < ST+50, t+= 5) { 
WindowIs(ClosingStockPrices, t - 4, t); 
}
Problems 
Formal languages (e.g. logic, automata) 
focus on event ordering; not so good at 
performing computations over events 
Complex Event Processing often reduces 
to a thin layer over custom procedural 
code 
Goal: provide a formal and 
non-procedural framework for 
the processing of event streams
Traces 
An event trace (or event stream) is a potentially 
infinite sequence of events of a given type: 
4 9 . . . 
2 0 6 3 
Traces are symbolically denoted by: 
e = e0 e1 e2 e3 ... 
The set of all traces of type T is denoted as: 
T*
Processors 
A processor is a function that takes 0 or more 
event traces as input, and returns 0 or 1 
event trace as output 
1 : 1 processor 
. . . . . . 
2 : 1 processor
Composition 
A high-level event trace can be produced by 
composing ("piping") together one or more 
processors from lower-level traces
Processor algebra 
Goal: come up with a "toolbox" of basic 
processors sufficient to perform various 
computations over traces 
?
A few useful functions 
ιt(x) = {t if x = ε 
x otherwise 
Identity function: returns an event if given one, 
or t if passed the empty event ε 
+(x) = {x} 
Wrap function 
-({x}) = x 
Peel function 
/π 
Path function: returns subtree at end 
of path π
Semantics 
Processors can be defined formally by 
describing how their output trace is created 
from their input trace(s) 
Input trace(s) 
e0, ..., en : φ(x0 , ..., xn) 
Symbolic variables: 
xi refers to the i-th trace 
on the left
Constants as processors 
Any element t of type T can be lifted as a 
0 : 1 processor producing the infinite trace 
t t t t ... 
t t t . . . 
The constant 
processor t e : t = t t t ...
Input/output 
0 : 1 processors can be used to produce an 
event trace out of an external source (i.e. 
standard input, a file, etc.) 
a b . . . 
Ditto for 1 : 0 processors 
a b . . .
Mutator 
Returns t, but only as many times as the 
number of events received so far 
e t t 
i.e. "mutates" input events into t
Functions as processors 
Any n-ary function f defined on individual 
events can be lifted to an n:1 processor on 
traces, by applying it successively to n-uples 
. . . 2 0 6 
+ 7 8 5 
3 8 1 
. . . 
. . .
Functions as processors 
Any n-ary function f defined on individual 
events can be lifted to an n:1 processor on 
traces, by applying it successively to n-uples 
e0, e1 : x0+x1 
= 
e00+e10 e01+e11 , e02+e12 , , . . .
Freeze 
Returns the first event received, upon every 
event received 
. . . b b a a a a . . . 
e : x = e0 e0 e0 ...
Delay 
Returns every the input trace, starting from its 
n-th event 
. . . c b a b . . . 
2 
e : n 
x = en en+1 en+2 ... 
= e n : x 
c
Decimate 
Returns every n-th event of the input trace 
. . . c b a a . . . 
2 
e : n 
x = e0 en e2n ... 
Ψ c 
Ψ 
e : Ψ n x i = e : x ni
COMPLEX PROCESSORS
Window 
Simulates the application of a "sliding 
window" to a trace 
Υn φ 
Takes as arguments: another processor φ 
and a window width n 
Returns the result of φ after processing 
events 0 to n-1... 
Then the result of (a new instance of) φ 
that processes events 1 to n... 
...an so on
Window 
Example: execution of the processor 
on the trace 
2 1 5 0 
Υ2++ 
Υ2 
2 1 5 0 3 6 5 
2 1 2 13 
12 15 12 16 
25 01 25 15
Window 
The window processor can take any 
processor as an argument... 
...i.e. the sliding window can be applied to 
anything. 
Formally: 
e : Υ n φ i = e i 
: φ n-1
Filter 
Discards events from an input trace based 
on a selection criterion 
Φ φ 
Takes as argument another processor φ 
Evaluates φ on the trace that starts at event 
0; returns that event if the first event 
returned by φ is T 
Same process on the trace that starts at 
event 1... 
...an so on
Filter 
Example: execution of the processor 
on the trace 
2 1 5 0 
Φ∈2IN 
∈2IN 
2 1 5 0 Φ 2 0 
2 1 5 0 ∈2IN
Filter 
The filter can take any processor as an 
argument... 
...including a processor that requires multiple 
input events before outputting something 
Formally: 
e : Φ φ = Φ(e, φ) , e 1 : Φ φ 
Φ(e, φ) = { e0 if 
e : φ = T 
0 
no event otherwise
Spawn 
Cumulative combination of a processor's 
output for every suffix of a trace 
Σf φ 
Creates one new instance of processor 
φ upon every new input event 
Feeds each input event to all existing 
instances of φ 
Combines the value returned by each 
instance using function f 
...and outputs it
Spawne 
Example: execution of the processor 
on the trace 
2 1 5 0 
Σ+ 
x 
x 
2 1 5 0 Σ+ 2 3 8 
x 
8 
2 1 5 0 2 1 5 0 
+ 
1 5 0 x 1 5 0 
+ 
5 0 x 5 0
Spawn 
Formally: 
e : 
Σf φ 
= 
e : φφ 0 , f ( e : φφ 0 , e 1 
: 
Σf φ ) 
Turns out to be a powerful device; depending 
on φ and f, can provide many useful 
processors...
Spawn 
Count events Σ+1 
Cumulative sum Σ+ 
Set of all events Σ∪ + 
= # 
= ++ 
∪ =
Composition 
These processors can be freely composed 
Compute the statistical moment of order n 
n 
Σ+ 
1 
Σ+ 
÷
Composition 
These processors can be freely composed 
Compute the statistical moment of order n 
n 
Σ+ 
1 
Σ+ 
÷ 
= #
Composition 
These processors can be freely composed 
Return sum of two successive events, 
only if it is greater than 5 
++ 
Υ2 
> 5 
Φ
Linear Temporal Logic 
Operators for Linear Temporal Logic can 
also be defined 
Eventually Σ∨ (φ ) 
Next φ 
...etc (see the paper) 
= F φ 
= X φ 
3
All together now
All together now 
Count pairs of successive events that are 
more than one standard deviation from 
the mean 
E(X) 
-
All together now 
Count pairs of successive events that are 
more than one standard deviation from 
the mean 
σ 
E(X) 
- 
÷
All together now 
Count pairs of successive events that are 
more than one standard deviation from 
the mean 
σ 
E(X) 
- 
> 1 
÷ Φ
All together now 
Count pairs of successive events that are 
more than one standard deviation from 
the mean 
σ 
E(X) 
- 
÷ 
X 
> 1 
Φ 
∧ Φ
All together now 
Count pairs of successive events that are 
more than one standard deviation from 
the mean 
> 1 
σ # 
E(X) 
- 
÷ 
X 
Φ 
∧ Φ
Advantages 
No imperative constructs 
No restrictions on what can be piped to 
what (modulo type compatibility) 
Streaming operation: outputs produced 
as inputs are being consumed 
Implicit handling of buffering, duplication, 
etc.
Demo! 
Prototype implementation in Java 
In this example, handles 100 events/sec. 
Go see it on YouTube: http://goo.gl/QoS8Dy
GAME OVER
GAME OVER 
QUESTIONS ? 
YES NO
GAME OVER 
QUESTIONS ? 
YES NO

Mais conteúdo relacionado

Mais procurados

computer notes - Data Structures - 38
computer notes - Data Structures - 38computer notes - Data Structures - 38
computer notes - Data Structures - 38ecomputernotes
 
matplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guidematplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guideArulalan T
 
Infix to-postfix examples
Infix to-postfix examplesInfix to-postfix examples
Infix to-postfix examplesmua99
 
My lecture infix-to-postfix
My lecture infix-to-postfixMy lecture infix-to-postfix
My lecture infix-to-postfixSenthil Kumar
 
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...AAKASH KUMAR
 
Computer Architecture and Organization lab with matlab
Computer Architecture and Organization lab with matlabComputer Architecture and Organization lab with matlab
Computer Architecture and Organization lab with matlabShankar Gangaju
 
Computer notes - Sorting
Computer notes  - SortingComputer notes  - Sorting
Computer notes - Sortingecomputernotes
 
Introduction to Python and Matplotlib
Introduction to Python and MatplotlibIntroduction to Python and Matplotlib
Introduction to Python and MatplotlibFrançois Bianco
 
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel ZikmundKarel Zikmund
 
Newton cotes method
Newton cotes methodNewton cotes method
Newton cotes methodFaisal Saeed
 
Data Structure - 2nd Study
Data Structure - 2nd StudyData Structure - 2nd Study
Data Structure - 2nd StudyChris Ohk
 

Mais procurados (20)

computer notes - Data Structures - 38
computer notes - Data Structures - 38computer notes - Data Structures - 38
computer notes - Data Structures - 38
 
R/C++ talk at earl 2014
R/C++ talk at earl 2014R/C++ talk at earl 2014
R/C++ talk at earl 2014
 
matplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guidematplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guide
 
Infix to-postfix examples
Infix to-postfix examplesInfix to-postfix examples
Infix to-postfix examples
 
My lecture infix-to-postfix
My lecture infix-to-postfixMy lecture infix-to-postfix
My lecture infix-to-postfix
 
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
 
Computer Architecture and Organization lab with matlab
Computer Architecture and Organization lab with matlabComputer Architecture and Organization lab with matlab
Computer Architecture and Organization lab with matlab
 
Computer notes - Sorting
Computer notes  - SortingComputer notes  - Sorting
Computer notes - Sorting
 
Application of Stacks
Application of StacksApplication of Stacks
Application of Stacks
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Faisal
FaisalFaisal
Faisal
 
Introduction to Python and Matplotlib
Introduction to Python and MatplotlibIntroduction to Python and Matplotlib
Introduction to Python and Matplotlib
 
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
 
Newton cotes method
Newton cotes methodNewton cotes method
Newton cotes method
 
Queue oop
Queue   oopQueue   oop
Queue oop
 
week-6x
week-6xweek-6x
week-6x
 
Data Structure - 2nd Study
Data Structure - 2nd StudyData Structure - 2nd Study
Data Structure - 2nd Study
 
Circular queues
Circular queuesCircular queues
Circular queues
 
FSE 2008
FSE 2008FSE 2008
FSE 2008
 

Semelhante a A formalization of complex event stream processing

Event Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsEvent Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsSylvain Hallé
 
Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Sylvain Hallé
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupStephan Ewen
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)Ishin Vin
 
Lecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxLecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxjovannyflex
 
Lecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxLecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxjovannyflex
 
III MCS python lab (1).pdf
III MCS python lab (1).pdfIII MCS python lab (1).pdf
III MCS python lab (1).pdfsrxerox
 
The Ring programming language version 1.5.3 book - Part 25 of 184
The Ring programming language version 1.5.3 book - Part 25 of 184The Ring programming language version 1.5.3 book - Part 25 of 184
The Ring programming language version 1.5.3 book - Part 25 of 184Mahmoud Samir Fayed
 
Deep Learning and TensorFlow
Deep Learning and TensorFlowDeep Learning and TensorFlow
Deep Learning and TensorFlowOswald Campesato
 
Introducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosIntroducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosluzenith_g
 
Python Programming Homework Help.pptx
Python Programming Homework Help.pptxPython Programming Homework Help.pptx
Python Programming Homework Help.pptxPython Homework Help
 
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014PyData
 
Functional programming ii
Functional programming iiFunctional programming ii
Functional programming iiPrashant Kalkar
 
Introduction to Deep Learning, Keras, and Tensorflow
Introduction to Deep Learning, Keras, and TensorflowIntroduction to Deep Learning, Keras, and Tensorflow
Introduction to Deep Learning, Keras, and TensorflowOswald Campesato
 
Introduction to Deep Learning, Keras, and TensorFlow
Introduction to Deep Learning, Keras, and TensorFlowIntroduction to Deep Learning, Keras, and TensorFlow
Introduction to Deep Learning, Keras, and TensorFlowSri Ambati
 

Semelhante a A formalization of complex event stream processing (20)

Event Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsEvent Stream Processing with Multiple Threads
Event Stream Processing with Multiple Threads
 
Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink Meetup
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
 
Lecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxLecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptx
 
Lecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxLecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptx
 
III MCS python lab (1).pdf
III MCS python lab (1).pdfIII MCS python lab (1).pdf
III MCS python lab (1).pdf
 
The Ring programming language version 1.5.3 book - Part 25 of 184
The Ring programming language version 1.5.3 book - Part 25 of 184The Ring programming language version 1.5.3 book - Part 25 of 184
The Ring programming language version 1.5.3 book - Part 25 of 184
 
Deep Learning and TensorFlow
Deep Learning and TensorFlowDeep Learning and TensorFlow
Deep Learning and TensorFlow
 
Alg1
Alg1Alg1
Alg1
 
Introducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmosIntroducción al Análisis y diseño de algoritmos
Introducción al Análisis y diseño de algoritmos
 
Matlab integration
Matlab integrationMatlab integration
Matlab integration
 
Unit 1
Unit 1Unit 1
Unit 1
 
Python Programming Homework Help.pptx
Python Programming Homework Help.pptxPython Programming Homework Help.pptx
Python Programming Homework Help.pptx
 
Annotations.pdf
Annotations.pdfAnnotations.pdf
Annotations.pdf
 
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
 
Functional programming ii
Functional programming iiFunctional programming ii
Functional programming ii
 
1. Ch_1 SL_1_Intro to Matlab.pptx
1. Ch_1 SL_1_Intro to Matlab.pptx1. Ch_1 SL_1_Intro to Matlab.pptx
1. Ch_1 SL_1_Intro to Matlab.pptx
 
Introduction to Deep Learning, Keras, and Tensorflow
Introduction to Deep Learning, Keras, and TensorflowIntroduction to Deep Learning, Keras, and Tensorflow
Introduction to Deep Learning, Keras, and Tensorflow
 
Introduction to Deep Learning, Keras, and TensorFlow
Introduction to Deep Learning, Keras, and TensorFlowIntroduction to Deep Learning, Keras, and TensorFlow
Introduction to Deep Learning, Keras, and TensorFlow
 

Mais de Sylvain Hallé

Monitoring Business Process Compliance Across Multiple Executions with Stream...
Monitoring Business Process Compliance Across Multiple Executions with Stream...Monitoring Business Process Compliance Across Multiple Executions with Stream...
Monitoring Business Process Compliance Across Multiple Executions with Stream...Sylvain Hallé
 
A Stream-Based Approach to Intrusion Detection
A Stream-Based Approach to Intrusion DetectionA Stream-Based Approach to Intrusion Detection
A Stream-Based Approach to Intrusion DetectionSylvain Hallé
 
Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Sylvain Hallé
 
Smart Contracts-Enabled Simulation for Hyperconnected Logistics
Smart Contracts-Enabled Simulation for Hyperconnected LogisticsSmart Contracts-Enabled Simulation for Hyperconnected Logistics
Smart Contracts-Enabled Simulation for Hyperconnected LogisticsSylvain Hallé
 
Test Suite Generation for Boolean Conditions with Equivalence Class Partitioning
Test Suite Generation for Boolean Conditions with Equivalence Class PartitioningTest Suite Generation for Boolean Conditions with Equivalence Class Partitioning
Test Suite Generation for Boolean Conditions with Equivalence Class PartitioningSylvain Hallé
 
Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Sylvain Hallé
 
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)Sylvain Hallé
 
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)Sylvain Hallé
 
A Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsA Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsSylvain Hallé
 
Detecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsDetecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsSylvain Hallé
 
Streamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersStreamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersSylvain Hallé
 
Writing Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepWriting Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepSylvain Hallé
 
Real-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsReal-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsSylvain Hallé
 
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Sylvain Hallé
 
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)Sylvain Hallé
 
A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)Sylvain Hallé
 
Solving Equations on Words with Morphisms and Antimorphisms
Solving Equations on Words with Morphisms and AntimorphismsSolving Equations on Words with Morphisms and Antimorphisms
Solving Equations on Words with Morphisms and AntimorphismsSylvain Hallé
 
Runtime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLRuntime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLSylvain Hallé
 
La quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleLa quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleSylvain Hallé
 
Decentralized Enforcement of Artifact Lifecycles
Decentralized Enforcement of Artifact LifecyclesDecentralized Enforcement of Artifact Lifecycles
Decentralized Enforcement of Artifact LifecyclesSylvain Hallé
 

Mais de Sylvain Hallé (20)

Monitoring Business Process Compliance Across Multiple Executions with Stream...
Monitoring Business Process Compliance Across Multiple Executions with Stream...Monitoring Business Process Compliance Across Multiple Executions with Stream...
Monitoring Business Process Compliance Across Multiple Executions with Stream...
 
A Stream-Based Approach to Intrusion Detection
A Stream-Based Approach to Intrusion DetectionA Stream-Based Approach to Intrusion Detection
A Stream-Based Approach to Intrusion Detection
 
Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3
 
Smart Contracts-Enabled Simulation for Hyperconnected Logistics
Smart Contracts-Enabled Simulation for Hyperconnected LogisticsSmart Contracts-Enabled Simulation for Hyperconnected Logistics
Smart Contracts-Enabled Simulation for Hyperconnected Logistics
 
Test Suite Generation for Boolean Conditions with Equivalence Class Partitioning
Test Suite Generation for Boolean Conditions with Equivalence Class PartitioningTest Suite Generation for Boolean Conditions with Equivalence Class Partitioning
Test Suite Generation for Boolean Conditions with Equivalence Class Partitioning
 
Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)
 
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
Test Sequence Generation with Cayley Graphs (Talk @ A-MOST 2021)
 
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)
 
A Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsA Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function Circuits
 
Detecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsDetecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative Specifications
 
Streamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersStreamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research Papers
 
Writing Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepWriting Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeep
 
Real-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsReal-Time Data Mining for Event Streams
Real-Time Data Mining for Event Streams
 
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
 
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
 
A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)
 
Solving Equations on Words with Morphisms and Antimorphisms
Solving Equations on Words with Morphisms and AntimorphismsSolving Equations on Words with Morphisms and Antimorphisms
Solving Equations on Words with Morphisms and Antimorphisms
 
Runtime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLRuntime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XML
 
La quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleLa quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelle
 
Decentralized Enforcement of Artifact Lifecycles
Decentralized Enforcement of Artifact LifecyclesDecentralized Enforcement of Artifact Lifecycles
Decentralized Enforcement of Artifact Lifecycles
 

Último

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

A formalization of complex event stream processing

  • 1. A Formalization of Complex Event Stream Processing SYLVAIN HALLÉ SIMON VARVARESSOS
  • 2. Context The execution of information systems produces events
  • 3. Events An event is an element e taken from some set E, called the event type B Booleans 3 4π R 2 Numbers abc S Strings X→ Y Functions 2X Sets Primitive types Composite types
  • 4. A sample log [10:24:31] INFO Game starts [10:24:33] WARN Lemming into Blocker...[ [10:25:01] DEBG Lemming into Floater, id: 32, x: 320, y: 67 ; id: 31, x: 450, y: 43 ; id: 23, x: 229, y: 40 ; ... ... A file (or stream) of events Each event has one or more data elements Actual (physical) format not relevant for us
  • 5. Searching the log Select AVG(closingPrice) From ClosingStockPrices Where stockSymbol = `MSFT' for (t = ST; t < ST+50, t+= 5) { WindowIs(ClosingStockPrices, t - 4, t); }
  • 6. Problems Formal languages (e.g. logic, automata) focus on event ordering; not so good at performing computations over events Complex Event Processing often reduces to a thin layer over custom procedural code Goal: provide a formal and non-procedural framework for the processing of event streams
  • 7. Traces An event trace (or event stream) is a potentially infinite sequence of events of a given type: 4 9 . . . 2 0 6 3 Traces are symbolically denoted by: e = e0 e1 e2 e3 ... The set of all traces of type T is denoted as: T*
  • 8. Processors A processor is a function that takes 0 or more event traces as input, and returns 0 or 1 event trace as output 1 : 1 processor . . . . . . 2 : 1 processor
  • 9. Composition A high-level event trace can be produced by composing ("piping") together one or more processors from lower-level traces
  • 10. Processor algebra Goal: come up with a "toolbox" of basic processors sufficient to perform various computations over traces ?
  • 11. A few useful functions ιt(x) = {t if x = ε x otherwise Identity function: returns an event if given one, or t if passed the empty event ε +(x) = {x} Wrap function -({x}) = x Peel function /π Path function: returns subtree at end of path π
  • 12. Semantics Processors can be defined formally by describing how their output trace is created from their input trace(s) Input trace(s) e0, ..., en : φ(x0 , ..., xn) Symbolic variables: xi refers to the i-th trace on the left
  • 13. Constants as processors Any element t of type T can be lifted as a 0 : 1 processor producing the infinite trace t t t t ... t t t . . . The constant processor t e : t = t t t ...
  • 14. Input/output 0 : 1 processors can be used to produce an event trace out of an external source (i.e. standard input, a file, etc.) a b . . . Ditto for 1 : 0 processors a b . . .
  • 15. Mutator Returns t, but only as many times as the number of events received so far e t t i.e. "mutates" input events into t
  • 16. Functions as processors Any n-ary function f defined on individual events can be lifted to an n:1 processor on traces, by applying it successively to n-uples . . . 2 0 6 + 7 8 5 3 8 1 . . . . . .
  • 17. Functions as processors Any n-ary function f defined on individual events can be lifted to an n:1 processor on traces, by applying it successively to n-uples e0, e1 : x0+x1 = e00+e10 e01+e11 , e02+e12 , , . . .
  • 18. Freeze Returns the first event received, upon every event received . . . b b a a a a . . . e : x = e0 e0 e0 ...
  • 19. Delay Returns every the input trace, starting from its n-th event . . . c b a b . . . 2 e : n x = en en+1 en+2 ... = e n : x c
  • 20. Decimate Returns every n-th event of the input trace . . . c b a a . . . 2 e : n x = e0 en e2n ... Ψ c Ψ e : Ψ n x i = e : x ni
  • 22. Window Simulates the application of a "sliding window" to a trace Υn φ Takes as arguments: another processor φ and a window width n Returns the result of φ after processing events 0 to n-1... Then the result of (a new instance of) φ that processes events 1 to n... ...an so on
  • 23. Window Example: execution of the processor on the trace 2 1 5 0 Υ2++ Υ2 2 1 5 0 3 6 5 2 1 2 13 12 15 12 16 25 01 25 15
  • 24. Window The window processor can take any processor as an argument... ...i.e. the sliding window can be applied to anything. Formally: e : Υ n φ i = e i : φ n-1
  • 25. Filter Discards events from an input trace based on a selection criterion Φ φ Takes as argument another processor φ Evaluates φ on the trace that starts at event 0; returns that event if the first event returned by φ is T Same process on the trace that starts at event 1... ...an so on
  • 26. Filter Example: execution of the processor on the trace 2 1 5 0 Φ∈2IN ∈2IN 2 1 5 0 Φ 2 0 2 1 5 0 ∈2IN
  • 27. Filter The filter can take any processor as an argument... ...including a processor that requires multiple input events before outputting something Formally: e : Φ φ = Φ(e, φ) , e 1 : Φ φ Φ(e, φ) = { e0 if e : φ = T 0 no event otherwise
  • 28. Spawn Cumulative combination of a processor's output for every suffix of a trace Σf φ Creates one new instance of processor φ upon every new input event Feeds each input event to all existing instances of φ Combines the value returned by each instance using function f ...and outputs it
  • 29. Spawne Example: execution of the processor on the trace 2 1 5 0 Σ+ x x 2 1 5 0 Σ+ 2 3 8 x 8 2 1 5 0 2 1 5 0 + 1 5 0 x 1 5 0 + 5 0 x 5 0
  • 30. Spawn Formally: e : Σf φ = e : φφ 0 , f ( e : φφ 0 , e 1 : Σf φ ) Turns out to be a powerful device; depending on φ and f, can provide many useful processors...
  • 31. Spawn Count events Σ+1 Cumulative sum Σ+ Set of all events Σ∪ + = # = ++ ∪ =
  • 32. Composition These processors can be freely composed Compute the statistical moment of order n n Σ+ 1 Σ+ ÷
  • 33. Composition These processors can be freely composed Compute the statistical moment of order n n Σ+ 1 Σ+ ÷ = #
  • 34. Composition These processors can be freely composed Return sum of two successive events, only if it is greater than 5 ++ Υ2 > 5 Φ
  • 35. Linear Temporal Logic Operators for Linear Temporal Logic can also be defined Eventually Σ∨ (φ ) Next φ ...etc (see the paper) = F φ = X φ 3
  • 37. All together now Count pairs of successive events that are more than one standard deviation from the mean E(X) -
  • 38. All together now Count pairs of successive events that are more than one standard deviation from the mean σ E(X) - ÷
  • 39. All together now Count pairs of successive events that are more than one standard deviation from the mean σ E(X) - > 1 ÷ Φ
  • 40. All together now Count pairs of successive events that are more than one standard deviation from the mean σ E(X) - ÷ X > 1 Φ ∧ Φ
  • 41. All together now Count pairs of successive events that are more than one standard deviation from the mean > 1 σ # E(X) - ÷ X Φ ∧ Φ
  • 42. Advantages No imperative constructs No restrictions on what can be piped to what (modulo type compatibility) Streaming operation: outputs produced as inputs are being consumed Implicit handling of buffering, duplication, etc.
  • 43. Demo! Prototype implementation in Java In this example, handles 100 events/sec. Go see it on YouTube: http://goo.gl/QoS8Dy