# Communication Protocols of an Industrial Internet of Things Environment: A Comparative Study
## 4 Comparison between IoT Protocols
\begin{table}
\begin{tabular}{c c c c c} \hline
**Feature** & **HTTP** & **CoAP** & **MQTT** & **MODBUS TCP** \\ \hline infrastructure & Ethernet, Wi-Fi & 6 LoWPAN & Ethernet, Wi-Fi & Ethernet, Wi-Fi \\ network layer & IPv4 or IPv6 & IPv6 & IPv6 & IPv4 or IPv6 & IPv4 or IPv6 \\ transport layer & TCP & UDP & TCP & TCP \\ transport port & 80, 443 & 5683 & 1883, 8883 & 502, 802 \\ model & synchronous & asynchronous & asynchronous & synchronous \\ pattern & request—response & both & publish—subscribe & request—response \\ mechanism & one-to-one & one-to-one & one-to-many & one-to-one \\ methodology & document-oriented & document-oriented & message-oriented & byte-oriented \\ paradigm & long polling-based & polling-based & event-based & polling-based \\ quality level & one level & two: CON or NON & three: QoS 0, 1, 2 & one level \\ standard & IETF (RFC230) & IETF (RFC7252) & ISO/IEC, OASIS & modbus.org \\ encoding & ASCII text & RESTful (Binary) & UTF-8 (Binary) & Binary \\ security & SSL, TLS & DTLS & SSL, TLS & TLS \\ \hline \end{tabular}
\end{table} 
Table 2: Comparison of Internet of Things (IoT) protocols. Figure 4: Communication protocols in the IEEE model (**a**); the HTTP (**b**); the CoAP (**c**). There are two common features and two main differences between MQTT and CoAP. Both target constrained devices and networks, and both have low data overhead. Importantly, MQTT is one-to-many and TCP-based message-oriented, whereas CoAP is one-to-one and UDP-based. Since TCP is connection-oriented, and UDP is connectionless, MQTT is more reliable. Moreover, CoAP needs a dedicated communication infrastructure based on IPv6 networks in addition to a dedicated gateway to pass content over the Internet. Hence, CoAP was not used for this IIoT environment. In the same manner, HTTP, which is polling-based, was not considered for this study because of its philosophy that uses the synchronous communication model for peer-to-peer and request-response exchange of data. XMPP is an XML-based messaging protocol that is able to transfer verbose messages, audio and video signals in chat conversations. In addition, it supports request-response as well as an event-based communication pattern. However, the XML-based verbose messages of XMPP increase the message size of SCADA-like applications, which have byte-oriented messages, and hence, cannot be used for IIoT efficiently. As a comparison, MODBUS has small-sized data units, with a maximum of 255 bytes, which are suitable for automation, telecontrol, and monitoring, whereas XMPP messages need more than 400 bytes of overhead. To summarize, many IoT protocols exist, and event-based protocols are of considerable interest for transferring data as notifications to complement the MODBUS TCP. This MODBUS protocol is polling-based, synchronous, request-response, and optimized for control and monitoring in industrial applications. It can establish an IIoT environment, either on a standalone basis or in conjunction with an event-based protocol to cover the publish-subscribe mechanism if needed. MQTT is able to complement the MODBUS TCP via its asynchronous model, event-based paradigm, and publish-subscribe pattern. Alternatively, HTTP uses a request-response mechanism and, hence, was not considered for this study. CoAP was also found to be not suitable for this scenario because it needs a specific infrastructure, and hence, a gateway to pass data over the Internet, which adds more costs and causes complications to the environment. In addition, XMPP was not considered here, because it is XML-based verbose protocol that requires a large overhead for small-sized industrial packets. Moreover, AMQP was eliminated because it is dedicated to the exchange of business messages between two entities. This protocol is used normally for application-to-application integration at the enterprise level, which is higher than the level of both MODBUS TCP and MQTT. Transport Layer Security (TLS) and its predecessor, Secure Sockets Layer (SSL), have been designed to provide security over a TCP/IP network.