SlideShare a Scribd company logo
Analyzing a Soccer Game
with WSO2 CEP
Srinath Perera
Director, Research, WSO2
srinath@wso2.com
@srinath_perera
Vision of the Future
•Sensors everywhere
•Data collected from everywhere,
analyzing, optimizing, and helping (and
hopefully not taking over)
•Analytics and Internet of things ..
Immersive world
•Big data and real-time analytics will be
crucial. How far are we from realizing
that?
What would take to build
such a world?
•Sensors and actuators (Motes?)
•Fast interoperable event systems
(MQTT?)
•Powerful query languages (CEP?)
•Powerful control systems and
decision systems
Complex Event Processing
CEP Operators
• Filters or transformations (process a single event)
– from Ball[v>10] select .. insert into ..
• Windows + aggregation (track window of events: time, length)
– from Ball#window.time(30s) select avg(v) ..
• Joins (join two event streams to one)
– from Ball#window.time(30s) as b join Players as p on
p.v < b.v
• Patterns (state machine implementation)
– from Ball[v>10], Ball[v<10]*,Ball[v>10] select ..
• Event tables (map a database as an event stream)
– Define table HitV (v double) using .. db info ..
Sport (Soccer) Usecases?
•Dashboard on game status
•Alarms about critical events in the game
•Real-time game analysis and predictions about
the next move
•Updates/ stats etc., on mobile phone with
customized offers
•Study of game and players effectiveness
•Monitor players health and body functions
DEBS Challenge
• Soccer game, players and ball
has sensors (DESB Challenge
2013) sid, ts, x,y,z, v,a
• Use cases: Running analysis,
Ball Possession and Shots on
Goal, Heatmap of Activity
• WSO2 CEP (Siddhi) did 100K+
throughput
Analyzing a Soccer Game with WSO2 CEP
Usecase 1: Running Analysis
•Main idea: detect when speed thresholds have
passed
define partition player by Players .id;
from s = Players [v <= 1 or v > 11] ,
t = Players [v > 1 and v <= 11]+ ,
e = Players [v <= 1 or v > 11]
select s.ts as tsStart , e.ts as tsStop ,s.id as playerId ,
‘‘trot" as intensity , t [0].v as instantSpeed ,
(e.ts - s.ts )/1000000000 as unitPeriod
insert into RunningStats partition by player;
Usecase 2: Ball Possession
•Ball possession (you possess the ball from time you hit
it until someone else hit it or ball leaves the ground)
Usecase 3: Heatmap of Activity
•Show where actions happened (via cells defined by a
grid of 64X100 etc.), need updates once every second
•Can solved via cell change boundaries, but does not
work if one player stays more than 1 sec in the same
cell. So need to join with a timer.
Usecase 4: Detect Kicks on the Goal
•Main Idea: Detect kicks on the ball, calculate
direction after 1m, and keep giving updates as
long as it is in right direction
New Usecase: Offside Detection
•If you have gone passed the
last defender at time of a kick,
you are in a offside position.
•If you are part of that play
after, it is foul
Results for DEBS Scenarios
WSO2 Big Data Platform
Other Applications
•System/ Device Management
•Fleet/ Logistic Management
•Fraud Detection
•Targeted/ Location Sensitive Marketing
•Smart Grid Control
•Geo Fencing
•…
Conclusion
•We are heading for a deeply integrated world
with real-time detection and actions
– We have technology to do this now. E.g. (DEBS usecases)
– Power of CEP
– Use real-time and batch processing in tandem
•All the software we discussed are Open source
under Apache License. Visit http://wso2.com/.
•Like to integrate with us, help, or join? Talk to us
at Big Data booth or architecture@wso2.org
Thank You

More Related Content

PPT
Mathematical preliminaries in Automata
PDF
História, Técnica e Classificação de Algoritmos Esteganográficos
PDF
Compiler Design IPU notes Handwritten
PPTX
Sistemas Digitais - Aula 05 - Tabelas verdade e Portas lógicas
PPTX
Caminhos Mínimos - Algoritmo de Dijkstra
PDF
Inserindo em Ordem Crescente na Lista Encadeada
PPTX
Introdução ao Linux Ubuntu
PPTX
Adversarial search
Mathematical preliminaries in Automata
História, Técnica e Classificação de Algoritmos Esteganográficos
Compiler Design IPU notes Handwritten
Sistemas Digitais - Aula 05 - Tabelas verdade e Portas lógicas
Caminhos Mínimos - Algoritmo de Dijkstra
Inserindo em Ordem Crescente na Lista Encadeada
Introdução ao Linux Ubuntu
Adversarial search

What's hot (20)

