Article source: www.phodal.com/blog/iot-pr…

In the previous Iot resource set, we did a comparison of these four more commonly used protocols. Also after our iot protocol test platform went live, the only regret, to be brief, is that XML is not supported. I really don’t like XML, and parsing XML can be painful for embedding multiple devices.

Internet of Things Protocol

Protocol CoAP XMPP RESTful HTTP MQTT
Transport UDP TCP TCP TCP
Messaging Request/Response Publish/Subscribe Request/Response Request/Response Publish/Subscribe Request/Response
2G, 3G, 4G Suitability (1000s nodes) Excellent Excellent Excellent Excellent
LLN Suitability (1000s nodes) Excellent Fair Fair Fair
Compute Resources 10Ks RAM/Flash 10Ks RAM/Flash 10Ks RAM/Flash 10Ks RAM/Flash
Success Storied Utility Field Area Networks Remote management of consumer white goods Smart Energy Profile 2 (premise energy management/home services) Extending enterprise messaging into IoT applications

Internet of Things protocol XMPP

XMPP is a protocol based on XML, a subset of the Standard Common Markup Language, which inherits the flexibility of development in an XML environment. Therefore, APPLICATIONS based on XMPP have super scalability. The extended XMPP can handle user needs by sending extended information and building applications such as content delivery systems and address-based services on top of the XMPP. Moreover, XMPP includes a software protocol for the server side that allows it to talk to one another, making it easier for developers to build client applications or add functionality to a ready-made system.

Internet of Things protocol MQTT

MQTT (Message Queuing Telemetry Transport) is an instant messaging protocol developed by IBM, which has the potential to become an important part of the Internet of Things. The protocol supports all platforms, connects almost any connected object to the outside world, and is used as a communication protocol for sensors and actuators (such as connecting homes via Twitter).

Internet of Things protocol CoAP

CoAP stands for Constrained Application Protocol. In the next few years, experts predict that more devices will be connected to each other, and that the number of these devices will far exceed the number of humans. In this context, the Internet of Things and M2M technology came into being. While it may seem convenient and easy for people to connect to the Internet, it is very difficult for tiny devices to do so. In today’s PC-powered world, information exchange is implemented through TCP and the application layer protocol HTTP. But for small devices, implementing TCP and HTTP is obviously too much to ask. To enable small devices to access the Internet, the CoAP protocol was designed. CoAP is an application-layer protocol that runs on top of UDP rather than TCP like HTTP. CoAP protocol is very small, the smallest packet is only 4 bytes.

Internet of Things protocol RESTful HTTP

REST refers to a set of architectural constraints and principles. An application or design that satisfies these constraints and principles is RESTful.

 

The most important REST principle for Web applications is that the interaction between client and server is stateless between requests. Each request from the client to the server must contain the information necessary to understand the request. If the server restarts at any point between requests, the client is not notified. In addition, stateless requests can be answered by any available server, which is ideal for environments such as cloud computing. Clients can cache data to improve performance.

other

MQTT protocol is promoted by IBM. In the current situation, MQTT has advantages over XMPP and RESTful. If we did a PK of the above results, I think the final result would be MQTT vs CoAP. HTTP is too heavy and inflexient for embedded devices, let alone XMPP, and the only alternative to MQTT is CoAP, a protocol still in draft form.

www.phodal.com/blog/coap-m…

Write another article comparing MQTT with CoAP, the two most likely protocols for the Internet of Things.

The MQTT protocol

Advantages of MQTT protocol

  • Many-to-many communication protocol
  • Supported by IBM, Eurotech, Cisco and Red Hat, among others
  • open
  • Open source

Disadvantages of the MQTT protocol

  • No message identification (hard to understand).
  • You must be familiar with message formats to communicate.

CoAP protocol

Advantages of CoAP

  • URI and Content-Type support
  • Open standards
  • Designed for Web services interoperability/easy conversion to HTTP
  • Can be used in a variety of different packet-based communication protocols
  • Supported by Contiki and other companies (organizations)

CoAP shortcomings

  • Use devices that can support UDP and UDP emulation, limiting it to a wide range of devices
  • Mostly one-to-one protocols (and some looking for more advanced communication protocols)

\