Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Open sourcing the IoT

692 vues

Publié le

Session from the IoT Day Italy (Naples, November 24th) speaking about messaging, IoT and the EnMasse project and its usage in the IoT business even inside the Eclipse Hono project as well.

Publié dans : Logiciels
  • Soyez le premier à commenter

Open sourcing the IoT

  1. 1. Open sourcing the IoT A messaging-as-a-service platform for IoT solutions Paolo Patierno Senior Software Engineer @ Red Hat @ppatierno Naples, November 24th 2017
  2. 2. Who am I ? ● 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” @ppatierno
  3. 3. Agenda From messaging to IoT EnMasse : a messaging-as-a-service platform Eclipse Hono : API and connectivity for IoT Deploying IoT Demo
  4. 4. What is messaging? ● 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
  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. 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. 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. IoT : messaging as a “lever” “give me a scalable messaging platform, and I shall move the Internet of Things world” (Archimedes)
  9. 9. What makes an IoT platform ? IoT Core Services Messaging infrastructure Device Provisioning Business Services Monitoring Real time streaming Machine Learning … Authentication & Authorization Device Registration
  10. 10. IoT : communication patterns Telemetry Inquiries Commands Notifications Cloud
  11. 11. IoT : communication patterns ● 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. IoT : interoperability AMQP 1.0 MQTT HTTP CoAP XMPP STOMP
  13. 13. Messaging & IoT in the cloud ● 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
  14. 14. Cloud provider limitations ● 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
  15. 15. EnMasse : messaging-as-a-service ● Open source cloud messaging running on Kubernetes and OpenShift ● enmasse.io ● github.com/enmasseproject/enmasse ● @enmasseio
  16. 16. EnMasse : features ● 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
  17. 17. Basic idea : routers & brokers R R R P C B B
  18. 18. Routing vs Brokering : broker Producer Broker Consumer Send message Accepted Send message Accepted
  19. 19. Routing vs Brokering : router Producer Router Consumer Send message Accepted Send message Accepted
  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 ● 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. 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. Eclipse Hono : architecture AMQP 1.0 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. 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. 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. 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. Demo : the deployment on OpenShift close ← /control/device2 open ← /control/device1 control/device2 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. Resources ● EnMasse : http://enmasse.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/ppatierno/iot-day-italy ● My blog : https://paolopatierno.wordpress.com/
  29. 29. Thanks ! Questions ?

×