Erlang as an alternative to a non-functional language for communication in a faulttolerant IoT sensor network
Abstract: This thesis compares a C++ prototype and an Erlang prototype for an Internet ofThings application. Internet of Things applications are difficult to program becausethey consist of a distributed environment of heterogeneous devices, where each devicecan have limited resources and connectivity technologies. Erlang is a high-leveldistributed functional language, which can help solve these problems, but an Erlangprogram may use more resources than an equivalent C++ program.In this thesis one C++ prototype and one Erlang prototype were developed tohandle the communication between sensors in a Wireless Sensor Network using theZigBee communication technology. These prototypes were evaluated against eachother based on power consumption, memory utilization, CPU utilization and linesof code.The result of the evaluation was unexpected: The Erlang prototype used less memoryand CPU in most cases. Therefore, one process in the C++ prototype wasfurther investigated to see why this was the case and it was found that much of theresources required by the C++ prototype came from using dbus for inter-processcommunication. Without dbus included the C++ prototype would use less resourcescompared to the Erlang prototype.The recommendations that can be derived from the investigation in this thesis arethat Erlang should be used if the point is to use as little memory as possible andthat as long as more than one data packet per second is sent Erlang uses less CPU.Even if the packet rate is less than one per second it can be worth considering theuse of Erlang because the code is significantly shorter. Therefore, an Erlang solutionshould have fewer bugs and fewer security problems.
AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)