DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Data
  4. Eclipse Hono: ''Connect. Command. Control.'' Even on OpenShift!

Eclipse Hono: ''Connect. Command. Control.'' Even on OpenShift!

This overview of the Eclipse Hono project details how it fits into a layered IoT solution and handles connectivity and communication between devices and the backend.

Paolo Patierno user avatar by
Paolo Patierno
·
Feb. 20, 17 · News
Like (2)
Save
Tweet
Share
7.73K Views

Join the DZone community and get the full member experience.

Join For Free

The Eclipse Foundation is the main open source community that has a great focus on the Internet of Things world. The related Eclipse IoT ecosystem involves a lot of different projects and partners like Red Hat, Bosch, Eurotech, IBM, and many more. Recently, publishing this white paper, they showed a full stack with all the available tools for building a complete IoT solution from devices to the cloud through the gateways.

selection_005

In relation to the cloud side, one of the main problems in the IoT world is the ability to handle millions of connections from devices (and gateways) in the field, their registration for managing authentication and authorisation and, last but not least, the ingestion of the data received from them like telemetry or events. Finally, the last point is related to controlling these devices, sending them commands in order to execute actions in the environment around them or upgrading their software and configuration.

The Eclipse Hono project is the answer to these problems!

From the official web site, we can read:

Eclipse Hono provides remote service interfaces for connecting large numbers of IoT devices to a back end and interacting with them in a uniform way regardless of the device communication protocol.

The mantra from the landing page of the web site project is “Connect. Command. Control” which is made a reality through a well-defined API for:

  • Registration for handling requests related to registration (creation) of a new device so that it can be authorized to connect. It’s also possible to retrieve information about registered devices or delete them.
  • Telemetry for the ingestion of a large volume of data from devices (i.e sensors) available for analysis to backend applications.
  • Event for receiving specific events (i.e. alarms, notifications, etc.) from devices for making decisions on the cloud side. This API is quite similar to a telemetry path, but it uses a “different” channel in order to avoid such events going through the overwhelmed telemetry portion.
  • Command and control for sending commands to the devices (from a backend application) for executing operations and actions in the field (receiving the related response) and/or upgrading local software and configuration.

All the above APIs are accessible through the AMQP 1.0 protocol (the only standardized AMQP version!) and it means that they are defined in terms of addresses on which devices need to connect for interacting with the system and the properties/content of the messages; of course, that's true not only for devices but even for business and backend applications, which can receive data from devices or send them commands. In any case, it doesn’t mean that devices that aren’t able to speak the protocol can’t connect. They can leverage the protocol adapters provided by Hono; the current implementation provides an MQTT and HTTP REST adapter.

All these APIs are though in order to allow multi-tenancy so that, using a single deployment, it’s possible to handle channels for different tenants so that each of them can’t see data or exchanged messages from the others.

The Architecture

The main components that build the Eclipse Hono architecture are:

  1. Protocol adapters: These components adapt a device protocol to the first-class citizen used in Hono, AMQP 1.0. Today, MQTT and HTTP REST adapters are provided out of box, but thanks to the available interfaces, users can develop a new adapter even for some custom protocols.
  2. Hono server: This is the main component to which devices can connect directly through AMQP 1.0 or through the protocol adapters. It’s in charge of exposing the APIs in terms of endpoints and handling the authentication and authorization of devices.
  3. Qpid dispatch router: This is an AMQP 1.0 router, part of the Apache Qpid project, which provides the underlying infrastructure for handling millions of connections from devices in the field. The simpler deployment can use only one router, but in order to guarantee reliability and high volume ingestion, a router network should be used.
  4. ActiveMQ Artemis: This is the broker mainly used for handling the command and control API — for storing commands that have to be delivered to devices.

While the devices connect directly to the Hono Server (or through protocol adapters), the backend applications connect to the Qpid Dispatch Router, leveraging direct addressing for receiving telemetry data (if no application is online, no devices are able to send data) or sending commands (the queues in the broker are reachable through the router).

selection_004

All the artifacts from the project are provided as Docker images for each of the above components that can be run using Docker Compose (Docker Swarm support will be available soon) or using a more focused cloud platform like OpenShift (compatible with Kubernetes deployments as well).

selection_006

Regarding the OpenShift deployment, the building process of the Hono project provides a bunch of YAML files that describe the objects to deploy, like deployment configurations, services, persistent volumes, and related claims. All you need is an accessible OpenShift platform instance for you to deploy those objects. That's how Eclipse Hono runs in a full-featured cloud environment with all the related scaling capabilities.

hono_openshift

The example deployment is based on four pods, one for each of the main components. There is the router pod, the Hono Server pod, and one pod for each protocol adapter; of course if you need the command and control path, the broker pod needs to be deployed.

In order to try it, an OpenShift Origin instance can be used on a local PC for deploying the entire Hono solution; for example, the above picture is related to my tests where you can see all the pods running on OpenShift (left side) with simulated devices that interact with MQTT and HTTP REST (on the right side).

Conclusion

In my mind every IoT solution should be made of three different layers (a little bit different from the Eclipse vision): the devices/gateways, the connectivity layer, and the service layer.

While the Eclipse Kura project fits into the gateway layer and Eclipse Kapua tackles the service layer, Eclipse Hono is the glue between them in order to handle the connections from devices and making their data available to backend services (and vice versa in the opposite direction for command and control). Thanks to API standardization and the usage of a standard protocol like AMQP 1.0, Hono can be used for connecting any kind of device with any kind of service; of course, leveraging these three projects has the big advantage of having big companies working on them, mainly Red Hat, Bosch, and Eurotech.

Finally, the solution is always the same …. open source and collaboration!

Eclipse Command (computing) OpenShift IoT Command and control Protocol (object-oriented programming) Open source application Data (computing) Web Service Web Protocols

Published at DZone with permission of Paolo Patierno, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 10 Most Popular Frameworks for Building RESTful APIs
  • Introduction to Containerization
  • Implementing PEG in Java
  • Demystifying the Infrastructure as Code Landscape

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: