Slides for our talk at EclipseCon Europe 2015. More details at https://www.eclipsecon.org/europe2015/session/iot-supercharged-complex-event-processing-mqtt-eclipse-technologies
IoT Supercharged: Complex event processing for MQTT with Eclipse technologies
1. IoT Supercharged:
Complex event processing for
MQTT with Eclipse technologies
István Ráth (Budapest University of Technology and Economics)
Ákos Horváth (IncQuery Labs)
2. IoT challenges
Sensors
Smart home
Personal
devices
• Challenges
• Produce a coherent view of the system
• Detect and react quickly
• Scale with system complexity
• Lots of data
• Many different sources
• Many different original formats
3. States and events
Window is
open
Window is
closed
window_close
window_open
State
Event
State-based logic:
switch (state) {
case (window_open):
if (room_temp<12) alarm();
}
Event-based logic:
on (window_open) {
if (room_temp<12) alarm();
}
How do I …?
when (“window was opened at least 10
minutes ago”
&& “room cools down to 12”) {
alarm();
}
4. Complex event processing
Event
1
Event
2
Event
n
Event
3
Time window: > 10 mins
Room_temp is below 12
AND
it was higher before
AND
window was opened >10 mins ago
AND
wasn’t closed since
Room_temp = 15
Window_open =
true
Room_temp = 11Door_closed = true
Event stream
5. Complex event processing
Event
1
Event
2
Event
n
Event
3
Room_temp = 15
Window_open =
true
Room_temp = 11
Time window: > 10 mins
Room_temp is below 12
AND
it was higher before
AND
window was opened >10 mins ago
AND
wasn’t closed since
Door_closed = true
MATCH
• Traditional application domains:
• Online log analysis
• Intrusion / fraud detection
• Algorithmic trading, …
• Tools
• Microsoft, Oracle, SAP, …
• Drools Fusion (ASL 2)
• Esper (GPL v2)
• And now: VIATRA-CEP (EPL)!
6. OSGi
VIATRA-CEP overview
Runtime
Design
time
VIATRA-CEP
(VEPL)
EMF-
IncQuery
(IQPL)
Arduino, RasPI etc.
MQTT
Runtime EMF
model
VIATRA-CEP
runtime
Dashboard
• Xtext-based DSLs powered by XBase
• Easy to integrate with Java or Xtend
• Reuse your existing Java code
• Structured system state representation
• Serialization in human readable format
• Use Modeling tools in new ways:
Debugging and Visualization
• See our other talk on Sirius “live
diagrams” Thu 11.15 Silchersaal
https://goo.gl/SmvMv8
• EMF-IncQuery: scalable incremental EMF
queries
• VIATRA: live model transformations based
on IncQuery and Xtend