MQTT và HTTP : So sánh giữa 2 IoT Protocols

Features MQTT HTTP
Full form Message Queue Telemetry Transport Hyper Text Transfer Protocol
Architecture It has publish/subscribe architecture. Here devices can publish any topics and can also subscribe for any topics for any updates. It has request/response means Client/Server architecture.
Upper layer protocol It runs over TCP. It runs over TCP and UDP.
message size small, . Large,
Message format binary with 2Byte header ASCII format.
Data distribution 1 to 0/1/N one to one only , more POST
Data security Yes, It uses SSL/TLS for security NO, hence HTTPS is used to provide data security
Complexity Simple Client more complex (ASCII parser)
Encryption It encrypts payload i.e. it is payload agnostic data are not encrypted before transmission
When to use if your project is to let the fridge to communicate with the thermometer to adapt the engine pump, you can use the MQTT easily if you need to collect big data from around the world, then you can think to use HTTP

* https://iotdunia.com/mqtt-and-http/

  • Đo qua mạng 3G, MQTT nhanh hơn HTTP 93 lần
  • MQTT khá gọn, có header ngắn và gói thông điệp nhỏ nhất chỉ có 2 bytes.  Dùng thông điệp text của HTTP protocol cho phép tạo header và thông điệp dài hơn, dễ đọc với người nhưng đồng thời tiêu tốn tài nguyên của thiết bị một cách không cần thiết.
  • MQTT dễ dùng, kết nối với các thiết bị IoT dễ dàng trong khi HTTP có thể thu thập/gởi đi thông tin trong phạm vi internet

* https://medium.com/mqtt-buddy/mqtt-vs-http-which-one-is-the-best-for-iot-c868169b3105

Comments Off on MQTT và HTTP : So sánh giữa 2 IoT Protocols

Filed under Software

Comments are closed.