IoT Protocols, Communication Models, & Deployment Strategies
Classified in Computers
Written on  in 
English with a size of 1.64 MB
IoT Protocols
Link Layer Protocols
802.3 Ethernet Standards
A collection of wired Ethernet standards that provide data rates from 10 Mb/s to 40 gigabits per second. The shared medium in Ethernet can be a coaxial cable, twisted-pair wire, or optical fiber. This shared medium carries communication for all devices on the network.
802.11 Wi-Fi Standards
A collection of wireless Local Area Network (WLAN) communication standards.
Network/Internet Layer
- Responsible for sending IP datagrams from the source network to the destination network.
 - Handles host addressing and packet routing based on IPv4 or IPv6.
 - Datagrams contain a source and destination address, which are used to route them from the source to the destination across multiple networks.
 - IPv4 uses 32-bit addresses, and IPv6 uses 128-bit addresses.
 - Data transfer rates can be up to 50 kb/s.
 
Transport Layer Protocols
- Provides end-to-end message transfer capability, independent of the underlying network.
 - Uses either handshake or non-handshake acknowledgments.
 - Offers functions such as error control, segmentation, flow control, and congestion control.
 
TCP: Transmission Control Protocol
- Responsible for reliable communication (with error handling, ordering, and flow control) from source machine to destination machine and applications (using port numbers).
 - Ensures reliable transmission of packets in order.
 - A connection-oriented and stateful protocol.
 - Provides flow control (matching transmit/receive data handling rates), error detection, duplicate packet handling, etc.
 - Requires more overhead packets/bits.
 
UDP: User Datagram Protocol
- A connectionless protocol for end-to-end packet delivery.
 - Requires fewer overhead bits as no connection is established.
 - Does not provide guaranteed delivery, ordering of messages, or duplicate elimination, making it unreliable.
 - Defines how the application interfaces with the lower layer.
 - Converts files to smaller data units by encapsulation.
 
Application Layer Protocols
HTTP: Hypertext Transfer Protocol
The application layer protocol that forms the foundation of the World Wide Web. Client-server communication uses HTTP commands and works on TCP.
CoAP: Constrained Application Protocol
A protocol for machine-to-machine applications designed for constrained environments, devices, and networks. Like HTTP, CoAP is a web transfer protocol and uses a request-response model. It runs on top of UDP due to constraints.
WebSocket Protocol
The WebSocket protocol allows full-duplex communication over a single socket connection for sending messages between a client and server. Based on TCP, it 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
A lightweight messaging protocol based on the publish-subscribe model, where a publisher sends information once, and a broker retransmits it to subscribers. An IoT device sends its message to an MQTT broker. The broker forwards the message to subscribed clients. It is suited for constrained environments and devices and requires less bandwidth.
XMPP: Extensible Messaging and Presence Protocol
A protocol for real-time communication and streaming XML (Extensible Markup Language) data between network entities. It supports messaging, presence, data syndication, gaming, multiparty chat, and voice/video calls. It uses a client-server architecture and is decentralized.
DDS: Data Distribution Service
The data-centric middleware standard for device-to-device and machine-to-machine communication. It uses a publish-subscribe model. DDS provides Quality of Service (QoS) control and configurable reliability.
AMQP: Advanced Message Queuing Protocol
An open application layer protocol for business messaging. It supports point-to-point and publish-subscribe 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. Publishers send messages to an exchange, which then distributes message copies to queues.
IoT Communication Models
1) Request-Response Model
- A client sends a request to the server, and the server responds.
 - When the server receives a request, it decides how to respond, fetches the data, retrieves resource representations, prepares the response, and then sends the response to the client.
 - It is a stateless communication model (the server does not retain session information), where each request-response pair is independent.
 
2) Publish-Subscribe Model
- A communication model that involves publishers, brokers, and consumers.
 - Publishers are the source of data and send it to topics managed by the broker.
 - Publishers are unaware of the consumers.
 - Consumers subscribe to topics managed by the broker.
 - When the broker receives data for a topic from a publisher, it sends the data to all subscribed consumers.
 
3) Push-Pull Communication Model
- Data producers push data to queues, and consumers pull data from the queues.
 - Producers do not need to be aware of consumers.
 - Queues help decouple messaging between producers and consumers.
 - Queues also act as a buffer, which helps in situations where there is a mismatch between the rate at which producers push data and the rate at which consumers pull data.
 
