# A Performance Analysis of Internet of Things Networking Protocols: Evaluating MQTT, CoAP, OPC UA
## 4 Experimental Environment
### Gateway Software  
The installed gateway software considers the following requirements:  
* To be open-source. * To support the most popular protocols, and at least MQTT/AMQP, CoAP, OPC UA. * To be modular and allow for the development of extensions. * To be runnable in constrained devices. Based on these requirements, two different open-source solutions have been analyzed, Open IoT ([[http://www.openiot.eu/](http://www.openiot.eu/)]([http://www.openiot.eu/](http://www.openiot.eu/)) (accessed on 15 May 2021)), and ThingsBoard ([[https://thingsboard.io/](https://thingsboard.io/)]([https://thingsboard.io/](https://thingsboard.io/)) (accessed on 15 May 2021)), as described next. OpenIoT [32] is an open-source Service-as-a-Platform middleware, which supports the communication between heterogeneous sensors and applications via the cloud. Released in 2012 (ICT-2011.1.3, Internet of Connected Objects [[https://github.com/OpenIotOrg](https://github.com/OpenIotOrg)]([https://github.com/OpenIotOrg](https://github.com/OpenIotOrg)) \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Features** & **Contiki** & **RIoT** & **FreeRTOS** & **TinyOS** & **Raspbian** \\ \hline MCU (bits) & 8/16/32 & 8/16/32 & 16/32/64 & 8/16 & 32/64 \\ \hline RAM(KB) & 2 & 1.5 & 1 & 10–40 & 256 \\ \hline ROM(KB) & 60 & 5 & 4 & 15–40 & 16 \\ \hline Network Stack & uIP (IPv4 and IPv6) and RIME & \begin{tabular}{c} 6 LowPAN, \\ GNRC stack, \\ CCN-lite \\ \end{tabular} & FreeRTOS + TCP & \begin{tabular}{c} 6 LowPAN, \\ 6 LowPAN, \\ IPv4/v6 \\ CCN-lite \\ \end{tabular} & \begin{tabular}{c} 6 LowPAN, \\ IPv4/v6 \\ CCN-lite \\ \end{tabular} \\ \hline Energy & No integration, & \begin{tabular}{c} High \\ energy- \\ allows \\ implementation, \\ Scheduler \\ \end{tabular} & \begin{tabular}{c} High \\ energy- \\ efficiency, \\ Scheduler \\ and \\ sleep nodes \\ \end{tabular} & \
\begin{tabular}{c} CPU power \\ management, \\ Power \\ management \\ interfaces, \\ HW/SW \\ transparency \\ \end{tabular} &
\begin{tabular}{c} Scheduler, \\ energy \\ optimization \\ \end{tabular} \\ \hline Real-time OS & No & Yes & Yes & No & No \\ \hline Multi-threading & Yes & Yes & Yes & Yes \\ \hline Year & 2002 & 2012 & 2003 & 2000 & 2012 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Operating Systems Comparison. openiot (accessed on 15 May 2021)), OpenIoT stems from an industry-academia effort aiming at developing a platform for connecting physical and virtual sensors to the Cloud. OpenIoT interoperability is derived from semantic sensor integration. OpenIoT provides two packages: OpenIoT and the OpenIoT-VDK that is a ready-to-use version for academic and training purposes. Its feature integrate:  
* Middleware for sensors and sensor networks,
* Ontologies, semantic models and annotations for representing internet-connected objects, along with semantic open-linked data techniques
* Cloud/Utility computing, including utility-based security and privacy schemes. ThingsBoard is an on-premise and/or cloud platform that helps developers and researchers to test, manage, or interact in IoT environments. It provides a Community edition as well as a Professional edition. Among other aspects, ThingsBoard provides the following functionality:  
* Entities and Relations ability to model world objects (devices and assets) and their relations. * Telemetry API for collection of time-series data. * Creation/Management of custom key-value attributes. * Rule Engine, to do data processing and actions on incoming telemetry and events. * RPC API and widgets to push commands from apps and dashboards to devices and vice versa. * Data visualisation DashBoards. * API limits example: limiting number of requests from a host. * Audit log track of user activity and API calls usage. ThingsBoard (TB) operates in _Standalone_ or in _Cluster_ mode. In Cluster mode, TB nodes can perform automatic discovery of new TB servers (nodes). All TB nodes form a cluster, and all of those TB nodes are identical. On this operation mode there is not a coordinator node, which prevents single points of failure.