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.

Eclipse Hono: Connect. Command. Control.

2,270 views

Published on

This is the slide deck for the Eclipse Foundation Virtual IoT meetup hosted on October 11st (https://www.meetup.com/Virtual-IoT/events/242190258/). It's about the Eclipse Hono project (https://www.eclipse.org/hono/)

Published in: Software
  • Be the first to comment

Eclipse Hono: Connect. Command. Control.

  1. 1. Eclipse Hono. Connect. Command. Control. Connect and control your IoT devices Kai Hudalla, Chief Software Architect @ Bosch Software Innovations Paolo Patierno, Senior Software Engineer @ Red Hat 11/10/2017
  2. 2. 2 Who are we ? @ppatierno ● Senior Software Engineer @ Red Hat ○ Messaging & IoT team ● Lead/Committer @ Eclipse Foundation ○ Hono, Paho and Vert.x projects ● Microsoft MVP Azure/IoT ● Blogger and speaker about distributed systems, messaging, IoT and embedded “world” ● Chief Software Architect @ Bosch SI ○ IoT Hub Team ● Lead/Committer @ Eclipse Foundation ○ Hono, Californium, Leshan projects
  3. 3. 3 Agenda ● The Internet of Things ○ The ecosystem ○ moving from closed to open source ● Please welcome to … Eclipse Hono ○ What is this ? ○ Goals & features ○ Architecture ○ Demo time ! ○ Digging into the APIs ● How & where to deploy ?
  4. 4. IoT Core Services 4 What makes an IoT platform ? Messaging Infrastructure DeviceProvisioning Business Services Monitoring Real time streaming Machine Learning …Authentication& Authorization Device Registration Device Connectivity SW Provisioning
  5. 5. 5 IoT Communication Patterns Telemetry Inquiries Commands Notifications Cloud
  6. 6. 6 Things Cloud Command & Control Telemetry optimized for throughput scale-out with #messages optimized for reliability scale-out with #devices
  7. 7. 7 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
  8. 8. 8 IoT : Interoperability Open standards AMQP 1.0 MQTT HTTP CoAP XMPP STOMP Here are some of the 14 ...
  9. 9. 9 ● Microsoft Azure ○ IoT Hub ● Amazon Web Services ○ AWS IoT ● Google ○ IoT Core ● IBM ○ Watson IoT IoT in the Cloud Existing Offerings
  10. 10. 10 ● 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
  11. 11. 11 ● An Eclipse Foundation IoT project ... ○ Bosch and Red Hat as main contributors ● https://www.eclipse.org/hono/ Eclipse Hono Connect. Command. Control.
  12. 12. 12 ● Open source IoT connectivity platform running on … ○ Kubernetes ○ OpenShift ○ Docker Swarm ● On-premise & in the cloud ● Provided as a set of Docker images Eclipse Hono Connect. Command. Control.
  13. 13. 13 ● Interact with devices regardless of communication protocol ● Support large number of devices (106 ) ● Don't trade in throughput for reliability ● Support arbitrary device protocols (MQTT, HTTP, CoAP, AMQP 1.0, etc) ● Integrate with existing infrastructure Eclipse Hono Goals
  14. 14. 14 ● 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 Eclipse Hono Features
  15. 15. 15 Eclipse Hono Building Blocks & Scope API Endpoints & Security Protocol Adapters Business Applications Devices AMQP 1.0 Hono AMQP messaging network end to end flow control AMQP 1.0 AMQP 1.0 HTTP MQTT etc.
  16. 16. 16 Eclipse Hono Components and APIs Auth Server Authentication Protocol Adapter Device Registration Telemetry Event Telemetry Event Credentials Devices Business Applications ActiveMQ Artemis Broker Telemetry Event Authentication Hono Messaging Qpid Dispatch Router Device Registry
  17. 17. 24 → /telemetry/tenand_id 17 DEMO Qpid Dispatch Router Artemis MQTT, HTTP clients 24 → /telemetry Hono Components Consumer application
  18. 18. 18 Eclipse Hono APIs ● Telemetry & Event ● Device Registration ● Credentials ● Authentication ● Command & Control (not available in 0.5 release)
  19. 19. 19 Eclipse Hono Telemetry & Event ● used by devices to send data/events downstream ● leverages on “direct messaging” … ○ Telemetry ○ Devices can send data only if consumers are online ○ No broker involved ● … “store and forward” ○ Event ○ Broker for storing event with a “ttl” eventually ● consumers receive data published by devices belonging to a particular tenant
  20. 20. 20 Routing Telemetry Data Producer Router Consumer Send message Accepted Send message Accepted
  21. 21. 21 Brokering Events Producer Broker Consumer Send message Accepted Send message Accepted
  22. 22. ● EnMasse … ○ a messaging-as-a-service platform ○ elastic scaling ○ multiple communication patterns ○ … and more and more … ○ more info : enmasse.io AMQP 1.0 22 Scaling out the messaging network Connect. Command. Control Protocol Adapters Business Applications Devices AMQP 1.0 AMQP 1.0 HTTP, MQTT, AMQP 1.0 end to end flow control API Endpoints & Security
  23. 23. 23 Eclipse Hono Device Registration ● used to make Hono aware of devices that can/will connect to the service ● solutions/consumers may use the API to get information about devices ● operations ○ assert status (mandatory) ○ register, deregister, get information (optional) ● where a system managing device identities is already in place ○ …implement this API as a facade to the existing system
  24. 24. 24 Eclipse Hono Registration Assertion Flow MQTT Adapter Hono Messaging Device Registration 1. publish telemetry 2. assert (tenant-id, device-id) 6. forward message 5. create message (incl. token) 7. validate token 8. forward message Device 4. Json Web Token Assertions are cached by the adapter per device connection 3. check if device is registered and enabled
  25. 25. 25 Eclipse Hono Credentials ● supports the process of authenticating devices ● 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, … ● operations ○ get (mandatory) ○ add, update, remove (optional) ● where a system for doing this is already in place … ○ implement this API as a facade to the existing system
  26. 26. 26 Eclipse Hono Device Authentication Flow MQTT Adapter Credentials 1. CONNECT (username/password) 2. get (tenant-id, auth-id, mech) 3. verify credentials 4. ACCEPT Device ⇐ hashed password Verification of credentials is always responsibility of Protocol Adapter
  27. 27. 27 Eclipse Hono Authentication ● handle authentication between components (Protocol Adapters, Hono Messaging, …) ● used by clients/components for getting a token asserting … ○ subject’s identity ○ granted authorities ● services use the token to make authorization decisions on a client’s request to read or write from/to a resource or to invoke a certain operation ○ i.e. Hono Messaging checks if an Adapter may write telemetry data ● Where an identity management system is already in place (e.g. Keycloak) … ○ implement this API as a facade to the existing system
  28. 28. 28 Eclipse Hono Command & Control ● used by applications to send commands to devices ● command execution can be “just in time” or “deferred” ○ just in time : command already executed, the response from device contains the result ○ deferred : command not executed yet, the response from device specifies it’s accepted; for long running operations the result will be provided later DRAFT
  29. 29. 29 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
  30. 30. 30 Azure Container Service ● A containers hosting solution ● Scale and orchestrate using … ○ Kubernetes ○ Docker Swarm ○ DC/OS ● Deploying a cluster using Azure CLI / portal ○ Resource group with VMs, load balancer, ... ● Managing directly your preferred “orchestrator” ○ ACS provides you “only” the infrastructure
  31. 31. 31 Azure & OpenShift ● OpenShift Origin ○ the upstream open source project ● OpenShift Container Platform ○ the Red Hat productized version ○ enterprise grade container platform +
  32. 32. 32 Amazon EC2 ● Spinning up virtual machines … ○ for making a cluster ● Providing … ○ Docker and … ○ … Kubernetes or OpenShift … ○ … or just Docker using Swarm mode +
  33. 33. Resources 33 ● Eclipse Hono : https://www.eclipse.org/hono/ ● Eclipse IoT : https://iot.eclipse.org/ ● Qpid Dispatch Router : http://qpid.apache.org/components/dispatch-router/ ● ActiveMQ Artemis : https://activemq.apache.org/artemis/ ● EnMasse : http://enmasse.io/ ● Azure Container Service : https://azure.microsoft.com/en-us/services/container-service/ ● OpenShift on Azure : http://aka.ms/openshift
  34. 34. Thank you ! Questions ?

×