SoftwareX (Jul 2022)
Commlib: An easy-to-use communication library for Cyber–Physical Systems
Abstract
Communication and data exchange between objects is a fundamental aspect of Cyber–Physical Systems. Due to the highly distributed nature of the domain, physical and virtual objects rely on the Sense-Think-Act-Communicate model in order to provide remote interfaces for sending and receiving sensor data and actuation commands and for interconnecting processing artifacts with sensing and actuation endpoints. In order to build such interfaces, thing/object specifications must be taken into account in order to write/adapt/use their drivers and ensure appropriate connectivity; this approach is, at least cumbersome and requires hardware engineering expertise. In this paper we present Commlib, a Python library that abstracts low-level protocol-specific properties and specifications and provides a high-level API for creating and managing communication interfaces of distributed nodes over asynchronous message-driven and event-driven communication middleware, such as MQTT, AMQP, Kafka and Redis brokers. Our approach follows the Component-Port-Connector paradigm to model interconnection and intercommunication of distributed nodes via input and output ports from where messages are transferred over open connections between nodes. Commlib is easy-to-use and enables rapid development of Cyber–Physical Systems and applications, allowing users to focus on the envisioned functionality rather than the obvious connectivity/compatibility issues residing in such systems.