Thursday 4 February 2016

Internet Of Things - Beginners Learning - Part 2 - The MQTT

Hey Guys, In the previous post I just gave an overview about IoT and its Development Tools. Let us narrow down the discussion to a simple MQTT Sub-Pub mechanism.

An MQTT protocol is similar to a Google Alerts mechanism where you go to google alerts page and you subscribe for a topic and the message is delivered whenever there is any information on the topic you have subscribed.

Fine !! sound and clear I hope. 

First of all to work with MQTT you need three hardware components in the MQTT verbose it is 

  1. Broker
  2. Publisher
  3. Subscriber
Let us take facebook as an example and understand this concept.
  1. Broker - Facebook server
  2. Publisher - Is your Crush in facebook. 
  3. Subscriber - Is you
Still creepy !!? Lemme explain Let us say you want to know all the activities of your crush in facebook like their like, post, tags etc. what you will do? you just visit their profile and mark them as your favorites. Ultimately the facebook server sends you the notification on your phone whenever your crush do any post or likes some one photos.

Here you have subscribed for your crush activities and the facebook server, the broker is sending the data whenever your  crush does any activities . Simple right ? that is MQTT

Who can be the publisher, the broker ,the subscriber?
Well anyone who is capable of holding huge number of requests can be a broker 
Apart from this any device which can be both subscriber and publisher of data.

The image below will clearly explain 



  1. The shoe will tell you how much kilometers you have covered by foot.
  2. The light may tell you how much electricity it has consumed.
  3. The Temperature sensor might tell you when to switch of the AC or it might take control of the AC or whatever.
  4. Your delivery truck may send you timely updates on its position.
  5. Your wrist band may tell you how fast your hear beats. or you can set alarm in a wristband so when the correct time ticks in your phone it sends the message to wrist band to vibrate. 

Cool to hear Right !!!??  

I will explain you how to start programming these devices from my next post.... 

Think Iot!!!!!!!!!!!!!


No comments:

Post a Comment