Functional Programming for the Internet of Things: A Comparative Study of Implementation of a LoRa-MQTT Gateway Written in Elixir and C++

Networks for the Internet of Things typically use a gateway to provide connectivity between a low bit rate, low capability sensor network and the broader Internet. The gateway can be subject to very high traffic loads, many concurrent processes and needs to be highly reliable. Functional programming languages such as Erlang and Elixir have proven to be an effective programming paradigm for such scenarios, notably in large-scale telecommunications switches. In this paper, we report on our experience of developing a gateway between a LoRa network and an MQTT broker using the functional programming language Elixir and the more conventional language C++. To obtain an understanding of this approach to development, we first developed an initial prototype on a single-board computer using Elixir. We then developed the same system in C++ and ran experiments to compare the two systems’ performance. In order to understand the performance of such systems on low-end IoT devices, we then developed the same system on a low-cost ESP32 micro-controller in both C++ and Elixir. We were able to run the Elixir-based system on an ESP32 micro-controller but found that its performance was significantly poorer than the same system written in C++. We conclude that functional programming has great potential for the development of IoT systems, but work needs to be carried out to improve the supporting libraries and underlying virtual machines. We also note that learning to program in a functional programming language has quite a steep learning curve.

Authors

Institutions

Publication Details

Journal
Electronics
Published
2024-08-29
DOI
https://doi.org/10.3390/electronics13173427
Citations
8
Primary Topic
IoT Networks and Protocols
Type
article
Field-Weighted Citation Impact
1.67
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Functional Programming for the Internet of Things: A Comparative Study of Implementation of a LoRa-MQTT Gateway Written in Elixir and C++

Philip Branch, Phillip Weinstock
8 citations
Electronics
IoT Networks and Protocols
1.67
article

Functional Programming for the Internet of Things: A Comparative Study of Implementation of a LoRa-MQTT Gateway Written in Elixir and C++

Philip Branch, Phillip Weinstock
article en
8 citations

Abstract

Networks for the Internet of Things typically use a gateway to provide connectivity between a low bit rate, low capability sensor network and the broader Internet. The gateway can be subject to very high traffic loads, many concurrent processes and needs to be highly reliable. Functional programming languages such as Erlang and Elixir have proven to be an effective programming paradigm for such scenarios, notably in large-scale telecommunications switches. In this paper, we report on our experience of developing a gateway between a LoRa network and an MQTT broker using the functional programming language Elixir and the more conventional language C++. To obtain an understanding of this approach to development, we first developed an initial prototype on a single-board computer using Elixir. We then developed the same system in C++ and ran experiments to compare the two systems’ performance. In order to understand the performance of such systems on low-end IoT devices, we then developed the same system on a low-cost ESP32 micro-controller in both C++ and Elixir. We were able to run the Elixir-based system on an ESP32 micro-controller but found that its performance was significantly poorer than the same system written in C++. We conclude that functional programming has great potential for the development of IoT systems, but work needs to be carried out to improve the supporting libraries and underlying virtual machines. We also note that learning to program in a functional programming language has quite a steep learning curve.

ElectronicsVol. 13(17)
Swinburne University of Technology (AU)
Openalex Percentile: Top 16%
IoT Networks and Protocols
1.67
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Functional Programming for the Internet of Things: A Comparative Study of Implementation of a LoRa-MQTT Gateway Written in Elixir and C++ — Philip Branch, Phillip Weinstock · Electronics (2024) | TGRS Research Map | TGRS