Skip to main content

A Comparison of Publish-Subscribe and Client-Server Models for Streaming IoT Telemetry Data

  • Conference paper
  • First Online:
Emerging Technologies for Developing Countries (AFRICATEK 2022)

Abstract

In recent years, the Internet of Things (IoT) has become a household name both in research and commercial domains. There are numerous practical applications of IoT, ranging from sophisticated solutions in big factories to simple smart homes devices, such as temperature monitors. Common to these solutions is the need to transmit data from a sensing source to a different location where the data is read, processed, analyzed, or simply stored. Numerous models and protocols have been developed to ferry IoT data, including queueing, client-server, and publish-subscribe models, all with their merits and demerits. In this paper, a comparison of two models for transmitting live/streaming IoT telemetry data is done. The Message Queue Telemetry Transport (MQTT), a publish-subscribe model, is compared with WebSocket, a client-server model, in terms of throughput, round trip time and system utilization. Obtained results reveal that MQTT is more suited for transmitting live IoT data than WebSocket, as it had better throughput, utilized less system resource, however it was slightly slower than WebSocket.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Want, R., Schilit, B.N., Jenson, S.: Enabling the internet of things. Computer 48(1), 28–35 (2015)

    Article  Google Scholar 

  2. Machaka, P., Ajayi, O., Maluleke, H., Kahenga, F., Bagula, A., Kyamakya, K.: Modelling DDoS Attacks in IoT Networks Using Machine Learning (2021). arXiv preprint arXiv:2112.05477

  3. Fette, I., Melnikov, A.: The WebSocket protocol (No. rfc6455) (2011)

    Google Scholar 

  4. Kurose J., Ross, K.: Computer Networking: A Top-Down Approach, Pearson (2016)

    Google Scholar 

  5. Stansberry, J.: MQTT and CoAP: Underlying Protocols for the IoT. Electron. Des, pp. 1–8 (2015)

    Google Scholar 

  6. Mishra, B.: Performance evaluation of MQTT broker servers. In: Gervasi, O., et al. (eds.) ICCSA 2018. LNCS, vol. 10963, pp. 599–609. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-95171-3_47

    Chapter  Google Scholar 

  7. Thangavel, D., Ma, X., Valera, A., Tan H., Tan, C.: Performance evaluation of MQTT and CoAP via a common middleware. In: IEEE 9th International Conference on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP), pp. 1–6 (2014). https://doi.org/10.1109/ISSNIP.2014.6827678

  8. Bartnitsky, J.: HTTP vs MQTT performance tests (2018). https://flespi.com/blog/http-vs-mqtt-performance-tests. Accessed 25July 2022

  9. Luzuriaga, J., Perez, M., Boronat, P., Cano, J., Calafate, C., Manzoni, P.: A comparative evaluation of AMQP and MQTT protocols over unstable and mobile networks. In: 12th IEEE Consumer Communications and Networking Conf. (CCNC2015), pp. 931–936 (2015).https://doi.org/10.1109/CCNC.2015.7158101

  10. Koziolek, H., Grüner, S., Rückert, J.: A comparison of mqtt brokers for distributed iot edge computing. In: Jansen, A., Malavolta, I., Muccini, H., Ozkaya, I., Zimmermann, O. (eds.) Software Architecture: 14th European Conference, ECSA 2020, L’Aquila, Italy, September 14–18, 2020, Proceedings, pp. 352–368. Springer International Publishing, Cham (2020). https://doi.org/10.1007/978-3-030-58923-3_23

    Chapter  Google Scholar 

  11. El Ouadghiri, M., Aghoutane, B., El Farissi, N.: Communication model in the Internet of Things. Procedia Comput. Sci. 1(177), 72–77 (2020)

    Article  Google Scholar 

  12. Oliveira, G., Costa, D., Cavalcanti, R., Oliveira, J., et al.: Comparison between MQTT and WebSocket protocols for Iot applications using ESP8266. In: 2018 Workshop on Metrology for Industry 4.0 and IoT 2018 Apr 16, pp. 236–241. IEEE (2018)

    Google Scholar 

  13. Raspberry Pi.com. Raspberry Pi 4 Tech Specs. https://www.raspberrypi.com/products/raspberry-pi-4-model-b/specifications/. Accessed 13 Nov 2022

  14. Lamping, U., Warnicke, E.: Wireshark user's guide. Interface 4(6), 1 (2004). https://www.wireshark.org/docs/wsug_html_chunked/ Accessed 13/11/2022

  15. Ajayi, O.O., Bagula, A.B., Maluleke, H.C., Gaffoor, Z., Jovanovic, N., Pietersen, K.C.: WaterNet: a network for monitoring and assessing water quality for drinking and irrigation purposes. IEEE Access 10, 48318–48337 (2022)

    Article  Google Scholar 

  16. Mandava, T., Chen, S., Isafiade, O., Bagula, A.: An iot middleware for air pollution monitoring in smart cities: a situation recognition model. In: Proceedings of the IST Africa 2018 Conference, Gabarone, Botswana, pp. 9–11 (2018)

    Google Scholar 

  17. Kang, W., Kapitanova, K., Son, S.H.: RDDS: a real-time data distribution service for cyber-physical systems. IEEE Trans. Industr. Inf. 8(2), 393–405 (2012)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Olasupo Ajayi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ajayi, O., Bagula, A., Bode, J., Damon, M. (2023). A Comparison of Publish-Subscribe and Client-Server Models for Streaming IoT Telemetry Data. In: Masinde, M., Bagula, A. (eds) Emerging Technologies for Developing Countries. AFRICATEK 2022. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 503. Springer, Cham. https://doi.org/10.1007/978-3-031-35883-8_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-35883-8_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-35882-1

  • Online ISBN: 978-3-031-35883-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics