學術產出-Theses

Article View/Open

Publication Export

Google ScholarTM

政大圖書館

Citation Infomation

題名 MQTT端點到端點間的訊息確保送達機制
An End-to-End Exactly-Once Message Delivery Extension for MQTT
作者 廖宇凡
Liao, Yu-Fan
貢獻者 廖峻鋒
Liao, Chun-Feng
廖宇凡
Liao, Yu-Fan
關鍵詞 物聯網
MQTT
服務品質
Internet of Things
MQTT
QoS
日期 2022
上傳時間 2-Sep-2022 15:05:06 (UTC+8)
摘要 近年來物聯網相關技術快速發展,硬體成本不斷的降低,大量感測器(Sensors)與致動器(Actautors)在生活中被使用,這些感測器能將環境中的相關資訊透過較輕量的傳輸協定發送到擁有足夠運算能力的主機,再藉由主機中的邏輯去推動制動器做相應的動作或是通知使用者關切的訊息。其中, MQTT(Message Queuing Telemetry Transport)協定是目前被廣泛使用的物聯網通訊協定。目前 MQTT 雖然能提供 QoS (Quality of Service) 依照使用情境動態調整訊息傳送品質以增進效能。其中, QoS-1雖可確保訊息送達,然而訊息可能重覆傳送,而QoS-2 能做到保證訊息送達恰好一次。但QoS-2的保證送達語意容易造成開發人員誤解,因為其保證送達僅限於端點與Broker之間的傳輸,但開發人員通常預期為端點至端點的傳輸,有鑑於此,本研究提出QoS-2的改進機制,在與MQTT5.0 規格相容的前提下,設計端點到端點的確保送達機制,並讓發送端與接收端能夠以自身需求配置參數,達到更有效率的溝通,並實作一個合規的MQTT Broker 來驗證正確性,最後也將透過一系列的效能實驗檢驗此設計所產生的效能影響。
With the reduction of hardware production costs in recent years, the influence of IoT and related technologies is expanding rapidly. In an IoT-enabled smart environment, a considerable amount of sensors and actuators are utilized in everyday lives. The sensors take advantage of specialized protocols, which transport information to edge servers. The edge server then performs corresponding actions or notifies the user through messages based on the received data. Among the specialized transportation protocols, MQTT (Message Queuing Telemetry Transport) is one of the most widely utilized protocols. MQTT provides Quality of Service (QoS), which dynamically adjusts the quality of the message to enhance performance. QoS-1 ensures that message is delivered at least once at the cost of duplicating messages. As QoS-2 guarantees, the message is received only once by the recipient. However, the promise of QoS-2 can be misleading to developers; since the assurance is limited to the scope of node-broker, not node-broker-node (end-to-end). Based on this observation, this thesis aims to investigate enhancement strategies to realize end-to-end guarantee delivery; with the compatibility of MQTT 5.0. The proposed design is flexible in that both the receiver and sender can customize the transportation quality based on their needs in a non-invasive way and is compatible with other MQTT clients at the same time. A prototype of the enhanced MQTT broker is implemented to verify the functions of the proposed enhancement. Finally, a series of experiments are conducted to investigate the performance of the design.
參考文獻 [1] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, "Internet of Things (IoT): A vision, architectural elements, and future directions," ArXiv, vol. abs/1207.0203, 2013.
[2] M. B. Yassein and M. Q. Shatnawi, "Application layer protocols for the Internet of Things: A survey," in 2016 International Conference on Engineering & MIS (ICEMIS), 2016: IEEE, pp. 1-4.
[3] R. J. Cohn, R. Coppen, A. Banks, and R. Gupta, "MQTT version 3.1," ed, 2014.
[4] Z. Shelby, K. Hartke, and C. Bormann, "The constrained application protocol (CoAP)," 2070-1721, 2014.
[5] S. Vinoski, "Advanced message queuing protocol," IEEE Internet Computing, vol. 10, no. 6, pp. 87-89, 2006.
[6] G. Pardo-Castellote, "Omg data-distribution service: Architectural overview," in 23rd International Conference on Distributed Computing Systems Workshops, 2003. Proceedings., 2003: IEEE, pp. 200-206.
[7] D. Thangavel, X. Ma, A. Valera, H.-X. Tan, and C. K.-Y. Tan, "Performance evaluation of MQTT and CoAP via a common middleware," in 2014 IEEE ninth international conference on intelligent sensors, sensor networks and information processing (ISSNIP), 2014: IEEE, pp. 1-6.
[8] J. E. Luzuriaga, M. Perez, P. Boronat, J. C. Cano, C. Calafate, and P. Manzoni, "A comparative evaluation of AMQP and MQTT protocols over unstable and mobile networks," in 2015 12th Annual IEEE Consumer Communications and Networking Conference (CCNC), 2015: IEEE, pp. 931-936.
[9] C. Zhou and X. Zhang, "Toward the Internet of Things application and management: A practical approach," in Proceeding of IEEE International Symposium on a World of Wireless, Mobile and Multimedia Networks 2014, 2014: IEEE, pp. 1-6.
[10] O. Standard, "MQTT Version 5.0," Retrieved June, vol. 22, p. 2020, 2019.
[11] R. K. Kodali and K. S. Mahesh, "A low cost implementation of MQTT using ESP8266," in 2016 2nd International Conference on Contemporary Computing and Informatics (IC3I), 2016: IEEE, pp. 404-408.
[12] R. K. Kodali, "An implementation of MQTT using CC3200," in 2016 International Conference on Control, Instrumentation, Communication and Computational Technologies (ICCICCT), 2016: IEEE, pp. 582-587.
[13] W. Pipatsakulroj, V. Visoottiviseth, and R. Takano, "muMQ: A lightweight and scalable MQTT broker," in 2017 IEEE International Symposium on Local and Metropolitan Area Networks (LANMAN), 2017: IEEE, pp. 1-6.
[14] M. Singh, M. Rajan, V. Shivraj, and P. Balamuralidhar, "Secure mqtt for internet of things (iot)," in 2015 fifth international conference on communication systems and network technologies, 2015: IEEE, pp. 746-751.
[15] P. Bellavista and A. Zanni, "Towards better scalability for IoT-cloud interactions via combined exploitation of MQTT and CoAP," in 2016 IEEE 2nd International Forum on Research and Technologies for Society and Industry Leveraging a better tomorrow (RTSI), 2016: IEEE, pp. 1-6.
[16] H.-C. Jo and H.-W. Jin, "Adaptive periodic communication over MQTT for large-scale cyber-physical systems," in 2015 IEEE 3rd International Conference on Cyber-Physical Systems, Networks, and Applications, 2015: IEEE, pp. 66-69.
[17] R. Banno, J. Sun, M. Fujita, S. Takeuchi, and K. Shudo, "Dissemination of edge-heavy data on heterogeneous MQTT brokers," in 2017 IEEE 6th International Conference on Cloud Networking (CloudNet), 2017: IEEE, pp. 1-7.
[18] X. Wu and N. Li, "Improvements of MQTT Retain Message Storage Mechanism," in 2018 2nd IEEE Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC), 2018: IEEE, pp. 957-961.
[19] N. Tantitharanukul, K. Osathanunkul, K. Hantrakul, P. Pramokchon, and P. Khoenkaw, "MQTT-topics management system for sharing of open data," in 2017 International Conference on Digital Arts, Media and Technology (ICDAMT), 2017: IEEE, pp. 62-65.
[20] M. Iglesias-Urkia, A. Orive, M. Barcelo, A. Moran, J. Bilbao, and A. Urbieta, "Towards a lightweight protocol for Industry 4.0: An implementation based benchmark," in 2017 IEEE International Workshop of Electronics, Control, Measurement, Signals and their Application to Mechatronics (ECMSM), 2017: IEEE, pp. 1-6.
[21] R. Bryce, T. Shaw, and G. Srivastava, "Mqtt-g: A publish/subscribe protocol with geolocation," in 2018 41st international conference on telecommunications and signal processing (TSP), 2018: IEEE, pp. 1-4.
[22] D. Happ and A. Wolisz, "Limitations of the Pub/Sub pattern for cloud based IoT and their implications," in 2016 Cloudification of the Internet of Things (CIoT), 2016: IEEE, pp. 1-6.
[23] R. Giambona, A. E. Redondi, and M. Cesana, "MQTT+ Enhanced Syntax and Broker Functionalities for Data Filtering, Processing and Aggregation," in Proceedings of the 14th ACM International Symposium on QoS and Security for Wireless and Mobile Networks, 2018, pp. 77-84.
[24] C.-F. Liao and P.-Y. Chen, "ROSA: Resource-Oriented service management schemes for web of things in a smart home," Sensors, vol. 17, no. 10, p. 2159, 2017.
描述 碩士
國立政治大學
資訊科學系
107753014
資料來源 http://thesis.lib.nccu.edu.tw/record/#G0107753014
資料類型 thesis
dc.contributor.advisor 廖峻鋒zh_TW
dc.contributor.advisor Liao, Chun-Fengen_US
dc.contributor.author (Authors) 廖宇凡zh_TW
dc.contributor.author (Authors) Liao, Yu-Fanen_US
dc.creator (作者) 廖宇凡zh_TW
dc.creator (作者) Liao, Yu-Fanen_US
dc.date (日期) 2022en_US
dc.date.accessioned 2-Sep-2022 15:05:06 (UTC+8)-
dc.date.available 2-Sep-2022 15:05:06 (UTC+8)-
dc.date.issued (上傳時間) 2-Sep-2022 15:05:06 (UTC+8)-
dc.identifier (Other Identifiers) G0107753014en_US
dc.identifier.uri (URI) http://nccur.lib.nccu.edu.tw/handle/140.119/141639-
dc.description (描述) 碩士zh_TW
dc.description (描述) 國立政治大學zh_TW
dc.description (描述) 資訊科學系zh_TW
dc.description (描述) 107753014zh_TW
dc.description.abstract (摘要) 近年來物聯網相關技術快速發展,硬體成本不斷的降低,大量感測器(Sensors)與致動器(Actautors)在生活中被使用,這些感測器能將環境中的相關資訊透過較輕量的傳輸協定發送到擁有足夠運算能力的主機,再藉由主機中的邏輯去推動制動器做相應的動作或是通知使用者關切的訊息。其中, MQTT(Message Queuing Telemetry Transport)協定是目前被廣泛使用的物聯網通訊協定。目前 MQTT 雖然能提供 QoS (Quality of Service) 依照使用情境動態調整訊息傳送品質以增進效能。其中, QoS-1雖可確保訊息送達,然而訊息可能重覆傳送,而QoS-2 能做到保證訊息送達恰好一次。但QoS-2的保證送達語意容易造成開發人員誤解,因為其保證送達僅限於端點與Broker之間的傳輸,但開發人員通常預期為端點至端點的傳輸,有鑑於此,本研究提出QoS-2的改進機制,在與MQTT5.0 規格相容的前提下,設計端點到端點的確保送達機制,並讓發送端與接收端能夠以自身需求配置參數,達到更有效率的溝通,並實作一個合規的MQTT Broker 來驗證正確性,最後也將透過一系列的效能實驗檢驗此設計所產生的效能影響。zh_TW
dc.description.abstract (摘要) With the reduction of hardware production costs in recent years, the influence of IoT and related technologies is expanding rapidly. In an IoT-enabled smart environment, a considerable amount of sensors and actuators are utilized in everyday lives. The sensors take advantage of specialized protocols, which transport information to edge servers. The edge server then performs corresponding actions or notifies the user through messages based on the received data. Among the specialized transportation protocols, MQTT (Message Queuing Telemetry Transport) is one of the most widely utilized protocols. MQTT provides Quality of Service (QoS), which dynamically adjusts the quality of the message to enhance performance. QoS-1 ensures that message is delivered at least once at the cost of duplicating messages. As QoS-2 guarantees, the message is received only once by the recipient. However, the promise of QoS-2 can be misleading to developers; since the assurance is limited to the scope of node-broker, not node-broker-node (end-to-end). Based on this observation, this thesis aims to investigate enhancement strategies to realize end-to-end guarantee delivery; with the compatibility of MQTT 5.0. The proposed design is flexible in that both the receiver and sender can customize the transportation quality based on their needs in a non-invasive way and is compatible with other MQTT clients at the same time. A prototype of the enhanced MQTT broker is implemented to verify the functions of the proposed enhancement. Finally, a series of experiments are conducted to investigate the performance of the design.en_US
dc.description.tableofcontents 目錄 IV
圖目錄 V
表目錄 VI
第 1 章 緒論 1
1.1 研究背景 1
1.2 研究動機 2
1.3 研究目標 4
第 2 章 技術背景與相關研究 5
2.1 技術背景 5
2.1.1 MQTT協定 5
2.1.2 MQTT訊息傳遞機制 5
2.1.3 MQTT封包及規格介紹 6
2.1.4 QoS(服務品質等級) 7
2.1.5 主題過濾 8
2.1.6 遺囑機制 8
2.2 相關研究 9
2.3 相關規格 11
第 3 章 系統設計 12
3.1 正規表示式 12
3.2 設計考量 14
3.2.1 請求回應 14
3.3 機制的基本流程 15
3.4 OUTBOX 16
3.5 回執機制 20
3.5.1 Request Response Information 21
3.5.2 correlationData 22
3.6 端點斷線後重新連線時的機制 22
第 4 章 系統實作 23
4.1 AEDES BROKER 解析 23
4.2 設計考量 28
4.3 OUTBOX架構 29
4.3.1 SubOutbox 30
4.3.2 PubOutbox 31
4.4 回執機制 32
4.5 斷線重新連線方式 33
4.6 端點實作 33
第 5 章 系統評估 35
5.1 端點到端點間確保送達機制 35
5.1.1 CPU load實驗 35
5.1.2 封包交通量 36
5.1.3 記憶體 37
5.2 訊息接收完整度 38
5.3 研究限制 38
第 6 章 結論 39
參考文獻 40
zh_TW
dc.format.extent 3741569 bytes-
dc.format.mimetype application/pdf-
dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0107753014en_US
dc.subject (關鍵詞) 物聯網zh_TW
dc.subject (關鍵詞) MQTTzh_TW
dc.subject (關鍵詞) 服務品質zh_TW
dc.subject (關鍵詞) Internet of Thingsen_US
dc.subject (關鍵詞) MQTTen_US
dc.subject (關鍵詞) QoSen_US
dc.title (題名) MQTT端點到端點間的訊息確保送達機制zh_TW
dc.title (題名) An End-to-End Exactly-Once Message Delivery Extension for MQTTen_US
dc.type (資料類型) thesisen_US
dc.relation.reference (參考文獻) [1] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, "Internet of Things (IoT): A vision, architectural elements, and future directions," ArXiv, vol. abs/1207.0203, 2013.
[2] M. B. Yassein and M. Q. Shatnawi, "Application layer protocols for the Internet of Things: A survey," in 2016 International Conference on Engineering & MIS (ICEMIS), 2016: IEEE, pp. 1-4.
[3] R. J. Cohn, R. Coppen, A. Banks, and R. Gupta, "MQTT version 3.1," ed, 2014.
[4] Z. Shelby, K. Hartke, and C. Bormann, "The constrained application protocol (CoAP)," 2070-1721, 2014.
[5] S. Vinoski, "Advanced message queuing protocol," IEEE Internet Computing, vol. 10, no. 6, pp. 87-89, 2006.
[6] G. Pardo-Castellote, "Omg data-distribution service: Architectural overview," in 23rd International Conference on Distributed Computing Systems Workshops, 2003. Proceedings., 2003: IEEE, pp. 200-206.
[7] D. Thangavel, X. Ma, A. Valera, H.-X. Tan, and C. K.-Y. Tan, "Performance evaluation of MQTT and CoAP via a common middleware," in 2014 IEEE ninth international conference on intelligent sensors, sensor networks and information processing (ISSNIP), 2014: IEEE, pp. 1-6.
[8] J. E. Luzuriaga, M. Perez, P. Boronat, J. C. Cano, C. Calafate, and P. Manzoni, "A comparative evaluation of AMQP and MQTT protocols over unstable and mobile networks," in 2015 12th Annual IEEE Consumer Communications and Networking Conference (CCNC), 2015: IEEE, pp. 931-936.
[9] C. Zhou and X. Zhang, "Toward the Internet of Things application and management: A practical approach," in Proceeding of IEEE International Symposium on a World of Wireless, Mobile and Multimedia Networks 2014, 2014: IEEE, pp. 1-6.
[10] O. Standard, "MQTT Version 5.0," Retrieved June, vol. 22, p. 2020, 2019.
[11] R. K. Kodali and K. S. Mahesh, "A low cost implementation of MQTT using ESP8266," in 2016 2nd International Conference on Contemporary Computing and Informatics (IC3I), 2016: IEEE, pp. 404-408.
[12] R. K. Kodali, "An implementation of MQTT using CC3200," in 2016 International Conference on Control, Instrumentation, Communication and Computational Technologies (ICCICCT), 2016: IEEE, pp. 582-587.
[13] W. Pipatsakulroj, V. Visoottiviseth, and R. Takano, "muMQ: A lightweight and scalable MQTT broker," in 2017 IEEE International Symposium on Local and Metropolitan Area Networks (LANMAN), 2017: IEEE, pp. 1-6.
[14] M. Singh, M. Rajan, V. Shivraj, and P. Balamuralidhar, "Secure mqtt for internet of things (iot)," in 2015 fifth international conference on communication systems and network technologies, 2015: IEEE, pp. 746-751.
[15] P. Bellavista and A. Zanni, "Towards better scalability for IoT-cloud interactions via combined exploitation of MQTT and CoAP," in 2016 IEEE 2nd International Forum on Research and Technologies for Society and Industry Leveraging a better tomorrow (RTSI), 2016: IEEE, pp. 1-6.
[16] H.-C. Jo and H.-W. Jin, "Adaptive periodic communication over MQTT for large-scale cyber-physical systems," in 2015 IEEE 3rd International Conference on Cyber-Physical Systems, Networks, and Applications, 2015: IEEE, pp. 66-69.
[17] R. Banno, J. Sun, M. Fujita, S. Takeuchi, and K. Shudo, "Dissemination of edge-heavy data on heterogeneous MQTT brokers," in 2017 IEEE 6th International Conference on Cloud Networking (CloudNet), 2017: IEEE, pp. 1-7.
[18] X. Wu and N. Li, "Improvements of MQTT Retain Message Storage Mechanism," in 2018 2nd IEEE Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC), 2018: IEEE, pp. 957-961.
[19] N. Tantitharanukul, K. Osathanunkul, K. Hantrakul, P. Pramokchon, and P. Khoenkaw, "MQTT-topics management system for sharing of open data," in 2017 International Conference on Digital Arts, Media and Technology (ICDAMT), 2017: IEEE, pp. 62-65.
[20] M. Iglesias-Urkia, A. Orive, M. Barcelo, A. Moran, J. Bilbao, and A. Urbieta, "Towards a lightweight protocol for Industry 4.0: An implementation based benchmark," in 2017 IEEE International Workshop of Electronics, Control, Measurement, Signals and their Application to Mechatronics (ECMSM), 2017: IEEE, pp. 1-6.
[21] R. Bryce, T. Shaw, and G. Srivastava, "Mqtt-g: A publish/subscribe protocol with geolocation," in 2018 41st international conference on telecommunications and signal processing (TSP), 2018: IEEE, pp. 1-4.
[22] D. Happ and A. Wolisz, "Limitations of the Pub/Sub pattern for cloud based IoT and their implications," in 2016 Cloudification of the Internet of Things (CIoT), 2016: IEEE, pp. 1-6.
[23] R. Giambona, A. E. Redondi, and M. Cesana, "MQTT+ Enhanced Syntax and Broker Functionalities for Data Filtering, Processing and Aggregation," in Proceedings of the 14th ACM International Symposium on QoS and Security for Wireless and Mobile Networks, 2018, pp. 77-84.
[24] C.-F. Liao and P.-Y. Chen, "ROSA: Resource-Oriented service management schemes for web of things in a smart home," Sensors, vol. 17, no. 10, p. 2159, 2017.
zh_TW
dc.identifier.doi (DOI) 10.6814/NCCU202201378en_US