Application Layer Protocols for Internet of Things (IoT)

| 2-3 min read |
-- reads
Application Layer Protocols for Internet of Things (IoT)

Application Layer

Application layer protocols define how the applications interface with the lower layer protocols to send the data over the network. The application data, typically in files, is encoded by the application layer protocol and encapsulated in the transport layer protocol which provides connection or transaction-oriented communication over the network. Port numbers are used for application addressing (for example, port 80 for HTTP, port 22 for SSH, etc.). Application layer protocols enable process-to-process connections using ports.

IoT Protocols

HTTP

Hypertext Transfer Protocol (HTTP) is the application layer protocol that forms the foundation of the World Wide Web (WWW). HTTP includes commands such as GET, PUT, POST, DELETE, HEAD, TRACE, and OPTIONS.

The protocol follows a request-response model where a client sends requests to a server using the HTTP commands. HTTP is a stateless protocol, and each HTTP request is independent of the other requests.

An HTTP client can be a browser or an application running on the client (e.g., an application running on an IoT device, a mobile application or other software). HTTP protocol uses Universal Resource Identifiers (URIs) to identify HTTP resources.

CoAP

Constrained Application Protocol (CoAP) is an application layer protocol for machine-to-machine (M2M) applications, meant for constrained environments with constrained devices and constrained networks.

Like HTTP, CoAP is a web transfer protocol and uses a request-response model; however, it runs on top of UDP instead of TCP. CoAP uses a client-server architecture where clients communicate with servers using connectionless datagrams.

CoAP is designed to easily interface with HTTP. Like HTTP, CoAP supports methods such as GET, PUT, POST, and DELETE.

WebSocket

WebSocket protocol allows full-duplex communication over a single socket connection for sending messages between client and server.

WebSocket is based on TCP and allows streams of messages to be sent back and forth between the client and server while keeping the TCP connection open.

The client can be a browser, a mobile application, or an IoT device.

MQTT

Message Queue Telemetry Transport (MQTT) is a light-weight messaging protocol based on the publish-subscribe model.

MQTT uses a client-server architecture where the client (such as an IoT device) connects to the server (also called MQTT Broker) and publishes messages to topics on the server. The broker forwards the messages to the clients subscribed to topics.

MQTT is well suited for constrained environments where the devices have limited processing and memory resources, and the network bandwidth is low.

XMPP

Extensible Messaging and Presence Protocol (XMPP) is a protocol for real-time communication and streaming XML data between network entities.

XMPP powers a wide range of applications including messaging, presence, data syndication, gaming, multi-party chat, and voice/video calls.

XMPP allows sending small chunks of XML data from one network entity to another in near real-time. XMPP is a decentralized protocol and uses a client-server architecture.

XMPP supports both client-to-server and server-to-server communication paths. In the context of IoT, XMPP allows real-time communication between IoT devices.

DDS

Data Distribution Service (DDS) is a data-centric middleware standard for device-to-device or machine-to-machine communication.

DDS uses a publish-subscribe model where publishers (e.g., devices that generate data) create topics to which subscribers (e.g., devices that want to consume data) can subscribe.

A publisher is an object responsible for data distribution, and the subscriber is responsible for receiving published data.

DDS provides quality-of-service (QoS) control and configurable reliability.

AMQP

Advanced Message Queuing Protocol (AMQP) is an open application layer protocol for business messaging.

AMQP supports both point-to-point and publisher/subscriber models, routing and queuing.

AMQP brokers receive messages from publishers (e.g., devices or applications that generate data) and route them over connections to consumers (applications that process data).

Publishers publish the messages to exchanges, which then distribute message copies to queues.

Messages are either delivered by the broker to the consumers which have subscribed to the queues, or the consumers can pull the messages from the queues.

More from "IoT And Its Applications"