官术网_书友最值得收藏!

Advantages to MQTT

  • Packet agnostic: Any type of data can be transported in the payload carried by the packet. The data could be text or binary. It does not matter as long as the receiving party knows how to interpret it.
  • Reliability: There are some Quality of Service (QoS) options that can be used to guarantee delivery.
  • Scalability: The publish/subscribe model scales well in a power-efficient way.
  • Decoupled design: There are several elements to the design that decouple the device and the subscribing server, which result in a more robust communication strategy.
  • Time: A device can publish its data regardless of the state of the subscribing server. The subscribing server can then connect and receive the data when it is able. This decouples the two ends of the communication on a time basis. Think of it like the ability to text someone on your phone. He can reply whenever he gets the chance. If you called him, he would have to be available to talk at the same time as you are. If you both are busy in meetings all day, you end up trading voicemails and the communication slows. This allows the devices to remain in sleepy states without having to worry about if the subscriber is able to receive the data at the time the device wakes up to communicate.
  • Space (delivery details): The publisher needs to know the broker IP address and how to communicate with it, but it does not need to know anything about the subscribers. Subscribers do not need to know the network connection details of the publisher. This keeps the communication overhead low on the device side (usually much more constrained in terms of power availability). It also allows both ends to operate independently. The subscriber can be changed or upgraded and additional subscribers added with no change needed on the publishing device end.
  • Synchronizing: Neither side has to pause what they are doing to communicate or receive a message. The process is asynchronous. There is no need to interrupt work in progress to publish a message.
  • Security: This is in both the advantage and disadvantage lists. You can have security with MQTT, which is why it is on the advantage list. Since MQTT operations over TCP, you can and absolutely should use the TLS/SSL encryption in the communication. But MQTT is natively unencrypted, which is why it is also in the disadvantage list - more about this will be explained later.
  • Bidirectional: A device can be both a publisher and a subscriber. In this way, it can receive commands by subscribing to a topic on the broker. It could also receive data from other devices that could be an input into the data it publishes. In practice, a hub and spoke model is typically the case.
  • Maturity: MQTT was invented by IBM with the first draft of the protocol in 1999 based on its MQSeries product (this is where the message queue part of the name comes from). It was released royalty free in 2010 and has since been donated as an open source project to the Eclipse foundation. It is in use by millions of connected products.
主站蜘蛛池模板: 琼海市| 县级市| 梨树县| 宁河县| 南丹县| 苏州市| 佛山市| 芷江| 呼玛县| 惠来县| 沂源县| 东至县| 潮安县| 德昌县| 临夏县| 沾益县| 伊吾县| 北票市| 吉林省| 晋中市| 渭南市| 林芝县| 凤山县| 玉环县| 新巴尔虎右旗| 惠安县| 平罗县| 株洲市| 苏尼特左旗| 乐清市| 桑植县| 烟台市| 寿阳县| 兰考县| 章丘市| 延寿县| 许昌县| 平乡县| 合阳县| 大同县| 双峰县|