Internet of Things - Interaction Paradigms

Published:

Lesson: 3
Topic: IoT
Author: Ashley Rosilier


Interaction Paradigms

The method in which IoT devices communicate with each other can follow different paradigms. In addition, different parts of the system may use distinct paradigms, each with different capabilities and mechanisms.

  • Client-Server (C-S): simple interaction where client sends a request to a server and expects a non-blocking response
  • Peer-to-Peer (P2P): peers can interact with each other directly
  • Message Passing: sender fowards messages based on a queuing system to the recipient

IoT Network Traffic

There are two types of network traffic in all IoT systems:

  • Telemetry - sending data from sensors to a smart hub for storage and analysis
  • Telecommand - sending commands

Telemetry

For telemtry systems, it is typical to use a publish/subscribe architecture similar to the one pictured in the figure below from [2].

In this diagram, the IoT devices are connected to a central Broker and publish their data to topic. Remote, cloud-based servers can then subscribe to a particular topic and process the data in real time. This allows the data from many sensors to be divided up between a few servers for processing.

One common messaging protocol for this type of telemetry architecture is MQTT (Message Queue Telemetry Transport). MQTT is extremely lightweight which makes it a good fit for resource-constrained IoT devices, and it allows for thousands of devices to be processed by a single server. Some key features of MQTT include:

  • Open, and royalty-free makes it easy to use for a wide variety of devices and platforms
  • Publish/subscribe model facilitates one-to-many messaging and keeps network utilization low
  • Lightweight with small fixed headers and limited reliance on libraries
  • Messages can be designated to be handled in multiple ways
  • Simple set of comman message are easy to use
  • Support for redelivery of messages due to lost connections

An alternative message exchange protocol to MQTT is HTTP, which is the most widely used and available protocol. Unlike MQTT, HTTP uses a request/response model which results in higher network utilization. The message sizes are also larger and the dependence on different libraries can increase the client footprint.

Note that the concept of the central broker is important for telemetry applications. The network must be able to handle a continuous stream of data and dispatch it to the appropriate parties.

Telecommand

In many IoT systems, it is necessary to send control message to devices, such as adjusting the thermostat temperature or opening a door lock. Unlike the telemetry scenario, where the device is sending data to a central hub, in telecommand the message is being sent to the device.

One common telecommand protocol is CoAP (Constrained Application Protocol). CoAP is similar to HTTP protocol but is designed for resource-constrained devies and has a very small header. It also provides flexbility in message delivery like MQTT.

References

[2] R. Minerva, A. Biru and D. Rotondi, “Towards a definition of the Internet of Things (IoT)”, IEEE Internet Initiative, vol. 1, pp. 1-86, 2015. https://iot.ieee.org/definition.html