SlideShare a Scribd company logo
1 of 22
Cloud PARTE
Elastic Complex Event Processing
based on Mobile Actors
J. Swalens, T. Renaux, L. Hoste, S. Marr, W. De Meuter
Software Languages Lab
AGERE Workshop, 2013-10-27
Use Case

Traffic
Management

©Filip Bogdan
http://photo.net/photodb/photo?photo_id=5953570

2
Traffic Management at City Scale?
©Jupiter Systems,
Beijing Traffic
Management Bureau

Singapore: GPS coord. of 16000 taxis = 200 coord./sec = 12KB/sec
Source: City-Scale Traffic Estimation from a Roving Sensor Network, Javed Aslam, Sejoon Lim, Xinghao Pan, and Daniela Rus. Proceedings of the 10th ACM Conference on Embedded Network Sensor Systems. ACM, (2012)
Challenges:
Large Variety of Input Sources

Personal Onboard Units

Pedestrian Sensing

Vehicle Sensing
©Jupiter Systems, Beijing Traffic Management Bureau

4
Challenges:
Combining the Data
Imperative
int gru_tapping(struct grail *ge, const struct utouch_frame *frame) {
struct gesture_recognizer *gru = ge->gru;
struct tapping_model *state = &gru->tapping;
struct move_model *move = &gru->move;
state->tap = 0;
if (frame->num_active && !frame->prev->num_active) {
state->mintouch = 0;
state->maxtouch = 0;
}
if (move->ntouch > state->maxtouch) {
if (state->active) {
gin_gid_discard(ge, state->gid);
state->active = 0;
}
state->start = move->time;
state->maxtouch = move->ntouch;
set_props(ge->gin, state, move, frame);
if (state->maxtouch <= 5) {
int type = GRAIL_TYPE_TAP1 + state->maxtouch - 1;
state->gid = gin_gid_begin(ge, type, PRIO_TAP, frame);
state->active = 1;
}
return 0;
}
if (!state->active) {
state->mintouch = move->ntouch;
state->maxtouch = move->ntouch;
return 0;
}
if (move->ntouch <= state->mintouch) {
int x = state->prop[GRAIL_PROP_TAP_X];
int y = state->prop[GRAIL_PROP_TAP_Y];
int t = move->time - state->start;
if (t > move->fm[FM_X].bar_ms) {
gin_gid_discard(ge, state->gid);
state->mintouch = move->ntouch;
state->maxtouch = move->ntouch;
state->active = 0;
return 0;
}
state->tap = state->maxtouch;
state->prop[GRAIL_PROP_TAP_DT] = t;
gin_gid_event(ge, state->gid, x, y, state->maxtouch,
state->prop, state->nprop, 1);
state->mintouch = move->ntouch;

Declarative

a simple tap

(defrule detectTap
(Press (x ?x)
(y ?y)
(finger "index")
(timestamp ?t1))
(Release (x ?x)
(y ?y)
(finger "index")
(timestamp ?t2))
(test (< ?t1 ?t2))
=>
(tapDetected ?x ?y)))

5
Challenges:
Combining the Data
(defrule StolenCarInTraffic
(defrule CarTooFast
(StolenCar
(plate ?pl))
(Car (camera ?c1) (plate ?pl)
(Car
(plate ?pl) (camera ?c))
(time ?t1))
(Camera (id ?c) (highway ?hw)
(Car (camera ?c2) (plate ?pl)
(direction ?d) (position ?p))
(time ?t2))
(test (> ?t2 ?t1))
=>
(Camera (id ?c1) (highway ?hw)
(printout "Sloten car " ?pl
(direction ?d) (position ?p1))
" seen on highway " ?hw
(Camera (id ?c2) (highway ?hw)
" at " ?p
(direction ?d) (position ?p2))
" in direction " ?d))
(test (> (speed ?t1 ?p1 ?t2 ?p2)
*speed-limit*))

=>
(printout "Car too fast: "
?pl " at "
(speed ?t1 ?p1 ?t2 ?p2) " km/h."))

6
Challenges:
Combining the Data
(defrule StationaryCar
(Car (camera ?c) (plate ?pl)
(time ?t1))
(Car (camera ?c) (plate ?pl)
(time ?t2))
(test (> (- ?t2 ?t1) 30))
(Camera (id ?c) (highway ?hw)
(direction ?d) (position ?p))

=>
(assert (StationaryCar (camera ?c)
(plate ?pl) (time ?t1))))

(defrule StationaryCars
(Camera (id ?c) (highway ?hw)
(direction ?d) (position ?p))
(StationaryCar (camera ?c)
(plate ?pl1) (time ?t1))
(StationaryCar (camera ?c)
(plate ?pl2) (time ?t2))
(StationaryCar (camera ?c)
(plate ?pl3) (time ?t3))
(test (!= ?pl1 ?pl2 ?pl3))
(test (< 0 (- ?t2 ?t1) 1))
(test (< 0 (- ?t3 ?t2) 1))

=>
(assert (StationaryCars
(camera ?c) (time ?t1))))

7
How to approach such scenarios?
• Declarative rules!
• Online processing of real-time events!

1 set of rules
1 set of facts

Load balancing

Elasticity

(transparent distribution)
8
Our Approach

Parallel + Soft Real-Time

•
•
•
•

Distributed for “Big Data”

Declarative rules
Mobile actors
Central managing interface
Simple heuristics for load balancing
9
PARTE: A Parallel, Actor-based Rete Engine
(defrule StationaryCar
(Car (cam ?c) (plate ?plt) (time ?t1))
(Car (cam ?c) (plate ?plt) (time ?t2))
(test (> (- ?t2 ?t1) 30))
(Cam (id ?c) (position ?p))

Events
e=Car

• Each node an actor
• Unification memory
intensive
• Tests computationally
intensive

e=Cam

Unification
1.cam=2.cam
1.plate=2.plate

=>
(assert (StationaryCar (pos ?p)))

Type Tests

1

2

Test
time-diff > 30
Unification
cam=id

3
4

assert

[1] Rete: A Fast Algorithm for the Many Patterns/Many Objects Match Problem, Charles L. Forgy. Artif. Intell. 19(1):17–37 (1982)
[2] Parallel Gesture Recognition with Soft Real-Time Guarantees, T. Renaux, L. Hoste, S. Marr, and W. De Meuter. AGERE’12, 35–46.

10
Cloud PARTE
From Parallel to Distributed

1

Events

2

3

(defrule StationaryCar
(Car (cam ?c) (plate ?plt) (time
?t1))
(Car (cam ?c) (plate ?plt) (time
?t2))
(test (> (- ?t2 ?t1) 30))
(Cam (id ?c) (position ?p))

=>
(assert (StationaryCar (pos ?p)))

4
master

App

• Transparent Distribution
worker

Cloud PARTE builds on Theron (C++ actor library, http://www.theron-library.com/)

11
Cloud PARTE
From Parallel to Distributed

Events

1

Load
Balancer

2

(defrule StationaryCar
(Car (cam ?c) (plate ?plt) (time
?t1))
(Car (cam ?c) (plate ?plt) (time
?t2))
(test (> (- ?t2 ?t1) 30))
(Cam (id ?c) (position ?p))

=>
(assert (StationaryCar (pos ?p)))

4
master

App

3

worker

• Automatic Load Balancing
• Mobile actors
• Heuristic
– Length of message queue

Cloud PARTE builds on Theron (C++ actor library, http://www.theron-library.com/)

12
Cloud PARTE
From Parallel to Distributed

1

Load
Balancer

3

4
master

App

Events

2

worker

• Elasticity
– Adding/removing
of workers

• Coordination
required
(currently)
13
Cloud PARTE
From Parallel to Distributed

• Elasticity
2

Load
Balancer

3

4
master

App

Events

1

worker

– Adding/removing
of workers

• Coordination
required
(currently)
14
Performance

EVALUATION
10/27/20

15
Microbenchmarks
16 heavy tests

Cloud PARTE Scalability

PARTE vs.
CloudPARTE

Slow
down

101 simple tests
501 simple tests
101 complex tests
… with variables
10x101 simple tests
10x8 heavy tests
16 heavy tests
32 heavy tests
64 heavy tests
128 heavy tests
Joining tree
Search

18x
29x
5x
5x
60x
2x
4x
4x
4x
3x
6x
2x

Single machine
Performance Evaluation: Comparison with non-distributed PARTE

16
Performance: Traffic Scenario

Simulating events from variety of sources

17
11% speedup

2 machines
Static Actor Distribution

2 machines
Static Actor Distribution +
Dynamic Load Balancing

17% speedup

3 machines
Static Actor Distribution +
Dynamic Load Balancing +
Empty Machine
18
CONCLUSION

19
1 set of rules
1 set of facts

Load balancing

Elasticity

(transparent distribution)
Traffic Management

Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors

20
BACKUP

21
Mobile Actors: Movement Protocol

22

More Related Content

Viewers also liked

Introduction to Streaming Analytics
Introduction to Streaming AnalyticsIntroduction to Streaming Analytics
Introduction to Streaming Analytics
Guido Schmutz
 
Introducing Apache Giraph for Large Scale Graph Processing
Introducing Apache Giraph for Large Scale Graph ProcessingIntroducing Apache Giraph for Large Scale Graph Processing
Introducing Apache Giraph for Large Scale Graph Processing
sscdotopen
 

Viewers also liked (10)

Graph Processing with Apache TinkerPop
Graph Processing with Apache TinkerPopGraph Processing with Apache TinkerPop
Graph Processing with Apache TinkerPop
 
Gelly in Apache Flink Bay Area Meetup
Gelly in Apache Flink Bay Area MeetupGelly in Apache Flink Bay Area Meetup
Gelly in Apache Flink Bay Area Meetup
 
ETL into Neo4j
ETL into Neo4jETL into Neo4j
ETL into Neo4j
 
20170126 big data processing
20170126 big data processing20170126 big data processing
20170126 big data processing
 
Introduction to Streaming Analytics
Introduction to Streaming AnalyticsIntroduction to Streaming Analytics
Introduction to Streaming Analytics
 
Converting Relational to Graph Databases
Converting Relational to Graph DatabasesConverting Relational to Graph Databases
Converting Relational to Graph Databases
 
Netflix Keystone—Cloud scale event processing pipeline
Netflix Keystone—Cloud scale event processing pipelineNetflix Keystone—Cloud scale event processing pipeline
Netflix Keystone—Cloud scale event processing pipeline
 
Real-Time Event Processing
Real-Time Event ProcessingReal-Time Event Processing
Real-Time Event Processing
 
Introducing Apache Giraph for Large Scale Graph Processing
Introducing Apache Giraph for Large Scale Graph ProcessingIntroducing Apache Giraph for Large Scale Graph Processing
Introducing Apache Giraph for Large Scale Graph Processing
 
Semantic Complex Event Processing
Semantic Complex Event ProcessingSemantic Complex Event Processing
Semantic Complex Event Processing
 

Similar to Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors

Material Handling System
Material Handling SystemMaterial Handling System
Material Handling System
wombaty
 
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandMobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
François Garillot
 
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Naoki (Neo) SATO
 

Similar to Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors (20)

Mechatronics engineer
Mechatronics engineerMechatronics engineer
Mechatronics engineer
 
The 'right' choices in GIS - Grontmij
The 'right' choices in GIS - GrontmijThe 'right' choices in GIS - Grontmij
The 'right' choices in GIS - Grontmij
 
Anderson_CV_NN
Anderson_CV_NNAnderson_CV_NN
Anderson_CV_NN
 
INAC Online Hazards Database App
INAC Online Hazards Database AppINAC Online Hazards Database App
INAC Online Hazards Database App
 
Level Crossing protection integration into connected car tecnologies
Level Crossing protection integration into connected car tecnologiesLevel Crossing protection integration into connected car tecnologies
Level Crossing protection integration into connected car tecnologies
 
Dealing with the need for Infrastructural Support in Ambient Intelligence
Dealing with the need for Infrastructural Support in Ambient IntelligenceDealing with the need for Infrastructural Support in Ambient Intelligence
Dealing with the need for Infrastructural Support in Ambient Intelligence
 
Material Handling System
Material Handling SystemMaterial Handling System
Material Handling System
 
Multi-agent approach to resource allocation inautonomous vehicle fleet
Multi-agent approach to resource allocation inautonomous vehicle fleetMulti-agent approach to resource allocation inautonomous vehicle fleet
Multi-agent approach to resource allocation inautonomous vehicle fleet
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
 
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandMobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
 
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
 
Portofolio Control Version SN
Portofolio Control Version SNPortofolio Control Version SN
Portofolio Control Version SN
 
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
 
The Uncertain Enterprise
The Uncertain EnterpriseThe Uncertain Enterprise
The Uncertain Enterprise
 
How to Develop Your Own Simulators for Discrete-Event Systems
How to Develop Your Own Simulators for Discrete-Event SystemsHow to Develop Your Own Simulators for Discrete-Event Systems
How to Develop Your Own Simulators for Discrete-Event Systems
 
HTML5 and CartoDB
HTML5 and CartoDBHTML5 and CartoDB
HTML5 and CartoDB
 
Mechatronics engineer
Mechatronics engineerMechatronics engineer
Mechatronics engineer
 
2018.07 Self-driving cars meetup
2018.07 Self-driving cars meetup2018.07 Self-driving cars meetup
2018.07 Self-driving cars meetup
 
Mission planning of autonomous quadrotors
Mission planning of autonomous quadrotorsMission planning of autonomous quadrotors
Mission planning of autonomous quadrotors
 
A hybrid controller for vision based navigation of autonomous vehicles in urb...
A hybrid controller for vision based navigation of autonomous vehicles in urb...A hybrid controller for vision based navigation of autonomous vehicles in urb...
A hybrid controller for vision based navigation of autonomous vehicles in urb...
 

More from Stefan Marr

Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...
Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...
Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...
Stefan Marr
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
Stefan Marr
 
Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...
Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...
Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...
Stefan Marr
 
Sly and the RoarVM: Exploring the Manycore Future of Programming
Sly and the RoarVM: Exploring the Manycore Future of ProgrammingSly and the RoarVM: Exploring the Manycore Future of Programming
Sly and the RoarVM: Exploring the Manycore Future of Programming
Stefan Marr
 

More from Stefan Marr (20)

Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
 
Seminar on Parallel and Concurrent Programming
Seminar on Parallel and Concurrent ProgrammingSeminar on Parallel and Concurrent Programming
Seminar on Parallel and Concurrent Programming
 
Optimizing Communicating Event-Loop Languages with Truffle
Optimizing Communicating Event-Loop Languages with TruffleOptimizing Communicating Event-Loop Languages with Truffle
Optimizing Communicating Event-Loop Languages with Truffle
 
Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...
Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...
Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...
 
Why Is Concurrent Programming Hard? And What Can We Do about It?
Why Is Concurrent Programming Hard? And What Can We Do about It?Why Is Concurrent Programming Hard? And What Can We Do about It?
Why Is Concurrent Programming Hard? And What Can We Do about It?
 
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
 
Supporting Concurrency Abstractions in High-level Language Virtual Machines
Supporting Concurrency Abstractions in High-level Language Virtual MachinesSupporting Concurrency Abstractions in High-level Language Virtual Machines
Supporting Concurrency Abstractions in High-level Language Virtual Machines
 
Identifying A Unifying Mechanism for the Implementation of Concurrency Abstra...
Identifying A Unifying Mechanism for the Implementation of Concurrency Abstra...Identifying A Unifying Mechanism for the Implementation of Concurrency Abstra...
Identifying A Unifying Mechanism for the Implementation of Concurrency Abstra...
 
Sly and the RoarVM: Parallel Programming with Smalltalk
Sly and the RoarVM: Parallel Programming with SmalltalkSly and the RoarVM: Parallel Programming with Smalltalk
Sly and the RoarVM: Parallel Programming with Smalltalk
 
Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...
Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...
Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...
 
Sly and the RoarVM: Exploring the Manycore Future of Programming
Sly and the RoarVM: Exploring the Manycore Future of ProgrammingSly and the RoarVM: Exploring the Manycore Future of Programming
Sly and the RoarVM: Exploring the Manycore Future of Programming
 
PHP.next: Traits
PHP.next: TraitsPHP.next: Traits
PHP.next: Traits
 
The Price of the Free Lunch: Programming in the Multicore Era
The Price of the Free Lunch: Programming in the Multicore EraThe Price of the Free Lunch: Programming in the Multicore Era
The Price of the Free Lunch: Programming in the Multicore Era
 
Locality and Encapsulation: A Foundation for Concurrency Support in Multi-Lan...
Locality and Encapsulation: A Foundation for Concurrency Support in Multi-Lan...Locality and Encapsulation: A Foundation for Concurrency Support in Multi-Lan...
Locality and Encapsulation: A Foundation for Concurrency Support in Multi-Lan...
 
Insertion Tree Phasers: Efficient and Scalable Barrier Synchronization for Fi...
Insertion Tree Phasers: Efficient and Scalable Barrier Synchronization for Fi...Insertion Tree Phasers: Efficient and Scalable Barrier Synchronization for Fi...
Insertion Tree Phasers: Efficient and Scalable Barrier Synchronization for Fi...
 
Encapsulation and Locality: A Foundation for Concurrency Support in Multi-Lan...
Encapsulation and Locality: A Foundation for Concurrency Support in Multi-Lan...Encapsulation and Locality: A Foundation for Concurrency Support in Multi-Lan...
Encapsulation and Locality: A Foundation for Concurrency Support in Multi-Lan...
 
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
 
Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from...
Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from...Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from...
Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from...
 
VMADL: An Architecture Definition Language for Variability and Composition ...
VMADL: An Architecture Definition Language  for Variability and Composition  ...VMADL: An Architecture Definition Language  for Variability and Composition  ...
VMADL: An Architecture Definition Language for Variability and Composition ...
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
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
 
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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors

  • 1. Cloud PARTE Elastic Complex Event Processing based on Mobile Actors J. Swalens, T. Renaux, L. Hoste, S. Marr, W. De Meuter Software Languages Lab AGERE Workshop, 2013-10-27
  • 3. Traffic Management at City Scale? ©Jupiter Systems, Beijing Traffic Management Bureau Singapore: GPS coord. of 16000 taxis = 200 coord./sec = 12KB/sec Source: City-Scale Traffic Estimation from a Roving Sensor Network, Javed Aslam, Sejoon Lim, Xinghao Pan, and Daniela Rus. Proceedings of the 10th ACM Conference on Embedded Network Sensor Systems. ACM, (2012)
  • 4. Challenges: Large Variety of Input Sources Personal Onboard Units Pedestrian Sensing Vehicle Sensing ©Jupiter Systems, Beijing Traffic Management Bureau 4
  • 5. Challenges: Combining the Data Imperative int gru_tapping(struct grail *ge, const struct utouch_frame *frame) { struct gesture_recognizer *gru = ge->gru; struct tapping_model *state = &gru->tapping; struct move_model *move = &gru->move; state->tap = 0; if (frame->num_active && !frame->prev->num_active) { state->mintouch = 0; state->maxtouch = 0; } if (move->ntouch > state->maxtouch) { if (state->active) { gin_gid_discard(ge, state->gid); state->active = 0; } state->start = move->time; state->maxtouch = move->ntouch; set_props(ge->gin, state, move, frame); if (state->maxtouch <= 5) { int type = GRAIL_TYPE_TAP1 + state->maxtouch - 1; state->gid = gin_gid_begin(ge, type, PRIO_TAP, frame); state->active = 1; } return 0; } if (!state->active) { state->mintouch = move->ntouch; state->maxtouch = move->ntouch; return 0; } if (move->ntouch <= state->mintouch) { int x = state->prop[GRAIL_PROP_TAP_X]; int y = state->prop[GRAIL_PROP_TAP_Y]; int t = move->time - state->start; if (t > move->fm[FM_X].bar_ms) { gin_gid_discard(ge, state->gid); state->mintouch = move->ntouch; state->maxtouch = move->ntouch; state->active = 0; return 0; } state->tap = state->maxtouch; state->prop[GRAIL_PROP_TAP_DT] = t; gin_gid_event(ge, state->gid, x, y, state->maxtouch, state->prop, state->nprop, 1); state->mintouch = move->ntouch; Declarative a simple tap (defrule detectTap (Press (x ?x) (y ?y) (finger "index") (timestamp ?t1)) (Release (x ?x) (y ?y) (finger "index") (timestamp ?t2)) (test (< ?t1 ?t2)) => (tapDetected ?x ?y))) 5
  • 6. Challenges: Combining the Data (defrule StolenCarInTraffic (defrule CarTooFast (StolenCar (plate ?pl)) (Car (camera ?c1) (plate ?pl) (Car (plate ?pl) (camera ?c)) (time ?t1)) (Camera (id ?c) (highway ?hw) (Car (camera ?c2) (plate ?pl) (direction ?d) (position ?p)) (time ?t2)) (test (> ?t2 ?t1)) => (Camera (id ?c1) (highway ?hw) (printout "Sloten car " ?pl (direction ?d) (position ?p1)) " seen on highway " ?hw (Camera (id ?c2) (highway ?hw) " at " ?p (direction ?d) (position ?p2)) " in direction " ?d)) (test (> (speed ?t1 ?p1 ?t2 ?p2) *speed-limit*)) => (printout "Car too fast: " ?pl " at " (speed ?t1 ?p1 ?t2 ?p2) " km/h.")) 6
  • 7. Challenges: Combining the Data (defrule StationaryCar (Car (camera ?c) (plate ?pl) (time ?t1)) (Car (camera ?c) (plate ?pl) (time ?t2)) (test (> (- ?t2 ?t1) 30)) (Camera (id ?c) (highway ?hw) (direction ?d) (position ?p)) => (assert (StationaryCar (camera ?c) (plate ?pl) (time ?t1)))) (defrule StationaryCars (Camera (id ?c) (highway ?hw) (direction ?d) (position ?p)) (StationaryCar (camera ?c) (plate ?pl1) (time ?t1)) (StationaryCar (camera ?c) (plate ?pl2) (time ?t2)) (StationaryCar (camera ?c) (plate ?pl3) (time ?t3)) (test (!= ?pl1 ?pl2 ?pl3)) (test (< 0 (- ?t2 ?t1) 1)) (test (< 0 (- ?t3 ?t2) 1)) => (assert (StationaryCars (camera ?c) (time ?t1)))) 7
  • 8. How to approach such scenarios? • Declarative rules! • Online processing of real-time events! 1 set of rules 1 set of facts Load balancing Elasticity (transparent distribution) 8
  • 9. Our Approach Parallel + Soft Real-Time • • • • Distributed for “Big Data” Declarative rules Mobile actors Central managing interface Simple heuristics for load balancing 9
  • 10. PARTE: A Parallel, Actor-based Rete Engine (defrule StationaryCar (Car (cam ?c) (plate ?plt) (time ?t1)) (Car (cam ?c) (plate ?plt) (time ?t2)) (test (> (- ?t2 ?t1) 30)) (Cam (id ?c) (position ?p)) Events e=Car • Each node an actor • Unification memory intensive • Tests computationally intensive e=Cam Unification 1.cam=2.cam 1.plate=2.plate => (assert (StationaryCar (pos ?p))) Type Tests 1 2 Test time-diff > 30 Unification cam=id 3 4 assert [1] Rete: A Fast Algorithm for the Many Patterns/Many Objects Match Problem, Charles L. Forgy. Artif. Intell. 19(1):17–37 (1982) [2] Parallel Gesture Recognition with Soft Real-Time Guarantees, T. Renaux, L. Hoste, S. Marr, and W. De Meuter. AGERE’12, 35–46. 10
  • 11. Cloud PARTE From Parallel to Distributed 1 Events 2 3 (defrule StationaryCar (Car (cam ?c) (plate ?plt) (time ?t1)) (Car (cam ?c) (plate ?plt) (time ?t2)) (test (> (- ?t2 ?t1) 30)) (Cam (id ?c) (position ?p)) => (assert (StationaryCar (pos ?p))) 4 master App • Transparent Distribution worker Cloud PARTE builds on Theron (C++ actor library, http://www.theron-library.com/) 11
  • 12. Cloud PARTE From Parallel to Distributed Events 1 Load Balancer 2 (defrule StationaryCar (Car (cam ?c) (plate ?plt) (time ?t1)) (Car (cam ?c) (plate ?plt) (time ?t2)) (test (> (- ?t2 ?t1) 30)) (Cam (id ?c) (position ?p)) => (assert (StationaryCar (pos ?p))) 4 master App 3 worker • Automatic Load Balancing • Mobile actors • Heuristic – Length of message queue Cloud PARTE builds on Theron (C++ actor library, http://www.theron-library.com/) 12
  • 13. Cloud PARTE From Parallel to Distributed 1 Load Balancer 3 4 master App Events 2 worker • Elasticity – Adding/removing of workers • Coordination required (currently) 13
  • 14. Cloud PARTE From Parallel to Distributed • Elasticity 2 Load Balancer 3 4 master App Events 1 worker – Adding/removing of workers • Coordination required (currently) 14
  • 16. Microbenchmarks 16 heavy tests Cloud PARTE Scalability PARTE vs. CloudPARTE Slow down 101 simple tests 501 simple tests 101 complex tests … with variables 10x101 simple tests 10x8 heavy tests 16 heavy tests 32 heavy tests 64 heavy tests 128 heavy tests Joining tree Search 18x 29x 5x 5x 60x 2x 4x 4x 4x 3x 6x 2x Single machine Performance Evaluation: Comparison with non-distributed PARTE 16
  • 17. Performance: Traffic Scenario Simulating events from variety of sources 17
  • 18. 11% speedup 2 machines Static Actor Distribution 2 machines Static Actor Distribution + Dynamic Load Balancing 17% speedup 3 machines Static Actor Distribution + Dynamic Load Balancing + Empty Machine 18
  • 20. 1 set of rules 1 set of facts Load balancing Elasticity (transparent distribution) Traffic Management Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors 20
  • 22. Mobile Actors: Movement Protocol 22

Editor's Notes

  1. First: all the good ideas are the ones of my colleagues, and the bad ones are all mine.Second: what I am going to talk about is a distributed Rete engineA forward chaining inference engine, for complex event detection, pattern matching
  2. NYC area 8mio cars, and 18mio peopleBeijing 5mio cars, 20mio peopleImagine we want to manage the traffic based on realtime dataThe amount of data is not the real problem:Singapore: 5mio people.
  3. State the conclusions, requirements, base to work fromMany to many matchingMany Rules and Many events
  4. Declarative rules!Online processing of real-time eventsLoad-balancing (dynamic)Elastic (add more machines)Transparent distribution (single system image)
  5. So, why would you care? Well, we believe that we do not only have a contribution in the field of Rete engines, but at the same time a relevant application of the actor modelInitial prototype with:Transparent DistributionMobile actorsCentral managing interface (managing actor)Simple load balancing heuristic
  6. Make explicit: all nodes are actors, communicate via message passingPoint out the data intensive nodes, cross-product of cars, and cams and cars.Point out that tests can be all kind of things, complex expressions, but also compute intensive external functions, e.g., to calculate the spatial relationships between points
  7. Mobility built on top of theronclassic code mobilitythe actor contains it’s code, for instance the test expressionGather load info per machineFind load imbalance node overloaded if &gt; 50 messages machine overloaded if ≥ 5 overloaded nodesmachine underloaded if &lt; 3 overloaded nodes 3. Select node to move and destination
  8. Single machine comparison:PARTE vs. CloudPARTE
  9. Goal: chose realistic scenario
  10. Starts with static distribution over 2 machines