Next Article in Journal
An Agent-Based Model to Simulate the Spread of a Virus Based on Social Behavior and Containment Measures
Previous Article in Journal
Design and Implementation of a Physical Bitcoin Coin
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Decentralized P2P Broker for M2M and IoT Applications †

by
Iván Froiz-Míguez
1,2,
Paula Fraga-Lamas
1,2,* and
Tiago M. Fernández-Caramés
1,2,*
1
Department of Computer Engineering, Faculty of Computer Science, Universidade da Coruña, 15071 A Coruña, Spain
2
CITIC Research Center, Universidade da Coruña, 15071 A Coruña, Spain
*
Authors to whom correspondence should be addressed.
Presented at the 3rd XoveTIC Conference, A Coruña, Spain, 8–9 October 2020
Proceedings 2020, 54(1), 24; https://doi.org/10.3390/proceedings2020054024
Published: 20 August 2020
(This article belongs to the Proceedings of 3rd XoveTIC Conference)

Abstract

:
The recent increase in the number of connected IoT devices, as well as the heterogeneity of the environments where they are deployed, has derived into the growth of the complexity of Machine-to-Machine (M2M) communication protocols and technologies. In addition, the hardware used by IoT devices has become more powerful and efficient. Such enhancements have made it possible to implement novel decentralized computing architectures like the ones based on edge computing, which offload part of the central server processing by using multiple distributed low-power nodes. In order to ease the deployment and synchronization of decentralized edge computing nodes, this paper describes an M2M distributed protocol based on Peer-to-Peer (P2P) communications that can be executed on low-power ARM devices. In addition, this paper proposes to make use of brokerless communications by using a distributed publication/subscription protocol. Thanks to the fact that information is stored in a distributed way among the nodes of the swarm and since each node can implement a specific access control system, the proposed system is able to make use of write access mechanisms and encryption for the stored data so that the rest of the nodes cannot access sensitive information. In order to test the feasibility of the proposed approach, a comparison with an Message-Queuing Telemetry Transport (MQTT) based architecture is performed in terms of latency, network consumption and performance.

1. Introduction

The growing number of Internet of Things (IoT) devices generates a massive amount of data that has derived into the adoption of different communications paradigms that go beyond traditional client-server schemes. One of such paradigms is edge computing [1], which is based on the distribution of the computing load among different IoT nodes, thus moving part of the processing from the cloud to the edge of the network and then providing lower latency, improved response times and better bandwidth availability. In addition, recent advances on hardware enable creating more powerful and less power-hungry devices. Thus, the latest IoT devices can handle more complex tasks than simple data storage and device-to-device communications.
The mentioned evolution fosters the development of new distributed computing strategies like the one described in this paper. The proposed strategy is completely distributed, in contrast to traditional edge computing approaches, which provide a hybrid environment with distributed computing and a central server (i.e., a cloud). Not delegating information to a central server has become increasingly important, as it is a single point of failure and a potential source of data leaks. Therefore, the proposed solution makes use of a fully distributed Machine-to-Machine (M2M) communications protocol whose performance is compared with Message Queuing Telemetry Transport (MQTT) [2], which is currently one of the most popular M2M protocols.

2. Design and Implementation

Figure 1 shows the proposed communications architecture. In such an architecture a private swarm is a set of peers that belong to the IoT system. Each peer is a device that manages the communications distributed among the different sensor nodes. Every peer provides persistent storage for the data gathered from its edge computing-based network. The communication between a user and the edge computing-based network is carried out within the same Local Area Network (LAN) through a REST API.
The devices make use of Inter-Planetary File System (IPFS) [3] to implement a decentralized file system that provides better performance than HTTP when managing large amounts of data. Moreover, the devices use a experimental publication/subscription protocol called PubSub for M2M communications.
For implementing the proposed architecture, a Raspberry Pi was used as a node. It runs a go-ipfs instance with the PubSub function enabled. For persistent storage, OrbitDB (a distributed database that runs on top of IPFS) is used through a port in golang that offers better performance than the original javascript version [4]. In addition, it is possible to communicate with the system via an HTTP REST API to perform actions and get the obtained results.
As edge device, a Raspberry Pi Zero (RPi Zero) was used to receive measurements from different sensors via BLE or WiFi. Thus, the RPi Zero is in charge of the distributed storage and of the M2M communications with other edge devices.

