# A Performance Analysis of Internet of Things Networking Protocols: Evaluating MQTT, CoAP, OPC UA
## 2 Related Work  
Related work has been focused on comparing the performance of CoAP and MQTT in regards to _Round-trip Time (RTT)_[1; 2], focusing on the case of a single client directly connected to a server (CoAP) or a broker (MQTT). For the cases deployed, usually MQTT resulted in a lower RTT than CoAP. CoAP, on the other hand, showed positive results in specific applications. [PERSON] et al. evaluate the performance of MQTT, MQTT-SN, CoAP, and QUIC in terms of task completion time (_time-to-completion_) for scenarios with challenging network conditions, such as varying loss, delay and disruption conditions for a simple scenario of a client obtaining data from one sensor [3]. The purpose is to show the points of disruption of the different protocols. The authors suggest that QUIC may be a good alternative to CoAP and suggest specific improvement in terms of adaptive timer for CoAP, derived from the learning in terms of delay disruption. [PERSON] et al. [4] provide an analysis on the performance evaluation of CoAP, MQTT against the _Named-data Networking (NDN)_ approach. The experiments were carried out in a single-hop topology on the FIT-IoT testbed. The authors conclude that, in a simple and reliable network, NDN provides more robustness and less node resource consumption, while the IP-based messaging protocols result in less overhead and lower time-to-completion.  
Another line of work addresses the performance of lightweight protocols in the context of specific environments, e.g., LTE, machine-to-machine communication over satellites, automation. This is, for instance, the case of [PERSON] et al. who conducted a performance evaluation of CoAP, MQTT, and OPC -UA in an LTE emulated environment, for RTT [5]. On the specific experimental environment, again considering one hop, OPC UA achieved lower RTT. [PERSON] et al. provide a comparison between CoAP and MQTT for satellite-based machine-to-machine communication [6]. The performance evaluation considers time-tocompletion and average aggregated throughput at brokers/servers. Results provided show that the performance of the two protocols, in this specific case, is dependent upon several aspects that need to be engineered. [PERSON] et al. provide a comparison of the performance of DDS, OPC UA, MQTT, and sockets in UNIX/ROS (TCPROS) in the context of automation environments [7], where a client machine is connected via a switch to a server machine. Their purpose is to evaluate RTT simulating automation environment conditions, e.g., idle CPU, overloaded CPU. They measured RTT under these conditions and conclude that for this specific environment DDS and OPC UA attain better results than MQTT or the UNIX/ROS socket approach, in particular, if the message size is small. More recently, [PERSON] et al. compared Protoftub and Flatbuffers approach against CoAP, AMQP, and MQTT [8]. The work has been evaluated in the context of vehicle-to-Cloud communication having as application digital twins.  
Summarising, there is several related literature focusing on the performance of one or several approaches. The experiments are usually focused on specific, relevant scenarios and even domains. Still, the performance evaluation of the different protocols needs to be further pursued, given that there is not a clear direction on a set of protocols that performs (overall) better.  
In comparison to related literature, our work follows the line focused on the performance evaluation of IoT communication protocols, contributing first with an analysis on the different architectural features, and then providing a performance evaluation of two of the most relevant performance indicators for IoT environments, namely latency (time-to-completion) and packet loss, varying several conditions, such as message size and message frequency.