当前位置:网站首页>学习太极创客 — MQTT(二)MQTT 基本原理
学习太极创客 — MQTT(二)MQTT 基本原理
2022-06-25 16:43:00 【xuechanba】
资料教程链接: http://www.taichi-maker.com/homepage/esp8266-nodemcu-iot/iot-tuttorial/mqtt-tutorial/2-mqtt-basics/
在MQTT协议通讯中,有两个最为重要的角色。它们分别是服务端和客户端。首先我们来初步了解一下它们。



下面,来看这样一个场景。
有人会问为什么汽车不直接将信息发送给手机或者电脑呢?
1、这是因为 MQTT 协议是通常应用与物联网的,物联网和互联网很大的区别之一就是物联网并不像互联网那样连接的那么稳定,可能物联网是由手机的数据网络所构成的,因此,如果当手机信号不好的时候,这个网络也就不稳定,在网络连接不稳定的情况下,如果让客户端之间互相直接发送信息,那么数据信息就会产生丢失的现象。于是,就增加了 MQTT 服务器。这个 MQTT 也就相当于是一个中转站的地方。
2、通常 MQTT 客户端(上图中的汽车)上所装载的负责发送 MQTT 信息的物联网模块的运算能力并不是很强,此外,在上图中的应用场景中,只有两个客户端接收汽车速度这一信息,但是实际应用中,可能有成千上万甚至更多的客户端会接收这一消息,因此,在这种情况下,如果用该物联网模块,是很难实现这么强的运算能力的。所以也就增加了 MQTT 服务器,其运算能力要远远大于实际客户端的物联网模块。

值得注意的是,MQTT 客户端在通讯时,往往角色不是单一的。它既可以作为信息发布者也可以同时作为信息订阅者。



边栏推荐
猜你喜欢

协议和分层次

SnakeYAML配置文件解析器

SMART PLC如何构造ALT指令

SnakeYAML配置文件解析器

通过深度可分离卷积神经网络对七种表情进行区分

Problems encountered in using MySQL

Using pywebio testing, novice testers can also make their own testing tools

2022-06-17 网工进阶(十)IS-IS-通用报头、邻接关系的建立、IIH报文、DIS与伪节点

3. conditional probability and independence

The problem of missing precision of kettle table input components
随机推荐
On Web 3.0
論文筆記:LBCF: A Large-Scale Budget-Constrained Causal Forest Algorithm
SDN系统方法 | 10. SDN的未来
Notes: lbcf: a Large Scale budget Constrained causal Forest Algorithm
SMART PLC如何构造ALT指令
XXIX - orbslam2 real-time 3D reconstruction using realsensed435
Tasklet API usage
pytorch官方文档学习记录
论文笔记:LBCF: A Large-Scale Budget-Constrained Causal Forest Algorithm
STM32 hardware error hardfault_ Handler processing method
Knowing these interview skills will help you avoid detours in your test job search
Sword finger offer 39 Numbers that occur more than half the time in the array
[micro service sentinel] overview of flow control rules | detailed explanation of flow control mode for source | < direct link >
六大专题全方位优化,阿里巴巴性能优化小册终开源,带你直抵性能极致
Difference between app test and web test
Vscode plug-in self use
WPF开发随笔收录-心电图曲线绘制
try with resource
[proficient in high concurrency] deeply understand the basics of assembly language
Redis系列——概述day1-1