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 Sourcing the messaging and IoT

2,201 views

Published on

Session from the IoT Weekend online event (December 15-16) speaking about messaging, IoT and the EnMasse project and its usage in the IoT business even inside the Eclipse Hono project as well.

Published in: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Open Sourcing the messaging and IoT

  1. 1. Open sourcing the IoT A messaging-as-a-service platform for IoT solutions Paolo Patierno Senior Software Engineer @ Red Hat 15/12/2017
  2. 2. 2 Who am I ? @ppatierno ● Senior Software Engineer @ Red Hat ○ Messaging & IoT team ● Lead/Committer @ Eclipse Foundation ○ Hono, Paho and Vert.x projects ● Microsoft MVP Azure/IoT ● Technologies and protocols “globetrotter” ● Hacking low constrained devices in spare time ● Blogger and speaker about distributed systems, messaging, IoT and embedded “world”
  3. 3. 3 Agenda ● Messaging … what ? ● Messaging … for IoT ● Messaging & IoT … in the cloud ● EnMasse : the open source MaaS ! ○ Features ○ Architecture ● Eclipse Hono ● IoT : How to deploy ? ● Demo
  4. 4. 4 ● It’s about messages exchange ○ Internally in distributed systems ○ Externally between systems ● Communication at the application level ● Messages go from sender/producer/publisher to receiver/consumer/subscriber ○ Asynchronously ○ Time decoupling ○ … or directly and synchronously What is messaging?
  5. 5. 5 Messaging patterns C S P S S S msg X msg X msg X P C C C msg X msg Y msg Z Request/Response Publish/Subscribe Competing Consumers msg req msg resp
  6. 6. 6 Quality of Service P C At Most Once At Least Once Exactly Once msg X P C msg Y P C msg Z P C msg X P C msg Y P C msg Y P C msg X P C msg Y P C msg Z
  7. 7. 7 IoT : messaging vengeance ● … maybe in the past … ● … messaging was not so cool for developers ... ● … but today with IoT this is changed because … ● … IoT is all about messaging so … “Messaging vengeance” !
  8. 8. 8 “give me a scalable messaging platform, and I shall move the Internet of Things world” (Archimedes) IoT : messaging as a “lever”
  9. 9. IoT Core Services 9 What makes an IoT platform ? Messaging infrastructure Device Provisioning Business Services Monitoring Real time streaming Machine Learning … Authentication & Authorization Device Registration
  10. 10. 10 IoT : communication patterns Telemetry Inquiries Commands Notifications Cloud
  11. 11. 11 IoT : communication patterns Messaging patterns & protocols ● Telemetry & Notifications are about … ○ …. messaging publish/subscribe ● Commands & Inquiries are about … ○ … messaging request/response ● Different protocols (AMQP, MQTT, HTTP, …) implement them in different way ○ As built-in support … ○ … or on top of it at application level ○ Read more on “Strengths And Weaknesses Of IoT Communication Patterns” * * DZone IoT Guide : https://dzone.com/guides/iot-applications-protocols-and-best-practices
  12. 12. 12 IoT : interoperability Open standards AMQP 1.0 MQTT HTTP CoAP XMPP STOMP
  13. 13. 13 ● Microsoft Azure ○ Service Bus + Event Hub ○ IoT Hub ● Amazon Web Services ○ Simple Queue Service (SQS) ○ AWS IoT ● Google ○ FireBase Cloud Messaging ○ IoT Core ● IBM ○ Message Hub ○ IBM Watson IoT Messaging & IoT in the cloud
  14. 14. 14 ● They are not open source ! ● Freedom of choice ○ On-premise or in the cloud ○ Ability to choose which cloud ○ Open Standards protocols allows users to choose client freely ● Migrating from one to the other can be complex Cloud provider limitations
  15. 15. 15 ● Open source cloud messaging running on Kubernetes and OpenShift ● enmasse.io ● github.com/enmasseproject/enmasse ● @enmasseio EnMasse Messaging-as-a-Service
  16. 16. 16 ● Multiple communication patterns: request/response, publish/subscribe and competing consumers ● Support for “store and forward” and direct messaging mechanisms ● Scale and elasticity of message brokers ● AMQP 1.0 and MQTT support ● Simple setup, management and monitoring ● Multitenancy: manage multiple independent instances ● Deploy “on premise” or in the cloud EnMasse Features
  17. 17. 17 Basic idea Routers and brokers R R R P C B B
  18. 18. 18 Routing vs Brokering Broker Producer Broker Consumer Send message Accepted Send message Accepted
  19. 19. 19 Routing vs Brokering Router Producer Router Consumer Send message Accepted Send message Accepted
  20. 20. 20 EnMasse Architecture Qpid Dispatch Router network ActiveMQ Artemis brokers Admin MQTT gateway MQTT clients AMQP & JMS clients With AMQP SASL plugin
  21. 21. MQTT over AMQP 21 ● MQTT gateway ○ Handles connections with remote MQTT clients ○ Bridges MQTT - AMQP protocols ● MQTT lwt ○ Provides the “will testament” feature ○ In charge to recover & send the “will” if client dies ● It brings MQTT features over AMQP so … ○ … “will testament” works for AMQP clients as well
  22. 22. 22 Eclipse Hono Features ● Uniform APIs for interacting with devices (regardless of protocol) ● Out-of-the-Box Connectivity for Devices supporting MQTT or HTTP ○ Additional protocols by implementing custom Protocol Adapters ● Device-level Authentication ● Tenant based Security Model ● Support for arbitrary messaging infrastructure (AMQP 1.0 based) ● Horizontal Scalability ● End-to-End Flow Control
  23. 23. AMQP 1.0 23 Eclipse Hono Architecture API Endpoints Auth Service Device Registry Protocol Adapters Business Applications Devices AMQP 1.0 AMQP 1.0 HTTP, MQTT end to end flow control
  24. 24. 24 Eclipse Hono IoT API ● Telemetry ○ used by devices to send data downstream ○ leverages on “direct messaging” ● Device Registration ○ used to make Hono aware of devices that will connect to the service ○ register, deregister, get information … ● Event ○ used by devices to send event downstream ○ differ from Telemetry on using “store and forward” (with TTL) ● Command & Control (in Draft) ○ used by applications to send commands to devices ○ command execution can be “just in time” or “deferred”
  25. 25. 25 Eclipse Hono IoT API ● Credentials ○ used by protocol adapters to retrieve credentials used to authenticate devices connecting to the adapter (MQTT, HTTP, …) ○ different types of credentials ■ psk, hashed password, public key, … ● Authentication ○ handle authentication between components (Protocol Adapters, Hono Messaging, …)
  26. 26. 26 IoT : how to deploy ? ● “On premise” … ○ … maybe for a not so big solution ○ … ingesting few data and handling few devices ● “Cloud” … ○ … needs for more scalability ○ … don’t want to manage the infrastructure ● “Hybrid” … ○ … needs for processing at the edge ○ … needs for not making sensible data public
  27. 27. close ← /control/device2 open ← /control/device1 control/device2 Demo : the deployment on OpenShift with Spark Qpid Dispatch Router ActiveMQ Artemis Temperature Analyzer driver device1 temperature control/device1 24 → /temperature /temperature → … 23, 24, 23, … /max ← … 23, 25, … device2 Thermostat application /max → … 23, 25, … /control/<device-id> ← … open, close, … 27 → /temperature
  28. 28. 28 DEMO
  29. 29. Resources 29 ● EnMasse : https://enmasseproject.github.io/ ● Qpid Dispatch Router : http://qpid.apache.org/components/dispatch-router/ ● ActiveMQ Artemis : https://activemq.apache.org/artemis/ ● Eclipse Hono : https://www.eclipse.org/hono/ ● Eclipse Hono (Virtual IoT meetup) : https://youtu.be/VEXuz2bFSrE ● Demo : https://github.com/EnMasseProject/enmasse-workshop ● My blog : https://paolopatierno.wordpress.com/
  30. 30. Thank you ! Questions ? @ppatierno

×