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

PDF
CArcMOOC 03.04 - Gate-level design
PDF
Model-counting Approaches For Nonlinear Numerical Constraints
PPT
Question 1
PPTX
Flink. Pure Streaming
PDF
Twitter's Real Time Stack - Processing Billions of Events Using Distributed L...
PDF
Graph Stream Processing : spinning fast, large scale, complex analytics
PDF
Gelly-Stream: Single-Pass Graph Streaming Analytics with Apache Flink
CArcMOOC 03.04 - Gate-level design
Model-counting Approaches For Nonlinear Numerical Constraints
Question 1
Flink. Pure Streaming
Twitter's Real Time Stack - Processing Billions of Events Using Distributed L...
Graph Stream Processing : spinning fast, large scale, complex analytics
Gelly-Stream: Single-Pass Graph Streaming Analytics with Apache Flink

Viewers also liked (9)

PDF
Graph Processing with Apache TinkerPop
PDF
Gelly in Apache Flink Bay Area Meetup
PPTX
ETL into Neo4j
PDF
20170126 big data processing
PDF
Introduction to Streaming Analytics
PDF
Converting Relational to Graph Databases
PDF
Netflix Keystone—Cloud scale event processing pipeline
PDF
Introducing Apache Giraph for Large Scale Graph Processing
PDF
Semantic Complex Event Processing
Graph Processing with Apache TinkerPop
Gelly in Apache Flink Bay Area Meetup
ETL into Neo4j
20170126 big data processing
Introduction to Streaming Analytics
Converting Relational to Graph Databases
Netflix Keystone—Cloud scale event processing pipeline
Introducing Apache Giraph for Large Scale Graph Processing
Semantic Complex Event Processing
Ad

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

PDF
Traffic Management system using Deep Learning
PPTX
Accident detection using Deep kearniing.pptx
PPTX
An Ontology-Based Intelligent Speed Adaptation System for Autonomous Cars
PDF
Smart city hackathon
PPTX
Crash course on data streaming (with examples using Apache Flink)
PPTX
An Event Calculus for Event Recognition in Symbolic Artificial Intelligence
PDF
Computer Vision Based Driver Monitoring, Assisting and Grading System for Dri...
PPTX
Ontology Summit - Track D Standards Summary & Provocative Use Cases
PDF
Project_Objectives
PDF
CLIM Program: Remote Sensing Workshop, An Introduction to Systems and Softwar...
PDF
Lane Detection and Object Detection
PDF
IRJET - Traffic Rules Violation Detection System
PPTX
Efficient Traffic Control System Presentation
PDF
On Unified Stream Reasoning
PPTX
TraVis CTTHES3
PDF
Vehicle Tracking Using Kalman Filter and Features
PPTX
TrafficLIGHT management in smart cities
PDF
Deep Learning Based Vehicle Rules Violation Detection and Accident Assistance
PDF
SRS-NET Smart Resource Aware Multi Sensor Network
PPTX
In-situ MapReduce for Log Processing
Traffic Management system using Deep Learning
Accident detection using Deep kearniing.pptx
An Ontology-Based Intelligent Speed Adaptation System for Autonomous Cars
Smart city hackathon
Crash course on data streaming (with examples using Apache Flink)
An Event Calculus for Event Recognition in Symbolic Artificial Intelligence
Computer Vision Based Driver Monitoring, Assisting and Grading System for Dri...
Ontology Summit - Track D Standards Summary & Provocative Use Cases
Project_Objectives
CLIM Program: Remote Sensing Workshop, An Introduction to Systems and Softwar...
Lane Detection and Object Detection
IRJET - Traffic Rules Violation Detection System
Efficient Traffic Control System Presentation
On Unified Stream Reasoning
TraVis CTTHES3
Vehicle Tracking Using Kalman Filter and Features
TrafficLIGHT management in smart cities
Deep Learning Based Vehicle Rules Violation Detection and Accident Assistance
SRS-NET Smart Resource Aware Multi Sensor Network
In-situ MapReduce for Log Processing
Ad

More from Stefan Marr (20)

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

Recently uploaded (20)

PPTX
Modernising the Digital Integration Hub
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Architecture types and enterprise applications.pdf
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Zenith AI: Advanced Artificial Intelligence
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PPTX
The various Industrial Revolutions .pptx
DOCX
search engine optimization ppt fir known well about this
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Modernising the Digital Integration Hub
Benefits of Physical activity for teenagers.pptx
The influence of sentiment analysis in enhancing early warning system model f...
sustainability-14-14877-v2.pddhzftheheeeee
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Architecture types and enterprise applications.pdf
Comparative analysis of machine learning models for fake news detection in so...
Zenith AI: Advanced Artificial Intelligence
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Module 1.ppt Iot fundamentals and Architecture
Chapter 5: Probability Theory and Statistics
Convolutional neural network based encoder-decoder for efficient real-time ob...
The various Industrial Revolutions .pptx
search engine optimization ppt fir known well about this
Taming the Chaos: How to Turn Unstructured Data into Decisions
Credit Without Borders: AI and Financial Inclusion in Bangladesh

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

  • #2: 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
  • #4: 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.
  • #8: State the conclusions, requirements, base to work fromMany to many matchingMany Rules and Many events
  • #9: Declarative rules!Online processing of real-time eventsLoad-balancing (dynamic)Elastic (add more machines)Transparent distribution (single system image)
  • #10: 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
  • #11: 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
  • #13: 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
  • #17: Single machine comparison:PARTE vs. CloudPARTE
  • #18: Goal: chose realistic scenario
  • #19: Starts with static distribution over 2 machines