Google’s recent announcement that it will be retiring its IoT Core Service next year underscores the importance of the Eclipse IoT Working Group’s mission to build and promote the software, standards, and collaboration models needed for an open Internet of Things architecture.
More than ever, the graduated and active Eclipse Ditto project is supporting this mission. Our most recent effort in this direction is our collaboration with the World Wide Web Consortium (W3C) to incorporate the W3C Web of Things (WoT) standard.
To understand where Eclipse Ditto fits into this context, an explanation about what Ditto is and how it works is needed.
Eclipse Ditto: A Cloud-Connected IoT Middleware and Integration Platform
Eclipse Ditto is a framework that helps users build digital twins for both physical devices and virtual things. It takes the role of an IoT middleware that abstracts access to IoT devices via APIs. It also acts as an integration platform for other applications, providing features such as notifications of changes on the persisted state of the twins (Figure 1).
Figure 1: Eclipse Ditto as an IoT Middleware and Integration Platform
The fact that a central piece of Eclipse Ditto runs in the cloud means it solves some common problems of IoT solutions:
- Ditto abstracts interactions with things using APIs. For asynchronous APIs, the Ditto Protocol is defined. This way, each interaction is properly authorized, relying on a policy concept in which subjects are authorized and resources are defined.
- Ditto enables direct communication with connected devices, but also allows for interaction via the persisted state of the twin, which reduces bandwidth usage and latency.
- Ditto uses the persisted twin state to build up a search index, which an IoT solution can leverage to execute queries. What’s unique about Ditto is that those queries can combine both static metadata and dynamic sensor data to enable the efficient management of a whole fleet of things.
- Ditto can create connections to external message brokers and applications via API, and ensures that those connections are always maintained, even in failure/failover scenarios.
- Ditto harmonizes the payloads of all integrated devices to a common JSON structure, which allows for significant freedom to define domain-specific data. In a brownfield approach for existing devices, Ditto may even perform a configurable scripting-based transformation of payloads containing arbitrary data.
Ditto Only Requires Kubernetes and a MongoDB Instance
Eclipse Ditto relies on the following standards and de-facto market standards:
- Container runtime (e.g., Kubernetes)
- MongoDB as database
- Connectivity capabilities to various protocols (all of which are optional):
- AMQP 0.9.1
- AMQP 1.0
- Apache Kafka 2.x
- HTTP 1.1 (invoking external webhooks)
- MQTT 3.1.1
- MQTT 5
Consequently, Ditto only requires a Kubernetes and a MongoDB provider, or a self-managed provider. Devices can also be connected with a variety of connectivity protocols. For example, the Eclipse Hono project can be used as a device communication layer, abstracting on various IoT protocols. Or, devices connected to a MQTT broker can be integrated. These communication protocols are either standards or de-facto standards and are supported by most public cloud offerings.
W3C WoT Provides Standard-Based Method to Build IoT Solutions
The most recent addition to Eclipse Ditto is the W3C Web of Things (WoT) integration. WoT defines a standard for describing the capabilities of things and how to interact with them over the web, using existing, standardized web technologies, like JSON-LD, HTTP, or JsonSchema.
The integration of WoT into Eclipse Ditto provides users with a standard-based way to build truly interoperable IoT solutions. This is because WoT does not define a new protocol or payload that devices must adhere to, but describes via a Thing Description (TD) the existing capabilities and data formats of devices as things.
This description also includes thing-specific means to (Figure 2):
- Retrieve or modify properties
- Invoke actions
- Define which events a device may emit
Figure 2: WoT’s Interaction Abstraction
Source: Web of Things Documentation
New devices that are already aware of their WoT representation can provide their own specific Thing Description. An additional approach is to provide specific Thing Descriptions via an intermediary, which acts as a proxy for devices.
Eclipse Ditto Acts as Proxy for Devices
This intermediary role is where Eclipse Ditto can really shine. As a framework for providing APIs for twins, its interpretation of the digital twin approach already uses this proxy-for-devices pattern and can also provide Thing Descriptions for managed things.
The current Thing Description standard in v1.1 is in its finalization stage and includes the missing piece Ditto requires to provide this intermediary approach.
Version 1.1 introduces the concept of Thing Models (TMs) that can describe aspects or even complete device types on a model level, declaring which properties they contain, which actions can be invoked, and which events are emitted by concrete devices implementing a TM. These can be seen as a template for Thing Definitions, which inherently lack concrete security instructions for how to authenticate, as well the forms that provide concrete API endpoints to invoke for a single instance.
When creating new twins in Eclipse Ditto, they may link to a WoT Thing Model in their definition. That will create a skeleton JSON according to the properties which are defined in the model. The integration also enables Ditto to generate and provide the TDs via an HTTP request for each managed twin instance.
A consumer relying on the WoT Thing Description standard can then interact with the thing via Ditto’s HTTP API in the described way. In this way, Ditto and WoT together enable a highly interoperable IoT architecture.
Check out our documentation to find out more about the WoT integration and examples.
Ditto Needs Feedback to Continue Advancing
Like all Eclipse projects, we rely on continued involvement and engagement to improve our offerings. If your company is using Eclipse Ditto, consider adding your name to our list of known adopters: this is a helpful way for us to gauge the success of our project.
And if you’re considering getting involved, check out our documentation. You can also:
- Join the chat
- Start a discussion
- Ask us a question
- Create an issue for found bugs and feature requests
Join Us at Hacker Day
See Eclipse IoT projects like Eclipse Ditto being coded live at EclipseCon’s Hacker Day on October 27. Visit the Hackerspace to see the Eclipse IoT Working Group Architecture Project, SmartCLIDE Hackathon, and more.