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.

Open source IoT gateway

2,296 views

Published on

Open source IoT gateway

Published in: Technology
  • Be the first to comment

Open source IoT gateway

  1. 1. Brought to you by Henryk Konsek Open source IoT gateway A tale of Eclipse Kura and Apache Camel
  2. 2. Henryk Konsek - engineer at Red Hat - open source junkie @hekonsek
  3. 3. Open Source IoT gateway (and surroundings) This talk @hekonsek
  4. 4. ● Architecture ● Messaging ● Gateway ● Backend This talk @hekonsek
  5. 5. Architecture @hekonsek
  6. 6. IoT is messaging General concept @hekonsek
  7. 7. End-to-end IoT architecture Architecture @hekonsek
  8. 8. Messaging @hekonsek
  9. 9. THIS part. Messaging @hekonsek
  10. 10. IoT solutions should rely on scalable messaging (aka MaaS). Scalable IoT messaging ● AMQP-centric ● Based on Qpid Dispatch Router ● Artemis used for store & forward ● IoT-scale ready @hekonsek
  11. 11. Non-AMQP protocols are translated to AMQP before hitting backend. Protocol adapters @hekonsek
  12. 12. Kafka for IoT telemetry @hekonsek
  13. 13. We are working together with Bosch (et al.) on Eclipse Hono project. Eclipse Hono @hekonsek
  14. 14. Hono is a narrow subset of our end-to-end IoT architecture. What is Hono? ● Hono follows our IoT architecture ● Provides a narrow subset of operations on the top of our middleware (telemetry and command/control) ● Provides backend implementation of those operations ● Will be based on Qpid dispatch @hekonsek
  15. 15. Gateway @hekonsek
  16. 16. Gateway TL;DR; A proxy between field devices and a data center GATEWAY @hekonsek
  17. 17. OSGi-based IoT gateway for field devices. Eclipse Kura @hekonsek
  18. 18. Kura services OSGi Application Container (Eclipse Equinox, Concierge) Java SE 7 / 8 (OpenJDK) Serial GPIO HID BLE I2C Field protocols Networking Gateway Services Web UI Remote Management Cloud Services Data Services EP Connectivity and Delivery @hekonsek
  19. 19. Eclipse. Donated by Eurotech (http://eurotech.com). Who’s behind Kura? @hekonsek
  20. 20. Red Hat and EuroTech are partners now. Red Hat + EuroTech @hekonsek
  21. 21. Kura + Camel (aka ESF + Fuse) . Running on EuroTech hardware with RHEL. Our first baby! @hekonsek
  22. 22. A message routing framework. What is Apache Camel? @hekonsek
  23. 23. How to orchestrate messages flow. What is message routing? ● Apache Camel ● Spring Integration ● Mule @hekonsek
  24. 24. - read message from JMS queue - transform to JSON - save to FTP and MongoDB Crash course to the Apache Camel from('jms:invoices'). transform { new Invoice(uuid(), it.in.body) }. marshal().json(Jackson). multicast().parallelProcessing(). to('ftp:myftp.com/invoices', 'mongodb:myDb?collection=invoices&operation=save') ] @hekonsek
  25. 25. Camel provides ~200 OSGi-ready connectors (JMS, REST, CoAP, AMQP, MQTT…) How can Kura benefit from Camel? @hekonsek
  26. 26. Enterprise Integration Patterns (EIP) How can Kura benefit from Camel? @hekonsek
  27. 27. Prevents messages overflow. EIP - throttler @hekonsek
  28. 28. Dynamically decide where to route the message. EIP - content based router @hekonsek
  29. 29. Client side load balancing. Useful for field devices connectivity. EIP - load balancer @hekonsek
  30. 30. How can I control which parts of a field device should be running at the given moment? EIP - control bus @hekonsek
  31. 31. Camel OSGi bundle is started from the Kura. Kura + Camel: architecture @hekonsek
  32. 32. Capture images from Raspberry Pi camera and send to backend for analysis. Camel route module for Kura public class MyKuraRouter extends CamelRouter { @Override public void configure() throws Exception { from("webcam:plates"). to("netty4-http:http://app.mydatacenter.com/plates/upload"); } } @hekonsek
  33. 33. Display WiFi networks accessible near the field device using the web browser. More examples public class MyKuraRouter extends KuraRouter { @Override public void configure() throws Exception { from("netty4-http:http://0.0.0.0:18080"). to("bean:org.eclipse.kura.net.NetworkService?method=getAllWifiAccessPoints"); } } @hekonsek
  34. 34. Start syncing cached data only when WiFi is accessible. More more examples public class MyKuraRouter extends KuraRouter { @Override public void configure() throws Exception { from("kura-wifi:wlan0/mySSID"). to("controlbus:route?routeId=onlineSync&action=start"); from("file:///var/sensor/temperature"). routeId("onlineSync").autoStartup(false). to("netty4-http:http://api.mydatacenter.com/showMeWiFi"); } } @hekonsek
  35. 35. Loading XML Camel routes at runtime using web UI. Routes management @hekonsek
  36. 36. Camel is a 1st class citizen in Kura. Camel as a core part of the Kura @hekonsek
  37. 37. Kura - what’s next? ● Drools (BRMS) integration ● More Camel components (BLE, modbus, etc.) ● Integration with external processes (including Docker running on gateway) @hekonsek
  38. 38. Backend @hekonsek
  39. 39. There are many open source components out there. So you can assemble your IoT platform by yourself. What we currently have @hekonsek
  40. 40. We are working with EuroTech on open sourcing their IoT backend platform (aka Eclipse Kapua project). What we wanna have @hekonsek
  41. 41. Everyware Cloud is based on Fuse A-MQ already. And is Kubernetes friendly. Good starting point @hekonsek
  42. 42. Kura + Kapua + Hono + Red Hat open source software. Delivered by Red Hat + EuroTech dream team :) . Our ultimate goal @hekonsek
  43. 43. Thank you! Learn More: @hekonsek www.developers.com/iot Pavilion Booth 321 Ask the IoT experts 11:30- 12:30 daily Presentations, demos, prizes, t-shirts & more HackNight DevNation IoT CodeStarter with Eurotech Tuesday, June 28 6:30-9:30 PM Moscone North, Room 135 http://bit. ly/DevNationEurotech Hands-OnLab Provisioning an Intelligent Gateway for Enterprise IoT Thursday, June 30 10:15-12:15 Room 3018 - Lab III (Summit)

×