PPT
Funções Grupo Oracle
PPT
Single source stortest path bellman ford and dijkstra
PPTX
Kruskal's algorithm
PPTX
Automata theory - Push Down Automata (PDA)
DOCX
Algoritmos - Aula 06 B - Tomada de Decisao - Exercicios - Resolucao
PPTX
0 1 knapsack using branch and bound
PDF
INCREASING THE THROUGHPUT USING EIGHT STAGE PIPELINING
PPT
hierarchical_planning.ppt
PPT
String matching algorithm
DOC
Chaptr 7 (final)
PPTX
Unit 2 Uninformed Search Strategies.pptx
PPTX
Greedy algorithms
PDF
Dynamic Programming knapsack 0 1
PPTX
Lecture 14 Heuristic Search-A star algorithm
PPTX
Strongly connected components
PDF
Cheat Sheets for AI, Neural Networks, Machine Learning, Deep Learning & Big Data
PPTX
Kruskal Algorithm
PDF
Is the WRF Better than The GFS?
PPTX
AI_Session 21 First order logic.pptx
PPTX
A* Algorithm
Funções Grupo Oracle
Single source stortest path bellman ford and dijkstra
Kruskal's algorithm
Automata theory - Push Down Automata (PDA)
Algoritmos - Aula 06 B - Tomada de Decisao - Exercicios - Resolucao
0 1 knapsack using branch and bound
INCREASING THE THROUGHPUT USING EIGHT STAGE PIPELINING
hierarchical_planning.ppt
String matching algorithm
Chaptr 7 (final)
Unit 2 Uninformed Search Strategies.pptx
Greedy algorithms
Dynamic Programming knapsack 0 1
Lecture 14 Heuristic Search-A star algorithm
Strongly connected components
Cheat Sheets for AI, Neural Networks, Machine Learning, Deep Learning & Big Data
Kruskal Algorithm
Is the WRF Better than The GFS?
AI_Session 21 First order logic.pptx
A* Algorithm
Ad

Viewers also liked (20)

PPTX
Solving DEBS Grand Challenge with WSO2 CEP
PPTX
ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...
PDF
ACM DEBS 2015: Realtime Streaming Analytics Patterns
PPT
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
PPT
Introduction to Large Scale Data Analysis with WSO2 Analytics Platform
PDF
Tracking a soccer game with big data
PPTX
Data to Insight in a Flash: Introduction to Real-Time Analytics with WSO2 Com...
PDF
Intelligent integration with WSO2 ESB & WSO2 CEP
PPTX
C*ollege Credit: CEP Distribtued Processing on Cassandra with Storm
PDF
WSO2Con ASIA 2016: Catch Them in the Act: Fraud Detection with the WSO2 Analy...
PDF
Introducing the WSO2 Complex Event Processor
PPTX
Catch Them in the Act: CEP for Real-time Ecommerce Influence
PDF
Runtime Governance with WSO2 Governance Registry integrated with WSO2 BAM and...
PPTX
Developing Distributed Web Applications, Where does REST fit in?
PDF
Big Data in the Real World. Real-time Football Analytics
PDF
Introduction to Big Data Analytics: Batch, Real-Time, and the Best of Both Wo...
PDF
Extending Spark Streaming to Support Complex Event Processing
PDF
Rob peglar introduction_analytics _big data_hadoop
PPTX
Siddhi: A Second Look at Complex Event Processing Implementations
PPTX
CEP - simplified streaming architecture - Strata Singapore 2016
Solving DEBS Grand Challenge with WSO2 CEP
ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...
ACM DEBS 2015: Realtime Streaming Analytics Patterns
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Introduction to Large Scale Data Analysis with WSO2 Analytics Platform
Tracking a soccer game with big data
Data to Insight in a Flash: Introduction to Real-Time Analytics with WSO2 Com...
Intelligent integration with WSO2 ESB & WSO2 CEP
C*ollege Credit: CEP Distribtued Processing on Cassandra with Storm
WSO2Con ASIA 2016: Catch Them in the Act: Fraud Detection with the WSO2 Analy...
Introducing the WSO2 Complex Event Processor
Catch Them in the Act: CEP for Real-time Ecommerce Influence
Runtime Governance with WSO2 Governance Registry integrated with WSO2 BAM and...
Developing Distributed Web Applications, Where does REST fit in?
Big Data in the Real World. Real-time Football Analytics
Introduction to Big Data Analytics: Batch, Real-Time, and the Best of Both Wo...
Extending Spark Streaming to Support Complex Event Processing
Rob peglar introduction_analytics _big data_hadoop
Siddhi: A Second Look at Complex Event Processing Implementations
CEP - simplified streaming architecture - Strata Singapore 2016
Ad

