RTUComputer ScienceYr 2025 · Sem 72025

Q21Internet of Things

Question

10 marks

Discuss the various communication protocols used in IoT (MQTT, CoAP, XMPP, AMQP). Compare their features, advantages, and use cases.

Answer

An exhaustive architectural comparison of IoT Application Protocols. Violently dissects the massive TCP overhead of XMPP and AMQP against the microscopic, ultra-efficient Publish-Subscribe mathematics of MQTT and the UDP-based architecture of CoAP.

Standard HTTP is mathematically horrific for IoT. A simple "Temp=24" payload requires a 500-byte HTTP header, violently draining the coin-cell battery of a sensor. IoT requires highly specialized, ultra-lightweight Application Layer architectures to guarantee data delivery over catastrophic wireless networks.

The absolute undisputed king of IoT.

  • Architecture: It uses a strict Publish-Subscribe model. Sensors (Publishers) NEVER talk directly to the App (Subscriber). They both connect to a central Broker. The sensor publishes to a Topic (e.g., roof/temp). The App subscribes to that topic. The Broker handles the massive routing.
  • Transport: Runs on TCP. Highly reliable.
  • Merits: Extremely lightweight (2-byte header). It features exact mathematical Quality of Service (QoS 0, 1, 2) to guarantee a message is delivered exactly once, even if the network drops.
  • Use Case: Smart homes, industrial telemetry, massive sensor networks.

The RESTful alternative for microscopic devices.

  • Architecture: It mimics HTTP (uses GET, POST, PUT, DELETE) but is mathematically crushed into binary. It operates on a strict Client-Server model.
  • Transport: Runs on UDP. This is a massive architectural difference. UDP is connectionless. There is no heavy 3-way TCP handshake. The sensor just violently blasts the packet and goes back to sleep.
  • Merits: Explosively low power consumption and tiny memory footprint.
  • Use Case: Battery-operated agricultural sensors reporting data once an hour.

The protocol originally built for Jabber/WhatsApp.

  • Architecture: Completely based on massive XML text structures. Uses a decentralized Client-Server architecture.
  • Merits: Excellent for "Presence" detection (knowing exactly when a device comes online).
  • Demerits: XML is a catastrophic mathematical disaster for IoT. Parsing XML strings completely exhausts the RAM of an 8-bit microcontroller. It is far too heavy for edge sensors.
  • Use Case: Smart TVs, game consoles, high-power smart appliances.

The enterprise banking standard.

  • Architecture: A massive, highly complex, secure queuing architecture. It guarantees absolute, flawless message delivery across global data centers.
  • Merits: Military-grade reliability, security, and transaction support.
  • Demerits: It requires massive CPU and RAM overhead. It is completely physically impossible to run on an Arduino.
  • Use Case: Cloud-to-Cloud communication. The MQTT broker at the edge talks to the AMQP router in the AWS data center.
Back to Paper