- 《MQTT V3.1 Protocol Specification》 by IBM & Eurotech
- 《MQTT-S V1.2 Protol Specification》 by IBM
- 《Building Smarter Planet Solutions with MQTT and IBM WebSphere MQ Telemetry》 by IBM
As Linus said, read the fucking source code to learn how it works. In the same way, let's read the fucking protocol specification to learn outline and detail.
We are going to focus on topics below:
- What's MQTT?
- MQTT Features
- MQTT Use Cases
- MQTT Principle & Infrastructure
- MQTT Protocol Analysis
- MQTT Development
- MQTT Application Sample
In the following days, i'll expand each topic based on reading spec.
- What's MQTT?
Definition is described in Spec
"MQ Telemetry Transport(MQTT) is a lightweight broker-based publish/subscribe messaging protocol designed to be open, simple, lightweight and easy to implement."
"These characteristics make it ideal for use in constrained environments, for example, but not limited to:
* Where the network is expensive, has low bandwidth or is unreliable
* When run on an embedded device with limited processor or memory resources"
- MQTT Features
* Provide network connectivity based on TCP/IP
* Provide one-to-many message distribution based on publish/subscribe message pattern
* Minimum overhead & protocol exchanges in transport layer to reduce traffic
* Provide three qualities of service for messaging delivery:
# "At most once"
# "At least once"
# "Exactly once"
* Provide a complete mechanism for an abnormal disconnection notify
- MQTT Use Cases
Application
* Gaian DB a distributed database
* Location Aware Messaging for Accessibility, LAMA an IBM Extreme Blue Project
* Say It, Sign It (SiSi) an IBM Extreme Blue Project
Home Automation
* Andy SC's Twittering / Automated House
* Power monitoring
* Lighting control
* Gardening
* energy monitoring with an old-style analog ammeter
* Android/TV/Burglar detection system
* MQTT<>LLAP bridge example for the Ciseco OpenKontrol Gateway
* WarmDirt project to control soil temperature for plants (like potatoes!)
University/Research
* Southampton University LEGO microscope controller
* Messaging protocol applications research at CEIT, University of Queensland
* FloodNet Southampton University
* Smart Lab Southampton University
Mobile
* Facebook Messageer
Technical
* Filesystem sync
* Linux desktop notification applet in GNOME 2
* Ubuntu desktop notification using pynotify
* OS X desktop notifications using Grow!
* MQTT and Websocket thermometer
Just for Fun
* Christmas lights
* Mind controlled taxis
* Glowing rubber ducks
- MQTT Principle & Infrastructure
Figure: Publisher-Broker-Subscriber Pattern
Obviously, MQTT is built on TCP/IP and implement Publisher-Broker-Subscriber pattern. It means one publisher can easily achieve multicast functionality, which can be used in AD publish platform.
Infrastructure in MQTT has three parts:
* Broker Server. Basically, its job is to accept subscribers and re-transmit info from publisher to subscribers. In complex system, broker server can do more jobs related to data analysis and mining.
* Subscriber Client. In most of time, it listens to broker after subscribing and ready for handling incoming message.
* Publisher Client. In "Internet of Things" system, each device connected has the ability of sensor and can be triggered by events, which produces useful and important information to notify outside.
If subscriber and publisher are both integrated in an app, then it can work in duplex mode, which can listen to and notify outside.
- MQTT Protocol Analysis
... ...
- MQTT Development
... ...
- MQTT Application Sample
... ...
Definition is described in Spec
"MQ Telemetry Transport(MQTT) is a lightweight broker-based publish/subscribe messaging protocol designed to be open, simple, lightweight and easy to implement."
"These characteristics make it ideal for use in constrained environments, for example, but not limited to:
* Where the network is expensive, has low bandwidth or is unreliable
* When run on an embedded device with limited processor or memory resources"
* Provide network connectivity based on TCP/IP
* Provide one-to-many message distribution based on publish/subscribe message pattern
* Minimum overhead & protocol exchanges in transport layer to reduce traffic
* Provide three qualities of service for messaging delivery:
# "At most once"
# "At least once"
# "Exactly once"
* Provide a complete mechanism for an abnormal disconnection notify
* Provide one-to-many message distribution based on publish/subscribe message pattern
* Minimum overhead & protocol exchanges in transport layer to reduce traffic
* Provide three qualities of service for messaging delivery:
# "At most once"
# "At least once"
# "Exactly once"
* Provide a complete mechanism for an abnormal disconnection notify
Application
* Gaian DB a distributed database
* Location Aware Messaging for Accessibility, LAMA an IBM Extreme Blue Project
* Say It, Sign It (SiSi) an IBM Extreme Blue Project
Home Automation
* Andy SC's Twittering / Automated House
* Power monitoring
* Lighting control
* Gardening
* energy monitoring with an old-style analog ammeter
* Android/TV/Burglar detection system
* MQTT<>LLAP bridge example for the Ciseco OpenKontrol Gateway
* WarmDirt project to control soil temperature for plants (like potatoes!)
University/Research
* Southampton University LEGO microscope controller
* Messaging protocol applications research at CEIT, University of Queensland
* FloodNet Southampton University
* Smart Lab Southampton University
Mobile
* Facebook Messageer
Technical
* Filesystem sync
* Linux desktop notification applet in GNOME 2
* Ubuntu desktop notification using pynotify
* OS X desktop notifications using Grow!
* MQTT and Websocket thermometer
Just for Fun
* Christmas lights
* Mind controlled taxis
* Glowing rubber ducks
* Gaian DB a distributed database
* Location Aware Messaging for Accessibility, LAMA an IBM Extreme Blue Project
* Say It, Sign It (SiSi) an IBM Extreme Blue Project
Home Automation
* Andy SC's Twittering / Automated House
* Power monitoring
* Lighting control
* Gardening
* energy monitoring with an old-style analog ammeter
* Android/TV/Burglar detection system
* MQTT<>LLAP bridge example for the Ciseco OpenKontrol Gateway
* WarmDirt project to control soil temperature for plants (like potatoes!)
University/Research
* Southampton University LEGO microscope controller
* Messaging protocol applications research at CEIT, University of Queensland
* FloodNet Southampton University
* Smart Lab Southampton University
Mobile
* Facebook Messageer
Technical
* Filesystem sync
* Linux desktop notification applet in GNOME 2
* Ubuntu desktop notification using pynotify
* OS X desktop notifications using Grow!
* MQTT and Websocket thermometer
Just for Fun
* Christmas lights
* Mind controlled taxis
* Glowing rubber ducks
Figure: Publisher-Broker-Subscriber Pattern |
Infrastructure in MQTT has three parts:
* Broker Server. Basically, its job is to accept subscribers and re-transmit info from publisher to subscribers. In complex system, broker server can do more jobs related to data analysis and mining.
* Subscriber Client. In most of time, it listens to broker after subscribing and ready for handling incoming message.
* Publisher Client. In "Internet of Things" system, each device connected has the ability of sensor and can be triggered by events, which produces useful and important information to notify outside.
If subscriber and publisher are both integrated in an app, then it can work in duplex mode, which can listen to and notify outside.
... ...
... ...
... ...
没有评论:
发表评论