Hyperledger Fabric and MQTT

Published:

Lesson: 16
Topic: Applications
Author: Aura Teasley


The Internet of Things (IoT) often gains praise for the communication of small programmable devices. However, we begin to encroach on natural boundaries of the devices of our time. More security, more efficient and less latency are impressive features that smaller devices have difficulty achieving compared to their larger counterparts. Present solutions ferry data away from edge devices to edge gateways by wireless communication. Furthermore, data is channeled to a cloud platform in an effort to offload computational work onto services with more resources. This solution allowed for the edge devices to readily collect information of interest and propagate it upward to the cloud, enabling a distributed network of devices. As consequence, the cost of maintaining this network structure increases as time elapses attributed to the method of wireless communication. In addition, recent attacks on cloud platforms begin to challenge how secure this network solution is. Our lab proposes a solution to security risks for energy efficient IoT platforms by integrating hyperledger fabric and MQTT. This approach addresses the limits of small devices while installing a layer of security and considering cost.

Implementation

We designed a feedback controller using data collected from a DHT11 sensor to control an actuator and visual indicators in real time. Data is collected on the Arduino and is published to an MQTT broker to distribute to clients. Existing on Hyperledger Fabric is such a client, acting as the chaincode. The chaincode, also known for hosting business logic, receives the incoming data and based on considerable changes in temperature and humidity will elicit a non zero response back to the MQTT broker to change the current setting of the actuator and indicators.

Results

Challenging security of this network was a test of hyperledger fabric’s native qualities. Identity certificates are distributed to all validate members of the network and are stored in a local file system. Any tests to append to the ledger or query from the ledger from another machine would yield unsuccessful. Furthermore, if identities are compromised, the ledger stores the compromised identity in a database to reference as a no longer valid user of the network. MQTT was the chosen method of communication for our network. The transportation protocol was develop with resource constraints in mind, thus rendering the data overhead minimal and highly efficient. Lastly, we assessed latency by quantifying the rate of transaction per second. An automated script that repetitiously invoked hyperledger fabric was run for 1000 iterations and the final time was recorded to also be 1000 seconds. Considerations must be made for the rate the mqtt broker published a new value, which was every second. This suggests that hyperledger is capable to receiving transactions at a faster rate.

References

[19] A. Viswanathan, “Analysis of Power Consumption of the MQTT Protocol,” University of Pittsburgh School of Information Sciences, 2017, pp. 1-80 http://d-scholarship.pitt.edu/32399/1/Analysis%20of%20Power%20Consumption%20of%20the%20MQTT%20Protocol%20-%20Abhishek%20Viswanathan.pdf.