What are IoT Communication Protocols?
IoT protocols are standards or “languages” used by machines to communicate with each other, or with platforms. Based on their features and functionality, these protocols are mainly divided into 3 types: transmission protocols, communication protocols, and industry-specific protocols.
Transmission protocols: used by devices for IoT network and connecting within the subnet, وائی فائی سمیت, بلوٹوتھ, Zigbee, ایتھرنیٹ, این ایف سی, 3G/ 4G/ 5G etc.
Communication protocols: used for data transmission between devices, operate above the network layer and provide application layer services to users. Some of the communication protocols: ایم کیو ٹی ٹی, CoAP, HTTP/HTTPS, WebSocket, AMQP.
Industry-specific protocols: standard protocols within a specific industry to ensure compatibility between the devices, systems, platforms by different manufacturers and brands, such as JT/T 808 vehicle terminal communication protocol in China.
Understanding of 7 IoT Communication Protocols:
Here you’ll find some of the communication protocols used in IoT industry, بشمول:
1. REST/HTTP
What is REST
REST (Representational State Transfer)is an architectural style rather than standards for designing networked applications, typically uses HTTP as its transport protocol to implement its architectural principles.
خصوصیات:
- Statelessness: Each request contains all necessary information, and the server does not maintain the client’s state.
- Resource Identification: On the server side, the application state and functionality can be divided into various resources, which are exposed to the client. Examples of resources include application objects, database records, algorithms, وغیرہ. Each resource is assigned a unique address using a URI (Universal Resource Identifier).
- Uniform Interface: Use standard HTTP methods to manipulate resources, such as GET, POST, PUT, DELETE
درخواست:
REST/HTTP primarily aims to simplify the system architecture of the Internet, quickly achieving loose coupling between client and server interactions, thereby reducing interaction latency. اس لیے, it is suitable for IoT application, enabling the exposure of IoT resources through REST, allowing services to be invoked by other applications.
2. CoAP
What is CoAP
CoAP (Constrained Application Protocol) offers easy and efficient communication for constrained devices, making it ideal for operation in low-power, low-bandwidth, and high-latency environments.
خصوصیات:
- Header Compression: CoAP features a compact binary header with a base of 4 bytes, followed by extended options, typically resulting in a request header of 10-20 bytes.
- Methods and URIs: Supports GET, PUT, POST, DELETE methods, and URIs for accessing server resources.
- Transport Layer: Built on UDP to minimize overhead and support multicast, with a simple stop-and-wait reliability mechanism.
- Asynchronous Communication: Unlike HTTP, CoAP supports asynchronous communication, ideal for M2M applications.
- Resource Discovery: Includes a built-in format for resource discovery, compliant with RFC 5785, using /.well-known/core for resource descriptions.
- Caching: Supports caching of resource descriptions to enhance performance.
درخواست:
CoAP is a simplified HTTP-based RESTful API. CoAP is an application layer protocol in the 6 LoWPAN protocol stack, suitable for resource-constrained communication IP networks, such as low-power sensors and embedded systems.
3. ایم کیو ٹی ٹی
What is MQTT
The MQTT protocol uses a publish/subscribe pattern, where IoT terminals typically connect to an MQTT broker via TCP. The broker manages the communication content through topics and is responsible for forwarding messages between devices.
خصوصیات:
- Pubish/Subscribe Model: Clients can publish messages to a topic and subscribe to receive messages from specific topics. This model enables flexible message distribution.
- Low Bandwidth: The message header is minimal, typically only 2 bytes, supporting efficient bandwidth usage and making it suitable for low-bandwidth, high-latency, and unstable networks.
- وشوسنییتا: MQTT offers three QoS levels for message delivery: “at most once,” “at least once,” اور “exactly once.”
درخواست:
MQTT is generally suitable for device data collection to endpoints (جیسے, Device -> Server) and centralized communication in a star network architecture, with the broker acting as the hub. It is widely used in IoT scenarios and has also been adopted in some mobile applications, such as Facebook Messenger (historically).
4. DDS
What is DDS
DDS (Data Distribution Service) is a middleware standard created for real-time systems. It meets the strict demands of distributed applications by providing low latency, high throughput, and deterministic performance.
خصوصیات:
- Data-centric
- Brokerless Publish/Subscribe Messaging Model: Support point-to-point, point-to-multipoint, and multipoint-to-multipoint communication.
- Offer up to 21 Quality of Service (QoS) Policies
درخواست:
Distributed, highly reliable, real-time data communication for devices. فی الحال, DDS is widely used in fields like civil aviation and industrial control.
5. AMQP
What is AMQP
AMQP is an open-standard application layer protocol designed to ensure reliable message transmission and queuing mechanisms.
خصوصیات:
- Wire-level Protocol: Transmits data across the network as a stream of bytes.
- High compatibility due to the open standard
- Flexible & محفوظ: Supports various messaging patterns, including publish/subscribe and point-to-point. It also incorporates multiple security mechanisms, such as encryption and authentication.
درخواست:
Initially used for transaction messaging in financial systems, AMQP is now primarily utilized in IoT applications for communication and data analysis between mobile devices and backend data centers.
6. XMPP
What is XMPP
As an open-standard communication protocol, XMPP (Extensible Messaging and Presence Protocol) is designed for real-time communication, such as instant messaging and presence information.
خصوصیات:
- Client/Server Communication Model: Clients send requests to the server, which processes the requests and sends back the appropriate response or resource to the client.
- Distributed Network: Multiple independent nodes form the network, eliminating single points of failure.
- Simple Clients: Clients handle fewer tasks, with most computation done on the server side.
- XML is used to describe data, ensuring cross-platform compatibility, though JSON has become more popular in modern applications.
درخواست:
XMPP is used in instant messaging, network management, content delivery, collaboration tools, file sharing, gaming, remote system monitoring, اور مزید.
7. JMS
What is JMS
JMS (Java Message Service) is a standard API of the Java platform for messaging in distributed applications. It allows applications to communicate through message queues, thus achieving asynchronous, flexible, and reliable message exchange.
خصوصیات:
- Asynchronous Communication: Allows sending and receiving messages at different times, increasing system flexibility and responsiveness.
- Message Durability: Provides message persistence, ensuring that messages are not lost in case of system failures, and enhancing reliability
- Transaction Support: JMS provides transaction support, ensuring the atomicity of a group of message operations, meaning all operations either succeed completely or fail entirely, thereby guaranteeing data consistency.
درخواست:
JMS is ideal for distributed applications requiring asynchronous messaging, system decoupling, and high reliability, such as enterprise application integration, event-driven architecture, and real-time data processing.
Comparisons of IoT Communication Protocols
Feature | DDS | ایم کیو ٹی ٹی | AMQP | XMPP | JMS | REST/HTTP | CoAP |
---|---|---|---|---|---|---|---|
Abstraction | Pub/Sub | Pub/Sub | Pub/Sub | NA | Pub/Sub | Request/Reply | Request/Reply |
Architecture | Global data space | پراکسی | P2P or Proxy | NA | پراکسی | Through TCP guarantee | P2P |
QoS | 22 types | 3 types | 3 types | NA | 3 types | Confirm through TCP or confirmed messages | جی ہاں |
Interoperability | جی ہاں | Partially | جی ہاں | NA | نہیں | جی ہاں | جی ہاں |
کارکردگی | 100,000 msg/s/sub | 1,000 msg/s/sub | 1,000 msg/s/sub | NA | 1,000 msg/s/sub | 100 req/s | 100 req/s |
Real-time | جی ہاں | نہیں | نہیں | نہیں | نہیں | نہیں | جی ہاں |
Transport Layer | Supports UDP and TCP | ٹی سی پی | ٹی سی پی | Not specified, usually TCP | ٹی سی پی | UDP | UDP |
Subscription Filtering | Message content-based and topic-based filtering | Layered subscription based on topics and message content | Queue and message filtering | NA | Message content and topic filtering | Not supported | Supports topic and multicast |
Encoding | Binary | Binary | Binary | XML format | Binary | Plain text | Plain text |
Dynamic Discovery | جی ہاں | نہیں | نہیں | NA | نہیں | نہیں | نہیں |
سلامتی | Provides FSS, TLS, and other security options | Simple username/password, SSL data encryption | SASL and TLS data encryption | NA | Provides FSS, TLS, JAAS API support | General support for SSL and TLS | General support for SSL and TLS |
نتیجہ
ایم کیو ٹی ٹی, DDS, AMQP, XMPP, JMS, REST, and CoAP are widely used protocols, each with multiple implementations, that claim support for real-time publish/subscribe IoT communication. تاہم, when designing specific IoT system architectures, it is essential to consider the actual communication needs of the scenario—such as bandwidth limitations, latency requirements, and security—before selecting the most appropriate protocol.