【MQTT入门】基础——介绍MQTT

原文:Introducing the MQTT Protocol - MQTT Essentials: Part 1

参考:MQTT Version 3.1.1

简介

MQTT(Message Queuing Telemetry Transport)是一个基于 客户端-服务器 消息发布/订阅 传输协议。它轻量、简单、开放和易于实现。这些特点使它适用范围非常广泛。在很多情况下,包括受限的环境中,如:机器与机器(M2M)通信和物联网(IoT)等较小的代码空间或较低的通信开销环境。

它是一种非常轻量的二进制协议,由于其最小的数据包开销,MQTT在通过有线传输数据时优于HTTP等协议。该协议的另一个重要方面是MQTT非常容易在客户端实现。易用性是MQTT开发中的一个关键问题,它非常适合今天资源有限的受限设备。

简史

MQTT协议由Andy Stanford Clark(IBM)和Arlen Nipper(Arcom,现为Cirrus Link)于1999年发明。他们需要一个协议,将电池损耗降至最低,并将通过卫星与输油管道连接的带宽降至最低。两位发明人为未来的协议规定了几项要求:

  • 实现简单,精简,不添加可有可无的功能
  • 服务数据交付质量
  • 轻量和高带宽效率(把低带宽、高延迟、不稳定的网络等因素考虑在内)
  • 假设数据不可知,不强求传输数据的类型与格式
  • 持续会话感知

时至今日,这些目标仍然是MQTT的核心。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MQTT Essentials - A Lightweight IoT Protocol by Gaston C. Hillar English | 14 Apr. 2017 | ASIN: B01MS9I105 | 280 Pages | AZW3 | 6.19 MB Key Features Make your connected devices less prone to attackers by understanding practical security mechanisms Dive deep into one of IoT's extremely lightweight machines to enable connectivity protocol with some real-world examples Learn to take advantage of the features included in MQTT for IoT and Machine-to-Machine communications with complete real-life examples Book Description This step-by-step guide will help you gain a deep understanding of the lightweight MQTT protocol. We'll begin with the specific vocabulary of MQTT and its working modes, followed by installing a Mosquitto MQTT broker. Then, you will use best practices to secure the MQTT Mosquitto broker to ensure that only authorized clients are able to publish and receive messages. Once you have secured the broker with the appropriate configuration, you will develop a solution that controls a drone with Python. Further on, you will use Python on a Raspberry Pi 3 board to process commands and Python on Intel Boards (Joule, Edison and Galileo). You will then connect to the MQTT broker, subscribe to topics, send messages, and receive messages in Python. You will also develop a solution that interacts with sensors in Java by working with MQTT messages. Moving forward, you will work with an asynchronous API with callbacks to make the sensors interact with MQTT messages. Following the same process, you will develop an iOS app with Swift 3, build a website that uses WebSockets to connect to the MQTT broker, and control home automation devices with HTML5, JavaScript code, Node.js and MQTT messages What you will learn Understand how MQTTv3.1 and v3.1.1 works in detail Install and secure a Mosquitto MQTT broker by following best practices Design and develop IoT solutions combined with mobile and web apps that use MQTT messages to communicate Explore the features included

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值