For software companies, the IoT model brings decisive changes to their hardware design and the services they provide. One of the most affected aspects is the communication protocol. A communication protocol can be thought of as a language that allows two or more devices to communicate with each other. At the same time, there is no order without rules, and communication protocols also follow a set of rules so that two devices can pass meaningful information to each other. Communication protocols are extremely important in distributed systems, and different parts of the same protocol run independently in multiple locations. The system may be diverse when running processes, so a common set of instructions needs to be guaranteed in the system to communicate.
The reason why IoT has become so popular is largely due to the Cyber-Physical Systems (CPS). The concept of physical devices connecting to the Internet and transmitting and receiving data is the real implementation of IoT solutions. At the same time, this also increases the complexity of existing communication protocols and the Internet. The development of IoT has brought many possibilities, but the only feasible one is the real-time and effective connection between machines and machines (M2M) through the Internet. A device being connected to the Internet is only considered a product of human interaction, not a natural result. Therefore, the communication between the protocol and the Internet has always developed on an unreliable and slow basis. In addition to the communication protocol, another aspect of the Internet protocol architecture is the TCP/IP stack. It controls the data transmission between two computers. A three-way handshake is used to establish a connection, which involves the client confirming the receipt of data and sending a confirmation message to the server. The second handshake is when the server receives the client's data and returns a confirmation receipt, and the third handshake is when the client also returns a confirmation receipt to the server, thus closing the communication channel. The advantage of this communication method is reliability and the sharing of all sent data, but it takes a long time because the process requires verification. User Datagram Protocol (UDP) is a faster way of communication because it reduces the confirmation process. It is a connectionless protocol that does not establish a connection with the other party, but directly sends the data packet to the other party. Therefore, compared with TCP/IP, UDP is relatively unreliable, but faster. For rapid prototyping of M2M projects, a very simple solution is to use UDP, because the UDP header contains very few bytes and consumes less payload than TCP. The biggest difference in protocols in IoT development is at the application layer of the OSI model. This layer specifies the interface methods in the communication network. How the system connects to the server and how the data is sent is determined by this layer. In fact, the most popular communication protocol is Hyper Text Transfer Protocol (HTTP). It is mainly used in web browsers. It runs on a client/server model, and the server responds to any client request. Because web pages may load a lot of content, it is necessary for this protocol to be built on top of the TCP/IP stack. MQ Telemetry Transport (MQTT) is a lightweight connection protocol for IoT applications. It uses a publish/subscribe approach to transmit data based on TCP/IP network connections. The design concept is open, simple, lightweight, and easy to implement, which also makes it an ideal platform for IoT development. MQTT has many useful features for IoT applications. In short, imagine a bulletin board where you can write or post anything at any time. At the same time, anyone who is interested in what you wrote can see it. MQTT has almost the same functionality. MQTT consists of two parts: the agent and the client. The client can access or modify the data of the device, and the agent holds and transmits the data. MQTT uses a publish/subscribe messaging model. A client can publish specific parameter data to a broker under a topic. Another client interested in this topic can subscribe to the topic and receive update messages regularly. MQTT provides a quality of service, which is essentially the prioritization of messages from an IoT perspective. In any case, an important message can be transmitted to the destination, so there is quality of service (QoS), although the transmission speed will be slower but the delivery is guaranteed. A dynamic data source prioritizes speed over efficiency, but assigns a lower QoS, more like a "fire-and-forget" event, such as UDP. MQTT can retain the last received message on a topic, provided it is sent to the subscriber and the subscription chain is started. This allows subscribers to connect asynchronously in an existing network of clients and brokers. This also provides a tool for checking redundancy and data loss. The MQTT client has a property called Last Will and Testament. This property allows the client to send a notification to the broker in the event of an abnormal interruption. This fast feedback is beneficial for the automatic regeneration of the wireless sensor network, while detecting and repairing missing nodes and outliers, and ultimately ensuring a perfect cycle of data flow in the wireless sensor network. CoAP is a network transmission protocol based on the REST model. It is mainly used for lightweight M2M communication. Since many devices in the Internet of Things are resource-constrained, that is, they only have a small amount of memory space and limited computing power, the traditional HTTP protocol is too large and inapplicable to the Internet of Things, so CoAP came into being. In terms of user visibility, CoAP emulates the HTTP protocol, and from this perspective, reading sensor data is essentially like making an HTTP request. CoAP is considered a future-proof technology protocol. According to Grtner's prediction, 50 billion devices will be connected to the Internet, and further development will urgently require low-cost, low-energy devices. The CoAP protocol is designed for systems with 10 kb of RAM. One of the more interesting features of CoAP is the ability to discover nodes in the network. This is very useful for autonomous and self-healing designs of low-power wireless sensor networks. Regarding the scalability issues of wireless sensor networks, the CoAP protocol can be used to discover the redundancy of node routines. CoAP is built on the UDP stack, which is the main difference compared to HTTP or MQTT. It can be faster and better resource-optimized, rather than resource-intensive. However, when the QoS factors remain unchanged under the CoAP protocol, CoAP is less reliable than HTTP/MQTT. However, the 4-byte header is a good choice for continuous streaming systems such as environmental monitoring sensor networks. |
<<: Animation explains TCP. If you still don’t understand, please hit me up
>>: Detailed explanation of TCP packet sticking, packet unpacking and communication protocol
Simply put, a "smart city" leverages em...
By 2025, there will be 5 billion cellular-connect...
Note: This article describes how to intelligently...
Ruijie Networks has always adhered to the concept...
At present, 5G integrated applications are in a c...
In the past two years, Alipay and WeChat payment ...
Software Defined Wide Area Networks (SD-WAN) are ...
Usually, you may encounter such a phenomenon duri...
On March 4, according to foreign media reports, m...
On October 24, the 2020 Hang Seng LIGHT Developer...
In April, RAKsmart offers a hot sale and regular ...
On June 6, 2019, the Ministry of Industry and Inf...
DMIT.io also launched a promotion during Black Fr...
Krypt is a foreign hosting company founded in 199...
Driven by market demand and the country's &qu...