An Adaptive Multi-Protocol IoT Gateway for Resilient Edge-Cloud Communication: An ns-3-Based Evaluation

Authors

  • Ali H. BenHusein Computer Department, Tripoli College of Electronic Technology, Tripoli - Libya Author
  • Mohamed M. Buker Computer Department, Tripoli College of Electronic Technology, Tripoli - Libya Author

DOI:

https://doi.org/10.65405/bp3qh004

Keywords:

Internet of Things, Adaptive Gateway, MQTT, CoAP, Edge Computing, Network Resilience, ns-3.

Abstract

In the last years, the Internet of Things (IoT) has become a key part of today’s digital infrastructure. From industrial automation to smart home devices, IoT systems connect physical sensors to cloud analytics and change how we interact with our environment. As these systems become larger and more complex, there is a growing need for communication methods that can manage unpredictable network errors, hardware limits, and frequent failures. Right now, MQTT and CoAP are the main protocols for IoT-to-cloud communication. But most systems use a fixed protocol, which makes it hard to adapt when problems like network traffic congestion or backend outages happen. In this paper, we introduce an adaptive edge gateway for ZigBee-based IoT networks that can switch between MQTT and CoAP as needed. The gateway monitors real-time performance, such as latency, packet loss, and backend availability, and chooses the best protocol and mode automatically. We tested our approach with in-depth simulations in ns-3, covering 180 scenarios including different types of failures, like link problems and broker outages. Our results show that adaptive switching improves packet delivery by 15–20% during faults in comparison to static setups and reduces recovery time without much extra overhead. This suggests that adapting protocols at the gateway is an effective way to make IoT systems more reliable.

Downloads

Download data is not yet available.

References

[1] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, “Internet of Things (IoT): A vision, architectural elements, and future directions,” Future Generation Computer Systems, vol. 29, no. 7, pp. 1645–1660, 2013.

[2] A. Al-Fuqaha, M. Guizani, M. Mohammadi, M. Aledhari, and M. Ayyash, “Internet of Things: A survey on enabling technologies, protocols, and applications,” IEEE Communications Surveys & Tutorials, vol. 17, no. 4, pp. 2347–2376, 2015.

[3] M. Harmassi, “Thing-to-thing context-awareness at the edge,” HAL, 2019.

[4] J. S. Lee, Y. W. Su, and C. C. Shen, “A comparative study of wireless protocols: Bluetooth, UWB, ZigBee, and Wi-Fi,” in Proc. IEEE IECON, 2007, pp. 46–51.

[5] A. Banks, E. Briggs, K. Borgendale, and R. Gupta, “MQTT Version 5.0,” OASIS Standard, 2019.

[6] Z. Shelby, K. Hartke, and C. Bormann, “The Constrained Application Protocol (CoAP),” IETF RFC 7252, 2014.

[7] S. D. Madsen, B. E. Staugaard, Z. Ma, S. Yussof, and B. N. Jørgensen, “A Cost-effective Edge Computing Gateway for Smart Buildings,” arXiv preprint, 2024.

[8] J. Ren, Y. Pan, A. Gościński, and R. Beyah, “Edge Computing for the Internet of Things,” IEEE Netw., vol. 32, no. 1, pp. 6–7, 2018.

[9] V. Seoane, C. García-Rubio, F. Almenares, and C. Campo, “Performance evaluation of CoAP and MQTT with security support for IoT environments,” Computer Networks, vol. 197, p. 108338, 2021.

[10] E. Sisinni, A. Saifullah, S. Han, U. Jennehag, and M. Gidlund, “Industrial Internet of Things: Challenges, Opportunities, and Directions,” IEEE Trans. Industr. Inform., vol. 14, no. 11, pp. 4724–4734, 2018.

[11] W. Yu et al., “A survey on the edge computing for the Internet of Things,” IEEE Access, vol. 6, pp. 6900–6919, 2017.

[12] M. Satyanarayanan, “The emergence of edge computing,” Computer (Long. Beach. Calif)., vol. 50, no. 1, pp. 30–39, 2017.

[13] V. Kumar, P. Yadav, and L. S. Indrusiak, “Resilient Edge: Building an Adaptive and Resilient Multi-Communication Network for IoT Edge Using LPWAN and WiFi,” White Rose Research Online, vol. 20, no. 3, pp. 3055–3071, 2023.

[14] L. Belcastro, F. Marozzo, A. Orsino, D. Talia, and P. Trunfio, “Navigating the Edge-Cloud Continuum: A State-of-Practice Survey,” arXiv preprint, 2025.

[15] R. of E. C. for the I. of T. (EC-IoT), “Techniques, Challenges and Future Directions,” Journal of Sensor Networks and Data Communications, vol. 4, no. 1, pp. 1–11, 2024.

[16] U. Hunkeler, H. L. Truong, and A. Stanford-Clark, “MQTT-S-A publish/subscribe protocol for Wireless Sensor Networks,” in Proc. IEEE COMSWARE, 2008, pp. 791–798.

[17] C. Bormann, A. P. Castellani, and Z. Shelby, “CoAP: An application protocol for billions of tiny internet nodes,” IEEE Internet Comput., vol. 16, no. 2, pp. 62–67, 2012.

