Quantcast
Channel: Recent Discussions — Advantech IoT Developer Forum
Viewing all articles
Browse latest Browse all 263

浅论MQTT通讯协议

$
0
0

MQTT 作为MQ遥测的前身,是为了物联网环境而设计的发布/订阅模式消息传输协议,它所需要的网络带宽低也因此它能在受限的环境中,如机器与机器的通信(M2M),让客户端使用最少的硬件资源,达到传送大量讯息的需求。

About MQTT

In IoT applications, devices often must communicate with each other (D2D). Device data is then must be collected and sent to the server infrastructure (D2S). That The server infrastructure has to share device data (S2S), possibly providing it back to devices, to analysis programs, or to people. The communication protocols can be described in this framework as:
• MQTT: a protocol for collecting device data and communicating it to servers (D2S)
• XMPP: a protocol best for connecting devices to people, a special case of the D2S pattern, since people are connected to the servers
• DDS: a fast bus for integrating intelligent machines (D2D)
• AMQP: a queuing system designed to connect servers to each other (S2S)

MQTT(MQTT (formerly MQ Telemetry Transport) is a publish-subscribe based "light weight" IoT communication protocol for use on top of the TCP/IP protocol. The publish-subscribe messaging pattern requires a message broker. The broker is responsible for distributing messages to interested clients based on the topic of a message.

MQTT has the following properties :properties:
1. Based on TCP/IP for basic network connection
2. Small code foot print
3. Three different message service qualities
a. “At most once”
b. “At least once”
c. “ExaclyExactly once”
4. 2- byte header to reduce package transfer loading
5. It has “LLast ast will and testament” to notifiesy client ifwhen connection is lost connection.
6. Provides Publishpublish/-Subscribe subscribe structure to provide one- to- many message sharing.

Publisher is the source of the message, it which will passes data to Topic, and Subscriber will registers for in Topic to get Topic data form Topic.
So when , if some a Publisher sent sends a message to topicTopic, all registered Subscribers registered for that Topic will get this that message.

Based on these properties, especially “Small small code foot print” and “Publishpublish-/sSubscribe structure”, WISE-PaaS/RMM uses MQTT as the communication protocol to connect between agents(agents (gateway/devices device side) and servers(servers (back-end/cloud side). On the device side, the agent will collect data with different structures or protocols, and transfer it to MQTT. After this process, device data from devices will hasve the same form and be is kept in the WISE-PaaS/RMM server database of WISE-PaaS/RMM server. The IoT developer can create their applications based on WISE-PaaS server web-services(services (RESTful API).


Viewing all articles
Browse latest Browse all 263