Monday, May 11, 2015

MQTT in a Nutshell


MQTT stands for MQ Telemetry Transport. In a nutshell, it is a light weight event and message oriented protocol allowing devices to asynchronously communicate efficiently across constrained networks to remote systems. 

MQTT was invented before 13 years ago. The idea of this protocol is to get the data from the sensors, actuators, embedded controllers to a centralised data base system. Also this deals with how to get the control messages to these devices. In short, this is about connecting the traditional physical world devices to the IT infrastructure. 

Below are few design goals of MQTT 

1. To make it simple to connect the M2M (physical) world to the traditional IT world 
2. Expect and cater for frequent network disruption - built for low bandwidth, high latency, unreliable, high cost network (cost per byte) 
3. Expect client applications may have very limited resources available (8 bit controller, 256 kb ram)
4. Provide loose coupling to support dynamic system environments where high volumes of physical world messages and events needs to be made available to enterprise servers and other consumers in ways that may not have been originally anticipated. 
5. Provide multiple deterministic message delivery qualities of service to reflect tradeoffs between bandwidth, availability, and delivery gurantees
6. Capable of supporting large number of devices (10k MQTT clients) 
7. Simple for application developers and implementation of the protocol. 
8. Publish the protocol for ease of adoption by device vendors and third party client software enabling support for a proliferation of platforms, technologies and networks that are driven by very diverse equations of cost, technology and physical constraints. 
9 To be industry agnostic. 

MQTT is a publish subscribe messaging mechanism. 

A producer sends (publishes) a message (publication) on a topic (subject) 
A consumer subscribes (makes a subscription) for messages on a topic (subject) 

A message server / broker matches publications to subscriptions 
- if no matches the message is discarded 

- if one or more matches the message is delivered to each matching subscriber or consumer. 

references: 
https://www.youtube.com/watch?v=-KNPXPmx88E

No comments:

Post a Comment