3. Experiments

To determine the performance of the system in terms of latency and throughput, different tests were carried out. The obtained results were compared with the ones provided by an MQTT broker that run in a cloud (an Eclipse Mosquitto broker was deployed in a cloud while a client node (RPi Zero) published messages). In a similar way, an IPFS node hosted in the same cloud acted as a topic subscriber while the client node sent messages. The tests simulated the publication of 10 messages from 10 different clients. The obtained latencies are shown in Table 1.
In addition, the throughput of OrbitDB was measured by making insertions in an EventLog and then measuring response times. Table 2 shows the obtained results.

4. Conclusions

The proposed decentralized brokerless system offers a good trade-off between performance, security, and reliability. Although MQTT provides a low latency (maintly beacause PubSub was not designed by having M2M communications in mind), its centralized architecture is prone to security issues that can be easily tackled by the proposed system.

References

  1. Shi, W.; Cao, J.; Zhang, Q.; Li, Y.; Xu, L. Edge Computing: Vision and Challenges. IEEE Internet Things J. 2016, 3, 637–646. [Google Scholar] [CrossRef]
  2. Naik, N. Choice of effective messaging protocols for IoT systems: MQTT, CoAP, AMQP and HTTP. In Proceedings of the 2017 IEEE International Systems Engineering Symposium (ISSE), Vienna, Austria, 11–13 October 2017. [Google Scholar]
  3. Benet, J. IPFS—Content Addressed, Versioned, P2P File System. IPFS White-Paper. arXiv 2014, arXiv:1407.3561. [Google Scholar]
  4. Froiz-Míguez, I.; Fraga-Lamas, P.; Varela-Barbeito, J.; Fernández-Caramés, T.M. LoRaWAN and Blockchain based Safety and HealthMonitoring System for Industry 4.0 Operators. Proceedings 2019, 42, 77. [Google Scholar]
Figure 1. Communications architecture of the proposed system.
Figure 1. Communications architecture of the proposed system.
Proceedings 54 00024 g001
Table 1. Latency comparison between MQTT (left) and IPFS PubSub (right).
Table 1. Latency comparison between MQTT (left) and IPFS PubSub (right).
MeasureLatency (ms)MeasureLatency (ms)
Minimum publish time41.101Minimum publish time320.8
Maximum publish time69.067Maximum publish time375.539
Mean publish time52.379Mean publish time340.272
Standard deviation5.649Standard deviation6.173
Table 2. Performance of an EventLog of OrbitDB.
Table 2. Performance of an EventLog of OrbitDB.
Number of InsertionsLatency (s)Throughput (queries/s)
507.5586.615
10012.7777.826
50072.826.866
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Froiz-Míguez, I.; Fraga-Lamas, P.; Fernández-Caramés, T.M. Decentralized P2P Broker for M2M and IoT Applications. Proceedings 2020, 54, 24. https://doi.org/10.3390/proceedings2020054024

AMA Style

Froiz-Míguez I, Fraga-Lamas P, Fernández-Caramés TM. Decentralized P2P Broker for M2M and IoT Applications. Proceedings. 2020; 54(1):24. https://doi.org/10.3390/proceedings2020054024

Chicago/Turabian Style

Froiz-Míguez, Iván, Paula Fraga-Lamas, and Tiago M. Fernández-Caramés. 2020. "Decentralized P2P Broker for M2M and IoT Applications" Proceedings 54, no. 1: 24. https://doi.org/10.3390/proceedings2020054024

APA Style

Froiz-Míguez, I., Fraga-Lamas, P., & Fernández-Caramés, T. M. (2020). Decentralized P2P Broker for M2M and IoT Applications. Proceedings, 54(1), 24. https://doi.org/10.3390/proceedings2020054024

Article Metrics

Back to TopTop