iot supercharged: complex event processing for mqtt with eclipse technologies

10
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)

Upload: istvan-rath

Post on 12-Apr-2017

1.003 views

Category:

Software


2 download

TRANSCRIPT

Page 1: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

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)

Page 2: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

IoT challenges

SensorsSmart home

Personaldevices

• 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

Page 3: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

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();}

Page 4: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

Complex event processing

Event 1

Event 2

Event n

Event 3

Time window: > 10 mins

Room_temp is below 12AND

it was higher beforeAND

window was opened >10 mins ago AND

wasn’t closed since

Room_temp = 15

Window_open = true

Room_temp = 11

Door_closed = true

Event stream

Page 5: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

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 12AND

it was higher beforeAND

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)!

Page 6: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

OSGi

VIATRA-CEP overview

Runtime

Designtime

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 Silchersaalhttps://goo.gl/SmvMv8

• EMF-IncQuery: scalable incremental EMF queries

• VIATRA: live model transformations based on IncQuery and Xtend

Page 7: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

Let’s see some code (live demo)

Page 8: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

Real-world applicationsIncQuery-Jnect Demo @ ECE 2013

Model train demo 2014-2015

TeqBox: automated game tracking system for TeqBallhttp://teqball.com http://y2u.be/I6XwXy65KPE

Page 9: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

ConclusionPointers• http://eclipse.org/viatra• https://wiki.eclipse.org/VIATRA/CEP • https://

github.com/IncQueryLabs/viatra-cep-mqttAcknowledgements• István Dávid (University of Antwerp)• András Vörös, Bálint Hegyi, László Balogh

(BUTE)• István Papp, Ákos Menyhért, Zoltán Selmeczi,

Zsolt Mázló (IncQuery Labs)Thank you for your attention!

Page 10: IoT Supercharged: Complex event processing for MQTT with Eclipse technologies

Don’t forget to evaluate!