Complex Event Processing With Apache Flink Presentation
Complex Event Processing With Apache Flink Presentation
Input
Input
Pattern
Input
Output
Pattern
• Stocks trends: detect stocks that start high, keep a high avg.
price for a period, and then volume plummets.
8 © 2018 data Artisans
CEP: USE-CASES
• IoT
• Fraud Detection
• Intrusion Detection
• Inventory Management
• Click Stream Analysis
• Trend Detection in financial sector
• ...yours?
9 © 2018 data Artisans
WHAT IS STREAM PROCESSING?
Computations on
never-ending
Computation “streams” of events
Computation
Computation Computation Computation
spread across
many machines
State
Result depends
on history of
Computation
stream
Input
FlinkCEP
Output
Pattern
P1 P2
‒ P1(shape == rectangle)
‒ P2(shape == triangle)
‒ P1(shape == rectangle)
‒ P2(shape == triangle)
P1 P2
• Condition : which elements to accept
‒ Simple e.g shape == rectangle
‒ Iterative e.g rectangle.surface < triangle.surface
P1 P2
Input
Input Output
Input Output
Input Output
Input Output
Input Output
Input Output
Input
• Individual Patterns:
‒ Quantifiers
‒ Conditions: Simple & Iterative
• Complex Patterns:
‒ Time Constraints: Event and Processing time
‒Contiguity Constraints: Strict, relaxed, non-deterministic, NOT
‒Matching Semantics: Where to start searching for a new match
‒Grouping Complex Patterns: The “parenthesis” of pattern definition.
M3
M4
M5
B