SlideShare a Scribd company logo
1 of 15
Static Analysis of Complex Event
Processing Programs
Adrián García-López1, Loli Burgueño1,2, Antonio Vallecillo1
1Universidad de Malaga, Spain
2Open University of Catalonia, Spain
1
Complex Event Processing (CEP)
 CEP is a method for data stream-processing for analyzing and correlating streams
of information about real-time events in order to derive conclusions from them
 CEP enables the definition of complex events on top of other events (primitive or
complex)
 CEP programs are composed of rules which are in charge of processing the events
2
Complex Event Processing (CEP)
 CEP is a method for data stream-processing for analyzing and correlating streams
of information about real-time events in order to derive conclusions from them.
 CEP permits defining complex events on top of other events (primitive or complex)
 CEP programs are composed of rules which are in charge of processing the events
3
Queries Data Results Data Queries
(patterns)
Results
Motivation: Real CEP application
 Andalucia Air Quality Control
 Andalusian Regional Government’s sensor network: 61 sensor stations
 Each station measures every 10 minutes six air pollutants (e.g., carbon monoxide,
ozone, …)
4
 The information about each pollutant
measurement is aggregated,
 The global air quality level is computed and,
 Expressed in a 6-grade scale: from Good to
Hazardous
 43 CEP rules
 We detected rule race conditions!!
The Smart House Example
 Sensors for detecting three basic parameters of a
house: temperature, carbon monoxide (CO) level, and main door open.
 Sensors for detecting the location of occupants
5
Home(id:3,
ts:1528443000,
x:0,
y:0,
sq:100,
temp:20,
co:4000,
dopen:false)
Person(id:1,
ts:1528443000,
x:50,
y:50)
The Smart House Example
 Patterns:
 TemperatureIncrease: The temperature of the house has increased 2 or
more degrees in less than one minute.
 TemperatureWarning: There are 4 TemperatureIncrease events is less than
5 minutes, and the temperature is always above 33 degrees.
 COHigh: CO levels exceed 5000 units.
 FireWarning: A COHigh event is detected, followed by a
TemperatureWarning event, everything within less than 5 seconds.
 NobodyHome: The main door of the house is closed and there is nobody
within the perimeter of the house.
 CallFireDept: A FireWarning event occurs after a NobodyHome event is
detected.
6
The Smart House Example
Patterns in CEP with Esper
 TemperatureIncrease: The temperature of the house has increased 2 or more
degrees in less than one minute
 Esper(1) engine able to process millions of events per second
7
insert into TemperatureIncrease
select h2.ts as ts,
h1.id as id,
h2.temp as temp,
h2.temp-h1.temp as incr
from pattern [
(every (h1=Home() ->
h2=Home(h2.temp-h1.temp>=2 and h2.id=h1.id)))
where timer:within(1 minutes)];
(1) http://www.espertech.com/esper/
But life is not so easy…
> When the number of patterns increases, the CEP code and rules become
difficult to understand, debug and maintain!
Rule acyclicity – it may lead to never-ending loops
 Rule_1 generates events of type A  which are consumed by Rule_2
 Rule_2 generates events of type B  which are consumed by Rule_1
Rule race conditions – they may lead to non-confluent executions
 Rule_1 and Rule_2 behave as before
 Rule_3 consumes events of type A->B, and produces events of type X
 Rule_4 consumes events of type B->A and produces events of type Y
 Depending on the order in which Rule_1 and Rule_2 are triggered, events X or Y are
generated.
 Assigning pritorities to rules can solve this issue, but they are not normally used