4) Exclusive Pair Communication Model
- A bidirectional, full-duplex communication model that uses a persistent connection between the client and server.
 - Once the connection is set up, it remains open until the client sends a request to close it.
 - Client and server can send messages to each other after the connection is established.
 - It is a stateful communication model, and the server is aware of all open connections.
 
IoT Enabling Technologies
1) Wireless Sensor Networks (WSN)
- Comprises distributed devices with sensors used to monitor environmental and physical conditions.
 - Consists of end nodes, routers, and a coordinator.
 - End nodes have several sensors attached.
 - An end node can also act as a router.
 - Routers are responsible for routing data packets from end nodes to the coordinator.
 - The coordinator node collects data from all nodes and also acts as a gateway that connects the WSN to the internet.
 - Examples include weather monitoring systems using WSN, where nodes collect temperature, humidity, and other data, which is then aggregated and analyzed.
 - Indoor air quality monitoring systems using WSN to collect data on indoor air quality and concentrations of various gases.
 - Smart grids use wireless sensor networks for monitoring the grid at various points.
 
2) Cloud Computing for IoT
- A transformative computing paradigm that involves delivering applications and services over the internet.
 - It involves provisioning computing, networking, and storage resources on demand, providing these resources as metered services to users in a "pay-as-you-go" model.
 
3) Big Data Analytics in IoT
- Big Data Analytics is defined as collections of datasets whose volume, velocity (in terms of temporal variations), or variety is so large that it is difficult to store, manage, process, and analyze the data using traditional database and data processing tools.
 - Big Data Analytics involves several steps, starting from data cleaning, data munging, data processing, and visualization.
 - Examples include weather monitoring stations, vehicle location tracking, and retail inventory monitoring systems.
 
4) Communication Protocols for IoT
- Communication protocols form the backbone of IoT systems and enable network connectivity and application coupling.
 - Communication protocols allow devices to exchange data over the network.
 - These protocols define data exchange formats, data encoding schemes for devices, and the routing of packets from source to destination.
 - Other functions of the protocol include sequence control, flow control, and retransmission of lost packets.
 
5) Embedded Systems in IoT
- An embedded system is a computer system that has computer hardware and software embedded to perform a specific task.
 - In contrast to general-purpose computers or personal computers, which can perform various types of tasks, embedded systems are designed to perform a specific set of tasks.
 - Key components include microcontrollers, memory, network units, and I/O devices.
 
IoT Levels & Deployment Templates
IoT Level 1: Single Node, Local Analysis
- A single node/device that performs sensing and/or actuation, stores data, performs analysis, and hosts the application.
 - These systems are suitable for modeling low-cost and low-complexity solutions where the data involved is not large, and analysis requirements are not computationally intensive.
 - No cloud involvement.
 - Example: controlling lights or appliances.
 
IoT Level 2: Single Node, Cloud Storage
- Has a single node that performs sensing and/or actuation and local analysis.
 - Data is stored in the cloud, and the application is usually cloud-based.
 - Level-2 IoT systems are suitable for solutions where the data involved is large; however, the primary analysis requirement is not computationally intensive and can be done locally.
 - Example: Cloud-based irrigation systems.
 
IoT Level 3: Single Node, Cloud Analytics
- Has a single node.
 - Data is stored and analyzed in the cloud, and the application is cloud-based.
 - These systems are suitable for solutions where the data involved is large, and the analysis requirements are computationally intensive.
 
IoT Level 4: Multiple Nodes, Cloud Analytics
- Has multiple nodes that perform local analysis. Data is stored in the cloud, and the application is cloud-based.
 - Contains local and cloud-based observer nodes that can subscribe to and receive information collected in the cloud from IoT devices.
 - Suitable for solutions where multiple nodes are required, the data involved is large, and the analysis requirements are computationally intensive.
 
IoT Level 5: WSN-Based, Cloud Analytics
- Has multiple end nodes and one coordinator node.
 - The end nodes perform sensing and/or actuation.
 - Data is stored and analyzed in the cloud, and the application is cloud-based.
 - Suitable for solutions based on wireless sensor networks, where the data involved is large, and the analysis requirements are computationally intensive.
 
IoT Level 6: Independent Nodes, Centralized Control
- Has multiple independent end nodes that perform sensing and/or actuation and send data to the cloud.
 - Data is stored in the cloud, and the application is cloud-based.
 - The analytics component analyzes the data and stores the results in the cloud database.
 - The results are visualized with the cloud-based application.
 - The centralized controller is aware of the status of all end nodes and sends control commands to the nodes.