Similar to Analyzing a Soccer Game with WSO2 CEP (16)

PPT
Strata 2014 Talk:Tracking a Soccer Game with Big Data
PPT
Tracking a soccer game with Big Data
PPT
Big data streams, Internet of Things, and Complex Event Processing Improve So...
PPT
Tracking a soccer game with BigData
PDF
Structure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris Haddad
PDF
WSO2Con USA 2017: Discover Data That Matters: Deep Dive into WSO2 Analytics
PDF
Discover Data That Matters- Deep dive into WSO2 Analytics
PPTX
Introduction to WSO2 Data Analytics Platform
PDF
WSO2 Analytics Platform - The one stop shop for all your data needs
PDF
Solutions Using WSO2 Analytics
PPTX
WSO2 Big Data Platform and Applications
PPTX
PPTX
Goal Recognition in Soccer Match
PDF
Football, Data and Crushing Competition
PDF
WSO2Con ASIA 2016: An Introduction to the WSO2 Analytics Platform
PDF
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
Strata 2014 Talk:Tracking a Soccer Game with Big Data
Tracking a soccer game with Big Data
Big data streams, Internet of Things, and Complex Event Processing Improve So...
Tracking a soccer game with BigData
Structure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris Haddad
WSO2Con USA 2017: Discover Data That Matters: Deep Dive into WSO2 Analytics
Discover Data That Matters- Deep dive into WSO2 Analytics
Introduction to WSO2 Data Analytics Platform
WSO2 Analytics Platform - The one stop shop for all your data needs
Solutions Using WSO2 Analytics
WSO2 Big Data Platform and Applications
Goal Recognition in Soccer Match
Football, Data and Crushing Competition
WSO2Con ASIA 2016: An Introduction to the WSO2 Analytics Platform
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform

More from Srinath Perera (20)

PDF
Book: Software Architecture and Decision-Making
PDF
Data science Applications in the Enterprise
PDF
An Introduction to APIs
PDF
An Introduction to Blockchain for Finance Professionals
PDF
AI in the Real World: Challenges, and Risks and how to handle them?
PDF
Healthcare + AI: Use cases & Challenges
PDF
How would AI shape Future Integrations?
PDF
The Role of Blockchain in Future Integrations
PDF
Future of Serverless
PDF
Blockchain: Where are we? Where are we going?
PDF
Few thoughts about Future of Blockchain
PDF
A Visual Canvas for Judging New Technologies
PDF
Privacy in Bigdata Era
PDF
Blockchain, Impact, Challenges, and Risks
PPTX
Today's Technology and Emerging Technology Landscape
PDF
An Emerging Technologies Timeline
PDF
The Rise of Streaming SQL and Evolution of Streaming Applications
PDF
Analytics and AI: The Good, the Bad and the Ugly
PDF
Transforming a Business Through Analytics
PDF
SoC Keynote:The State of the Art in Integration Technology
Book: Software Architecture and Decision-Making
Data science Applications in the Enterprise
An Introduction to APIs
An Introduction to Blockchain for Finance Professionals
AI in the Real World: Challenges, and Risks and how to handle them?
Healthcare + AI: Use cases & Challenges
How would AI shape Future Integrations?
The Role of Blockchain in Future Integrations
Future of Serverless
Blockchain: Where are we? Where are we going?
Few thoughts about Future of Blockchain
A Visual Canvas for Judging New Technologies
Privacy in Bigdata Era
Blockchain, Impact, Challenges, and Risks
Today's Technology and Emerging Technology Landscape
An Emerging Technologies Timeline
The Rise of Streaming SQL and Evolution of Streaming Applications
Analytics and AI: The Good, the Bad and the Ugly
Transforming a Business Through Analytics
SoC Keynote:The State of the Art in Integration Technology

Recently uploaded (20)