8
>> Static analysis of CEP programs can easily detect these situations
Representing CEP rules as a graph – Cycles detection
9
(*) Bugs in the code
that led to cycles
Representing CEP rules as a graph – Rule race conditions
10
The CEPA tool (CEP-Analysis)
 https://github.com/Garlo13/CEPStaticAnalysis
 Kosaraju-Sharir algorithm for detecting cycles O(#V + #E)
 Topological Order to traverse the graph O(#V + #E)
11
CEPA workflow
12
A snapshot of CEPA
 “Fixed” rules with priorities
13
Conclusions and Future Work
 CEP programs become difficult to understand, debug and maintain when
their number of rules grow
 Validation with a real CEP application (Andalucia Air Quality Control, 43 rules)
 Other analysis are of course required, but lightweight static analysis are very
cost-effective
 Provide support for more Esper features
 Obtain more feedback on the features and scalability of our approach by
means of more and larger case studies
 Add further static (and dynamic) analyses
14
Adrián García-López1, Loli Burgueño1,2, Antonio Vallecillo1
1Universidad de Malaga, Spain
2Open University of Catalonia, Spain
Static Analysis of Complex Event
Processing Programs
15

More Related Content

Recently uploaded

An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringJuanCarlosMorales19600
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 

Recently uploaded (20)

An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineering
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Static Analysis of Complex Event Processing Programs

  • 1. Static Analysis of Complex Event Processing Programs Adrián García-López1, Loli Burgueño1,2, Antonio Vallecillo1 1Universidad de Malaga, Spain 2Open University of Catalonia, Spain 1
  • 2. Complex Event Processing (CEP)  CEP is a method for data stream-processing for analyzing and correlating streams of information about real-time events in order to derive conclusions from them  CEP enables the definition of complex events on top of other events (primitive or complex)  CEP programs are composed of rules which are in charge of processing the events 2
  • 3. Complex Event Processing (CEP)  CEP is a method for data stream-processing for analyzing and correlating streams of information about real-time events in order to derive conclusions from them.  CEP permits defining complex events on top of other events (primitive or complex)  CEP programs are composed of rules which are in charge of processing the events 3 Queries Data Results Data Queries (patterns) Results
  • 4. Motivation: Real CEP application  Andalucia Air Quality Control  Andalusian Regional Government’s sensor network: 61 sensor stations  Each station measures every 10 minutes six air pollutants (e.g., carbon monoxide, ozone, …) 4  The information about each pollutant measurement is aggregated,  The global air quality level is computed and,  Expressed in a 6-grade scale: from Good to Hazardous  43 CEP rules  We detected rule race conditions!!
  • 5. The Smart House Example  Sensors for detecting three basic parameters of a house: temperature, carbon monoxide (CO) level, and main door open.  Sensors for detecting the location of occupants 5 Home(id:3, ts:1528443000, x:0, y:0, sq:100, temp:20, co:4000, dopen:false) Person(id:1, ts:1528443000, x:50, y:50)
  • 6. The Smart House Example  Patterns:  TemperatureIncrease: The temperature of the house has increased 2 or more degrees in less than one minute.  TemperatureWarning: There are 4 TemperatureIncrease events is less than 5 minutes, and the temperature is always above 33 degrees.  COHigh: CO levels exceed 5000 units.  FireWarning: A COHigh event is detected, followed by a TemperatureWarning event, everything within less than 5 seconds.  NobodyHome: The main door of the house is closed and there is nobody within the perimeter of the house.  CallFireDept: A FireWarning event occurs after a NobodyHome event is detected. 6
  • 7. The Smart House Example Patterns in CEP with Esper  TemperatureIncrease: The temperature of the house has increased 2 or more degrees in less than one minute  Esper(1) engine able to process millions of events per second 7 insert into TemperatureIncrease select h2.ts as ts, h1.id as id, h2.temp as temp, h2.temp-h1.temp as incr from pattern [ (every (h1=Home() -> h2=Home(h2.temp-h1.temp>=2 and h2.id=h1.id))) where timer:within(1 minutes)]; (1) http://www.espertech.com/esper/
  • 8. But life is not so easy… > When the number of patterns increases, the CEP code and rules become difficult to understand, debug and maintain! Rule acyclicity – it may lead to never-ending loops  Rule_1 generates events of type A  which are consumed by Rule_2  Rule_2 generates events of type B  which are consumed by Rule_1 Rule race conditions – they may lead to non-confluent executions  Rule_1 and Rule_2 behave as before  Rule_3 consumes events of type A->B, and produces events of type X  Rule_4 consumes events of type B->A and produces events of type Y  Depending on the order in which Rule_1 and Rule_2 are triggered, events X or Y are generated.  Assigning pritorities to rules can solve this issue, but they are not normally used 8 >> Static analysis of CEP programs can easily detect these situations
  • 9. Representing CEP rules as a graph – Cycles detection 9 (*) Bugs in the code that led to cycles
  • 10. Representing CEP rules as a graph – Rule race conditions 10
  • 11. The CEPA tool (CEP-Analysis)  https://github.com/Garlo13/CEPStaticAnalysis  Kosaraju-Sharir algorithm for detecting cycles O(#V + #E)  Topological Order to traverse the graph O(#V + #E) 11
  • 13. A snapshot of CEPA  “Fixed” rules with priorities 13
  • 14. Conclusions and Future Work  CEP programs become difficult to understand, debug and maintain when their number of rules grow  Validation with a real CEP application (Andalucia Air Quality Control, 43 rules)  Other analysis are of course required, but lightweight static analysis are very cost-effective  Provide support for more Esper features  Obtain more feedback on the features and scalability of our approach by means of more and larger case studies  Add further static (and dynamic) analyses 14
  • 15. Adrián García-López1, Loli Burgueño1,2, Antonio Vallecillo1 1Universidad de Malaga, Spain 2Open University of Catalonia, Spain Static Analysis of Complex Event Processing Programs 15