Title: A Framework for Distributed Event Composition
1A Framework for Distributed Event Composition
- Middleware03, Rio de Janeiro, Brazil, June 2003
2Motivation I
- Event-based systems provide loosely-coupled
many-to-many communication - This makes it easier to build large scale systems
- But subscribers may be overwhelmed by the vast
number of primitive, low-level events - They need a higher-level view
- Composite events(CEs) represent patterns of
events - Analogous to database triggers
3Motivation II
- To date, event subscribers must do this
themselves - This makes them complex and error prone to
implement - They need to subscribe to all relevant events
- Common patterns can be reused
- CE Detectors can be close to publishers
- Reduces bandwidth consumption, minimizes latency
- Improves reliability
- Distributed detection increases scalability,
efficiency - Independence from publish/subscribe event system
- Supports any pub/sub system
? A generic middleware service for distributed
composite event detection
4Overview
- Motivation
- Background to publish/subscribe systems
- Active Office Scenario
- Introduction to composite events
- Composite Event Detection Framework
- Architecture
- Composite Event Language
- CE Detectors
- Distributed Detection
- Evaluation
- Implementation over JMS
- Results
5Publish/Subscribe Systems
?
publish
notify
?
Pub/Sub System
Event Publisher
Event Subscriber
subscribe
- Event publishers publish events
- Event subscribers subscribe to events using
subscriptions - Pub/sub system notifies subscribers of matching
events - Expressiveness of pub/sub system can be
topic-based, content-based,
6Active Office Scenario
- The Active Office is a ubiquitous computerized
environment. - Sensors monitor activity in the building.
- Users want context-aware notifications.
Location Sensor (Active Bat)
A
Temperature Sensor
T
Whiteboard Sensor
W
Door Sensor
D
Scenario Jean wants a PDA record of the
whiteboard from meetings she attends, sent to her
wireless PDA (but not if she returns to her
workstation afterwards).
7Composite Events
- Composite events are patterns of simpler events
- e.g. Jean is seen in the kitchen, followed by Ken
- Constituent events could be primitive or
composite - Time model
- In distributed systems, a linear time model is
insufficient - Composite events are partially ordered by
interval timestamps - Intervals represent uncertainty or event duration
8Architecture
- Pub/Sub System
- Minimal assumptions
- Composite events disguised as primitive
Distributed Application
sub(CE)
CE Detection
pub
sub
notify
pub
sub
notify
- CE Detection Framework
- Subscribes to primitive events (and simpler
CEs) - Automata detect event patterns, publish composite
events - Automata created dynamically, and managed by CE
framework
Publish/Subscribe System
Network Transport
- Distributed Application
- Submits composite event subscriptions to CE
framework - Can also use underlying pub/sub system directly
9Composite Event Language I
- CE detectors need bounded resource usage
- Automata should be statically analyzable
- Requirements for a CE language
- At least as expressive as other languages
- Easily factorizable, canonical representation
- We use automata which extend FSMs / REs
- Regular expressions are a well understood
construct - Extensions parallelisation, timing,
parameterisation - Cannot consider ALL events
- Higher level, domain-specific languages
10Composite Event Language II
- Atoms
- Describable events are what can beexpressed by
the pub/sub system - E.g. Consider all events in input alphabet A,B,C,
but accept only As
E
Examples
PersonEvent(roomFE01)
A ? A,B,C
11Composite Event Detectors
- CE language expressions compile into detection
automata - The automaton for C1BP is
C
1
B
P
B
P
S0
B
P
B P
12Distributed Detection
- Efficiency is improved by distributing detectors
throughout the network - An overlay network of event brokers supports CE
detectors - Distribution policies dictate detector placement
- Migrating subexpressions near to sources
- Excessive factorisation increases overheads
- Detector replication
13Implementation over JMS
- Each CE type is associated with a JMS topic
- CE expressions can use JMS content-based
filtering - Broker nodes host CE detectors
- An administration topic is used to control
detector instantiations
Scenario Jean wants a PDA record of the
whiteboard from meetings she attends, sent to her
wireless PDA (but not if she returns to her
workstation afterwards).
14Results
2500
Wireless
2000
Wired
1500
Traffic (KB)
1000
500
0
1
6
5
4
3
2
Subscribers
- As the number of subscribers increases, so do the
advantages of the CE framework - Bandwidth is used efficiently, with CE detectors
close to event sources especially wireless
bandwidth - CE notification delay remained low (lt220ms)
15Conclusions
- Generic CE detection is a novel, useful
middleware service - Can be added to existing pub/sub systems
- Extended finite state automata provide a
tractable computational model - Distributed detection increases robustness for
large scale ubiquitous systems - Future work
- Higher level languages for expressing CEs
- CE detection for federating pub/sub frameworks
16Thank You