<p>Several communication protocols and frameworks are available to exchange data on the Internet of Things (IoT). Although different protocols are relevant in different domains, none offer the best outcomes for different parameters like latency, throughput, and energy consumption across various scenarios. Hence, this paper aims to evaluate two of the most popular protocols for IoT applications, MQTT (Message Queuing Telemetry Transport) and CoAP (Constrained Application Protocol), which are widely used in both consumer and industrial settings for data transmission. However, the choice of the optimal data transmission protocol can vary according to the specific conditions and requirements, a single protocol may not meet the needs and requirements for an IoT system. So, this paper presents a case study showing the preferred or suitable protocol for different IoT applications. Further, for these protocols, the communication model needs to be elaborated using the Finite State Machine (FSM) model. So, in this paper, the FSM model has been developed for CoAP and MQTT. The modeling and analysis bring out simplified communication representation and analysis of protocols. The CoAP and MQTT protocols have been implemented using the Node-RED simulator. To analyze the performance of the protocol, the parameters message per second, with many iterations, throughput, packet success rate, packet loss rate, and latency have been calculated. As the result, the CoAP achieves high throughput and low latency as compared to MQTT in the given scenario. The packet delivery success rate is 100% in both protocols. So, from the results and presented study, it can be concluded that CoAP is well-suited for simple resource-constrained IoT systems where one-to-one interaction is required; however, for one-to-many interactions, MQTT is more suitable. </p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A comparative analysis and implementation of CoAP and MQTT protocol for IoT communication

  • Monika Kashyap,
  • Vidushi Sharma

摘要

Several communication protocols and frameworks are available to exchange data on the Internet of Things (IoT). Although different protocols are relevant in different domains, none offer the best outcomes for different parameters like latency, throughput, and energy consumption across various scenarios. Hence, this paper aims to evaluate two of the most popular protocols for IoT applications, MQTT (Message Queuing Telemetry Transport) and CoAP (Constrained Application Protocol), which are widely used in both consumer and industrial settings for data transmission. However, the choice of the optimal data transmission protocol can vary according to the specific conditions and requirements, a single protocol may not meet the needs and requirements for an IoT system. So, this paper presents a case study showing the preferred or suitable protocol for different IoT applications. Further, for these protocols, the communication model needs to be elaborated using the Finite State Machine (FSM) model. So, in this paper, the FSM model has been developed for CoAP and MQTT. The modeling and analysis bring out simplified communication representation and analysis of protocols. The CoAP and MQTT protocols have been implemented using the Node-RED simulator. To analyze the performance of the protocol, the parameters message per second, with many iterations, throughput, packet success rate, packet loss rate, and latency have been calculated. As the result, the CoAP achieves high throughput and low latency as compared to MQTT in the given scenario. The packet delivery success rate is 100% in both protocols. So, from the results and presented study, it can be concluded that CoAP is well-suited for simple resource-constrained IoT systems where one-to-one interaction is required; however, for one-to-many interactions, MQTT is more suitable.