PPTX
Introduction to Inferential Statistics.pptx
PPTX
Managing Community Partner Relationships
PDF
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
PDF
annual-report-2024-2025 original latest.
PDF
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
PPTX
modul_python (1).pptx for professional and student
PDF
Introduction to Data Science and Data Analysis
PPTX
Copy of 16 Timeline & Flowchart Templates – HubSpot.pptx
PPTX
IMPACT OF LANDSLIDE.....................
PPTX
importance of Data-Visualization-in-Data-Science. for mba studnts
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
Leprosy and NLEP programme community medicine
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
PDF
Data Engineering Interview Questions & Answers Batch Processing (Spark, Hadoo...
PDF
Jean-Georges Perrin - Spark in Action, Second Edition (2020, Manning Publicat...
PDF
OneRead_20250728_1808.pdfhdhddhshahwhwwjjaaja
PDF
Microsoft Core Cloud Services powerpoint
PPTX
CYBER SECURITY the Next Warefare Tactics
Introduction to Inferential Statistics.pptx
Managing Community Partner Relationships
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
annual-report-2024-2025 original latest.
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
modul_python (1).pptx for professional and student
Introduction to Data Science and Data Analysis
Copy of 16 Timeline & Flowchart Templates – HubSpot.pptx
IMPACT OF LANDSLIDE.....................
importance of Data-Visualization-in-Data-Science. for mba studnts
IBA_Chapter_11_Slides_Final_Accessible.pptx
Leprosy and NLEP programme community medicine
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
Qualitative Qantitative and Mixed Methods.pptx
STERILIZATION AND DISINFECTION-1.ppthhhbx
Data Engineering Interview Questions & Answers Batch Processing (Spark, Hadoo...
Jean-Georges Perrin - Spark in Action, Second Edition (2020, Manning Publicat...
OneRead_20250728_1808.pdfhdhddhshahwhwwjjaaja
Microsoft Core Cloud Services powerpoint
CYBER SECURITY the Next Warefare Tactics

Analyzing a Soccer Game with WSO2 CEP

  • 1. Analyzing a Soccer Game with WSO2 CEP Srinath Perera Director, Research, WSO2 srinath@wso2.com @srinath_perera
  • 2. Vision of the Future •Sensors everywhere •Data collected from everywhere, analyzing, optimizing, and helping (and hopefully not taking over) •Analytics and Internet of things .. Immersive world •Big data and real-time analytics will be crucial. How far are we from realizing that?
  • 3. What would take to build such a world? •Sensors and actuators (Motes?) •Fast interoperable event systems (MQTT?) •Powerful query languages (CEP?) •Powerful control systems and decision systems
  • 5. CEP Operators • Filters or transformations (process a single event) – from Ball[v>10] select .. insert into .. • Windows + aggregation (track window of events: time, length) – from Ball#window.time(30s) select avg(v) .. • Joins (join two event streams to one) – from Ball#window.time(30s) as b join Players as p on p.v < b.v • Patterns (state machine implementation) – from Ball[v>10], Ball[v<10]*,Ball[v>10] select .. • Event tables (map a database as an event stream) – Define table HitV (v double) using .. db info ..
  • 6. Sport (Soccer) Usecases? •Dashboard on game status •Alarms about critical events in the game •Real-time game analysis and predictions about the next move •Updates/ stats etc., on mobile phone with customized offers •Study of game and players effectiveness •Monitor players health and body functions
  • 7. DEBS Challenge • Soccer game, players and ball has sensors (DESB Challenge 2013) sid, ts, x,y,z, v,a • Use cases: Running analysis, Ball Possession and Shots on Goal, Heatmap of Activity • WSO2 CEP (Siddhi) did 100K+ throughput
  • 9. Usecase 1: Running Analysis •Main idea: detect when speed thresholds have passed define partition player by Players .id; from s = Players [v <= 1 or v > 11] , t = Players [v > 1 and v <= 11]+ , e = Players [v <= 1 or v > 11] select s.ts as tsStart , e.ts as tsStop ,s.id as playerId , ‘‘trot" as intensity , t [0].v as instantSpeed , (e.ts - s.ts )/1000000000 as unitPeriod insert into RunningStats partition by player;
  • 10. Usecase 2: Ball Possession •Ball possession (you possess the ball from time you hit it until someone else hit it or ball leaves the ground)
  • 11. Usecase 3: Heatmap of Activity •Show where actions happened (via cells defined by a grid of 64X100 etc.), need updates once every second •Can solved via cell change boundaries, but does not work if one player stays more than 1 sec in the same cell. So need to join with a timer.
  • 12. Usecase 4: Detect Kicks on the Goal •Main Idea: Detect kicks on the ball, calculate direction after 1m, and keep giving updates as long as it is in right direction
  • 13. New Usecase: Offside Detection •If you have gone passed the last defender at time of a kick, you are in a offside position. •If you are part of that play after, it is foul
  • 14. Results for DEBS Scenarios
  • 15. WSO2 Big Data Platform
  • 16. Other Applications •System/ Device Management •Fleet/ Logistic Management •Fraud Detection •Targeted/ Location Sensitive Marketing •Smart Grid Control •Geo Fencing •…
  • 17. Conclusion •We are heading for a deeply integrated world with real-time detection and actions – We have technology to do this now. E.g. (DEBS usecases) – Power of CEP – Use real-time and batch processing in tandem •All the software we discussed are Open source under Apache License. Visit http://wso2.com/. •Like to integrate with us, help, or join? Talk to us at Big Data booth or architecture@wso2.org