Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Smarter internet of things with stream and event processing virtual io_t_meetup_20170920


Published on

Slides for the Virtual IoT meetup:

Published in: Technology
  • good work, do you have any paper for this reserach or its in independent work. If there is a paper please let me know as I would like to cite it.
    Are you sure you want to  Yes  No
    Your message goes here

Smarter internet of things with stream and event processing virtual io_t_meetup_20170920

  1. 1. Smarter Internet of Things with Stream and Event Processing Virtual IoT Meetup September 20, 2017 András Jankó, István Papp, István Ráth IncQuery Labs
  2. 2. TL; DR • IoT / Smart home and stream / event processing 101 • IncQuery Labs Smarthome CEP demonstrator • “CEP on the edge of the smart home” • Educational technology showcase • Eclipse Smarthome / OpenHAB2 - middleware • Drools – control logic • HomeIO – smart home simulator • Open source (EPL v1):
  3. 3. IoT and stream processing Devices Data publishers Service platforms Data consumers Collect AnalyzeStream React Embedded, smart Gateways (Kura, …) MQTT, Kafka, deepstreamHub, ... Low-level protocols Cloud, enterprise, ... Storage, analytics, … OR real-time stream or event processing
  4. 4. (Event) Stream processing vs CEP (Event) Stream processing CEP Data centric: aggregates, trends Event centric: “find the needle in the haystack” Imperative to “SQL-like” languages “SQL-like” to Rule / pattern based languages Priority: speed Priority: expressiveness Constrained data model, simple temporal operators (time windows) Relaxed data model, advanced temporal operators (before, meets, overlaps, includes, starts, coincides) Distributed by design, easy to scale Harder to scale Apache Spark, Apache Storm, Apache Flink, Heron, Kinesis, Sybase ESP, Oracle EP, TIBCO Streambase, … WSO2 Siddhi, Esper, Drools, IBM WS Studio Business Events, … Streaming analytics, monitoring, data fusion… Surveillance, predictive maintenance, Smart manufacturing, …
  5. 5. Eclipse Smarthome and OpenHAB Eclipse SmartHome Communication IO Config Model Gateway OpenHAB Automation Addons Persistence UI
  6. 6. IncQuery Labs Smart home CEP demonstrator Drools Fusion Simulator (HomeIO) OpenHAB2 Dashboard Complex event processing UI Communication Open source (EPL v1):
  7. 7. Motivation • Simulator • Make it easier to develop smart home applications • Architecture allows for hybrid setups (simulator AND physical devices together) • Rule-based programs • Discrete rules, each applying to a subset of the problem  focus on the essence • Simple and flexible – best for often changing logic (e.g. quick prototyping) • Drools Fusion - • ESH / OpenHAB2 support only simple rules by default  Drools Fusion is much more powerful • Fits “relatively well” into the ESH / OSGi world  Retains the benefits of the cloudless smart home architecture • Low latency, Offline operation  Avoid security and privacy concerns • Integrates easily with Java  reuse components, integrate with local & remote services • Pre-filter data on the gateway edge computing
  8. 8. Drools - ESH integration Inference engine Pattern matcher Agenda Execution engine Working memory Rule specifications Input Output Runtime model: • ESH Item registry  save RAM by object reuse • extended event bus Java code
  9. 9. Smart home Hello world with Drools rule "Example Lights Switch" when $item : Item( name == "Example_Light", $state : state) ItemStateChangedEvent( name == "Example_Switch", newState == OPEN) then if ($state == ON) { openhab.postCommand($item, OFF); } else { openhab.postCommand($item, ON); } end ESH Item instance with pattern constraints Event bus info – encodes state changes OpenHAB helper classes
  10. 10. Live Demo
  11. 11. Summary • Demonstrator features • HomeIO - MQTT adapter (with OpenHAB translator) • Extended event bus for ESH • Drools – OSGi integration • Case study sample rules, docs on the wiki • JUnit tests & ESH mock • Build with Maven+Tycho • Plans for the future • Support open source simulators (OpenSHS) and other CEP engines (Esper, BeepBeep3) • Developer tools enhancements (Oomph, Drools debugger, project & code generation with VIATRA) • contributions – if there is interest • + your favorite enhancement – looking for contributors! • Next presentation @ EclipseCon Europe 2017 IoT Day: •