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.

Iot gateway dream team - Eclipse Kura and Apache Camel

1,539 views

Published on

Iot gateway dream team - Eclipse Kura and Apache Camel

Published in: Technology
  • Be the first to comment

Iot gateway dream team - Eclipse Kura and Apache Camel

  1. 1. Brought to you by Henryk Konsek IoT gateway Dream Team Eclipse Kura and Apache Camel
  2. 2. Henryk Konsek @hekonsek - engineer at Red Hat - open source contributor - focused on the IoT - Rhiot project founder
  3. 3. Running Apache Camel in the Eclipse Kura OSGi container. This talk
  4. 4. ● Crash course to the IoT ● Eclipse Kura ● Apache Camel ● Why Camel+Kura? ● How Camel+Kura? ● Demo This talk
  5. 5. Crash course to the IoT
  6. 6. Hardware. Connected. And sensors. The Internet Of Things
  7. 7. In drones? Where is the IoT money?
  8. 8. In hipster startups? Where is the IoT money?
  9. 9. In the Raspberry Pi? Where is the IoT money?
  10. 10. Industry. IoT money
  11. 11. Automotive. IoT money
  12. 12. Assets management. IoT money
  13. 13. Smart cities. IoT money
  14. 14. Military & intelligence. IoT money
  15. 15. IoT = Data Center + Embedded IoT consolidates data center and embedded worlds.
  16. 16. The datacenter systems are located in a data center. Datacenter systems in a nutshell
  17. 17. IoT architecture is a superset of a datacenter architecture. IoT architecture
  18. 18. Synchronous communication, usually via HTTP. Communication in the datacenter systems
  19. 19. The “IoT fun” part! Communication in the IoT systems
  20. 20. Eclipse Kura
  21. 21. OSGi-based IoT gateway for field devices. What is Eclipse Kura?
  22. 22. OSGi-based IoT gateway for the field devices. OSGi ● modularity system for Java ● provides modules classpath separation ● promotes hot runtime redeployments What is Eclipse Kura? OSGi Application Container (Eclipse Equinox, Concierge) Java SE 7 / 8 (OpenJDK)
  23. 23. What is Eclipse Kura? IoT gateway ● collects messages from the edge devices (like sensors) ● performs messages processing/aggregation/forwarding OSGi-based IoT gateway for the field devices. OSGi Application Container (Eclipse Equinox, Concierge) Java SE 7 / 8 (OpenJDK) Networking Gateway Services Web UI Remote Management
  24. 24. What is Eclipse Kura? IoT gateway ● collects messages from the edge devices (like sensors) ● performs messages processing/aggregation/forwarding OSGi-based IoT gateway for the field devices. 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
  25. 25. What is Eclipse Kura? IoT gateway ● collects messages from the edge devices (like sensors) ● performs messages processing/aggregation/forwarding OSGi-based IoT gateway for the field devices. 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
  26. 26. What is Eclipse Kura? OSGi-based IoT gateway for the field devices.
  27. 27. Gateway TL;DR; A proxy between field devices and a data center GATEWAY
  28. 28. Eclipse. Donated by Eurotech (http://eurotech.com). Who’s behind Kura?
  29. 29. Apache Camel
  30. 30. The message routing framework. What is Apache Camel?
  31. 31. How to orchestrate messages flow. What is message routing? ● Apache Camel ● Spring Integration ● Mule
  32. 32. - 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') ]
  33. 33. Why Camel and Kura?
  34. 34. Camel provides ~200 OSGi-ready connectors (JMS, REST, CoAP, AMQP, MQTT…) How can Kura benefit from Camel?
  35. 35. Enterprise Integration Patterns (EIP) How can Kura benefit from Camel?
  36. 36. Prevents messages overflow. EIP - throttler
  37. 37. Provides SLA for the different channels. EIP - throttler
  38. 38. Dynamically decide where to route the message. EIP - content based router
  39. 39. Client side load balancing. Useful for field devices connectivity. EIP - load balancer
  40. 40. How can gateway provide transaction-like behavior when connecting to a non-transactional service? EIP - idempotent consumer
  41. 41. How can I control which parts of the field device should be running at the given moment? EIP - control bus
  42. 42. How Camel and Kura?
  43. 43. Camel OSGi bundle is started from the Kura. Kura + Camel: architecture
  44. 44. Invoke REST method every second. Camel route module for Kura public class MyKuraRouter extends KuraRouter { @Override public void configure() throws Exception { from("timer:trigger"). to("netty4-http:http://app.mydatacenter.com/api"); } }
  45. 45. Just deploy the route as the OSGi bundle and enjoy Camel running the Kura. Concerned about the lifecycle?
  46. 46. Display WiFi networks accessible near the field device using the web browser. Fancy example #1 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"); } }
  47. 47. Start syncing cached data only when WiFi is accessible. Fancy example #2 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://api.mydatacenter.com"); } }
  48. 48. http://rhiot.io Rhiot Kura gateway
  49. 49. - Rhiot Kura+Camel router (EuroTech partnership) - server-side components - on-going R&D and productization efforts Rhiot & Red Hat?
  50. 50. Thank you! Henryk Konsek @hekonsek hekonsek@gmail.com

×