[18] P. H. Goudarzi and M. Goudarzi, “A review on IoT protocols and simulation tools,” in Proc. ICEECT, 2021.

[19] M. Collina, M. Bartolucci, A. Vanelli-Coralli, and G. E. Corazza, “Internet of Things application layer protocol: Comparison of MQTT and CoAP,” in Proc. IEEE ICECS, 2014, pp. 478–481.

[20] N. De Caro, W. Colitti, K. Steenhaut, G. Mangino, and G. Reali, “Comparison of two lightweight protocols for smartphone-based sensing,” in Proc. IEEE WOWMOM, 2013, pp. 1–9.

[21] D. Thangavel, X. Ma, A. Belayneh, and K. M. Sivalingam, “A resilient smart city architecture based on MQTT and CoAP,” in Proc. IEEE LCN, 2016, pp. 209–212.

[22] S. B. Othman and A. Trad, “Security evaluation of MQTT and CoAP protocols for IoT applications,” IEEE Access, vol. 8, pp. 190565–190574, 2020.

[23] H. H. M. Ramzan, “Adaptive IoT Communication Protocols and Edge Optimization for Smart Urban Mobility Systems,” 2025.

[24] M. B. Yassein, M. Q. Shatnawi, and A. Al-Zoubi, “Application layer protocols for the Internet of Things: A survey,” International Journal of Advanced Computer Science and Applications, vol. 7, no. 6, 2016.

[25] P. Baronti, P. Pillai, V. W. Chook, S. Chessa, A. Gotta, and Y. F. Hu, “Wireless sensor networks: A survey on the state of the art and the 802.15.4 and ZigBee standards,” Comput. Commun., vol. 30, no. 7, pp. 1655–1695, 2007.

[26] S. K. Datta, C. Bonnet, and N. Nikaein, “An IoT gateway centric architecture to provide novel M2M services,” in Proc. IEEE WF-IoT, 2014, pp. 518–523.

[27] A. Al-Fuqaha, A. Khreishah, M. Guizani, A. Rayes, and M. Mohammadi, “Toward better horizontal integration among IoT services,” IEEE Communications Magazine, vol. 53, no. 9, pp. 72–79, 2015.

[28] S. K. Datta, A. Gyrard, C. Bonnet, and K. Boudaoud, “Cross-domain Internet of Things application development: M2M data, semantic mashup and orchestration,” in Proc. IEEE WF-IoT, 2015, pp. 7–12.

[29] P. Bellavista, “Edge Computing for the Internet of Things: A Case Study on Data Stream Processing,” Future Generation Computer Systems, vol. 107, 2020.

[30] R. Mahmud, R. Kotagiri, and R. Buyya, “Fog computing: A taxonomy, survey, and research challenges,” Journal of Network and Computer Applications, vol. 117, pp. 51–67, 2018.

[31] W. Shi, J. Cao, Q. Zhang, Y. Li, and L. Xu, “Edge computing: Vision and challenges,” IEEE Internet Things J., vol. 3, no. 5, pp. 637–646, 2016.

[32] A. M. R. R. Souza and J. R. Amazonas, “A survey on IoT gateway architectures,” Journal of Network and Computer Applications, vol. 177, p. 102948, 2021.

[33] J. C. R. Bennett, C. Partridge, and N. Shectman, “Packet reordering is not pathological network behavior,” IEEE/ACM Transactions on Networking, vol. 7, no. 6, pp. 789–798, 1999.

[34] C. Berger, P. Eichhammer, H. P. Reiser, D. Jörg, F. J. Hauck, and G. Habiger, “A Survey on Resilience in the IoT: Taxonomy, Classification and Discussion of Resilience Mechanisms,” arXiv preprint, 2021.

[35] A. K. M. M. Islam, M. A. Hannan, and A. Hussain, “Resilience in IoT networks: A review of current trends and future directions,” Sensors, vol. 20, no. 14, p. 3889, 2020.

[36] K. Ascherya, M. R. Bobbala, V. Saavanth, K. Shalini, M. Adudhodla, and P. K. R. Manellore, “Adaptive Network Architectures for Scalable, Resilient and Secure IoT Systems,” 2025.

[37] M. M. Hossain, R. Hasan, and M. A. Hussain, “A survey on fault tolerance in IoT systems,” Journal of Network and Computer Applications, vol. 145, p. 102415, 2019.

[38]BenHusein, A. H., Shakrum, F. M., & Elgdiri, E. M. (2026). A Comprehensive Performance Evaluation of a Wi-Fi-Based Wireless Sensor Network Using Raspberry Pi and ESP8266 Under Multi-Rate Traffic Conditions. Al-Farooq Journal of Sciences, 2(3), 816-818.

[39] S. A. Alqahtani and A. S. Alshamrani, “Fault tolerance mechanisms in IoT: A systematic literature review,” IEEE Access, vol. 8, pp. 120354–120372, 2020.

Downloads

Published

2026-08-14

How to Cite

An Adaptive Multi-Protocol IoT Gateway for Resilient Edge-Cloud Communication: An ns-3-Based Evaluation. (2026). Comprehensive Journal of Science, 11(ملحق 41), 1900-1912. https://doi.org/10.65405/bp3qh004