The Importance of Being Direct and Concise in Communication Protocols

Author:
Angelo Corsaro, PhD, CEO/CTO, ZettaScale Technology

Date
03/02/2023

 PDF
We are often fascinated by the eloquence and rhetoric of great speakers. Some can even be hypnotized by their grand orations

Click image to enlarge

Figure 1: Comparative wire-overhead analysis for key protocol messages

­When it comes to communication protocols, it is far more important to focus on conciseness and directness — as anything that is not strictly necessary to convey information is just a waste of time and energy. 

In other terms, if we think in terms of information theory when communicating, then we want to ensure that the level of information, theentropy, is maximized. This requires sending the minimum number of bytes to transfer a given piece of information. In this article, we will introduce the Zenoh protocol and explain how it addresses the key challenges in cloud-to-thing communication, and significantly minimizes energy consumption beyond any existing protocol.

Zenoh Overview

Zenoh is an open-source protocol designed by the ZettaScale team. It is creating a lot of interest within the industry as it is the only stack that provides a unified set of abstractions for managing data in motion and data at rest at Internet scale.

Specifically, Zenoh is a Pub/Sub/Query protocol. It provides location-transparent abstractions for publish/subscribe as well as for geo-distributed queries (data at rest) — as is typically found in Named Data Networking (NDN) protocols. Zenoh can run efficiently and deliver best in class performance on data center-grade hardware and networks, as well as on microcontrollers and low-power networks.

Zenoh’s publish/subscribe primitives provide efficient support for data in movement from the microcontroller to the data center. The support for geo-distributed queries allows for the retrieval of data stored in heterogeneous stores, such as, data-bases, file systems, and cloud storages, across the Internet. Finally, it is worth emphasizing that all Zenoh’s primitives operate on data names and name expressions — in other terms, the location is completely transparent to the user.

Zenoh supports arbitrary communication topologies (as shown in the figure), allowing peer-to-peer communication over arbitrary connectivity graphs, brokered and routed communications.

As represented in the figure, client communication can be mediated by peers as well as by infrastructural nodes, i.e., routers.

Finally, Zenoh adds only 5 bytes of overhead to user data, thus making it by far the most efficient protocol available on the market. This is especially evident when compared to other high-level protocols such as DDS, MQTT, and OPC-UA.

Energy Efficiency

When we think about energy, it is useful to consider its use in two dimensions:  the energy necessary to operate a device, and the energy required for the device to communicate. The past several years have witnessed major improvements on the energy required to operate our devices, as well as some improvements on thephysical layer used by some of these devices to communicate. Some notable examples include both personal and wide-area low-power networks.

As explained above, particular attention has been placed on reducing the energy used by devices. That said, it is worth pointing out that communication is more énergivore (energy-guzzling) than computing. This is a fact I’m sure you experience daily when using your mobile and witness the speed at which browsing the Internet drains your battery.

With the understanding that communication is extremely énergivore, it is worth analyzing what we can do in order to reduce it. Is having an extremely energy efficient physical and data-link layer for our communication stack enough? Unfortunately, the answer is no. Let’s understand why.

The bulk of energy waste comes from protocols that are used above the data-link and, in general, above the transport layer. Protocols such as MQTT, XMPP, HTTP, and DDS are used by applications to communicate. These protocols suffer from varying degrees of verbosity and in many cases the communication model supported leads to several indirections.

Understanding the Problem

Let’s take as an example the protocol MQTT, which has been widely adopted in IoT and device connectivity in general. While this protocol has always been advocated as lightweight, it actually is not as efficient as claimed. First of all, since it does not have any dynamic discovery, it causes data to be sent on the network even if there is no interest in it. Additionally, as you can see in the diagram, its data messages have quite some overhead compared to protocols such as Zenoh. Additionally, this overhead is linearly dependent from the topic name, which makes MQTT traffic hard to predict when naming schemes are not tightly controlled.

Another challenge posed by MQTT is that it only supports the client-to-broker communication model. As a consequence, even if devices that need to exchange data are close to each other and with potential direct network connectivity, the data exchange has to be mediated by the broker. A broker that most of the time is deployed on the cloud. The consequence of this communication model is that the data shared between the two devices isn’t traveling just one hop. Rather, it has to cross a large number of network elements and travel thousands of kilometers because of a limitation on the communication model supported by MQTT.  Clearly, you can see how this creates an immense waste of energy.

Addressing the Problem

Many of the protocols used today were designed 20 years ago or more. The technology landscape, as well as the use cases, have evolved in the meantime., This has left these protocols unprepared to address the full spectrum of needs of modern applications, especially those tied to edge computing and the cloud-to-device continuum.

Zenoh was designed to address the challenges posed by these classes of applications. One of the aspects that was optimized in Zenoh was the energy minimization. This is achieved by ensuring minimal wire overhead.

Click image to enlarge

Figure 2: Zenoh protocol stack.

 

As mentioned above, Zenoh wire-overhead is 5 bytes for data sent sporadically. When there is sufficient data produced to allow for batching, this overhead tends to be ~2 bytes per user data sample. Additionally, Zenoh is capable of working straight on the Data Link (as shown in the image below). This further allows applications to reduce the wire-overhead to the bare minimum.  As a matter of fact, going below the datalink would require hardware based solutions.

The other way in which Zenoh helps minimize energy is by ensuring that applications can exchange data directly, using peer-to-peer communication, whenever the network topology and connectivity make it possible. Additionally, even for those cases when direct network connectivity is not possible, Zenoh allows to keep communication local by leveraging support for meshing.

Finally, to avoid data flowing across the network when nobody is interested in it, Zenoh is equipped with an extremely efficient discovery protocol that ensures that data only leaves the host if there is some interest across the network.

Concluding Remarks

In summary, it is important to understand that communication is extremely énergivore. Reducing the energy consumption by the physical layer of communication networks is not enough, as the established higher-level protocols are not energy-friendly. Zenoh is a novel protocol that was designed to address the needs of edge and cloud-to-microcontroller applications. One of the consequences of its design is that it helps minimize energy consumption.

 

ZettaScale Technology

RELATED

 


-->