Approaching the IoT world, there are many protocols we can use to communicate IoT devices. However there are many protocols such as AMQP, CoAP, MQTT and the omnipresence HTTP. In short in the practical world, we can shortly compare two of them: MQTT and HTTP
MQTT
MQTT stands for Message Queuing Telemetry Transport.
It’s a light weight publish/subscribe protocol designed for M2M (Machine to Machine) telemetry in low bandwidth environments. Initially MQTT was designed by IBM and Arcon in 1999 for Oil Pipeline Telemetry Systems over the satellites. Nowadays MQTT is one of the main messaging protocols of the Internet of Things.
This protocol is thus light-weight that it is often supported by some of the littlest measure and monitoring devices, and it can transmit information over way reaching sometimes intermittent networks.
It is a publish/subscribe messaging transport protocol that’s optimized to connect physical world devices and events with enterprise servers and different customers.
This protocol is designed to overcome the challenges of connecting the rapidly increasing physical world of sensors, actuators, phones, and tablets with established code process technologies.
These principles additionally prove to make this protocol ideal for the rising M2M or IoT world of connected devices where information measure and battery power are at a premium.
1.Fast transaction rates
2.Consistent lower latency
3.Extensive scaling within the range of co-occurring devices that may be connected
4.Suitable for deployment in a DMZ (demilitarized zone)
MQTT PROTOCOL APPLICATIONS:
- MQTT used by Facebook Messenger :
It is best for mobile messaging; the low bandwidth nature of the protocol and the small footprint help to minimize both battery use and network traffic. Just what you want to stay connected.
This protocol is specifically designed for applications like sending telemetry data to and from space probes, so it is designed to use bandwidth and batteries sparingly.
In Facebook Messanger, an MQTT connection and routing messages are maintained through chat pipeline. Therefore messenger was able to often achieve phone-to-phone delivery in the hundreds of milliseconds, rather than multiple seconds.
2. MQTT based android application
This application is used to initiate/receive alerts on certain scenarios.
With the help of MQTT clients, the alerts are received in the mobile application, which then influences the received MQTT message and presents it to the user in desired formats.
The same message is delivered to other hardware devices which have subscribed to the same topic i.e. the same message can be received in the mobile application as well as in the hardware device.
As a result either of mobile application or hardware device can influence the recieved data and present them to client in the desired format
3. Home Automation
Using MQTT protocol we can control home lighting.
MQTT has much more application, you can get more about this protocol at mqtt.org
REFER HERE to learn more about MQTT protocol
HTTP
HTTP stands for Hyper Text Transfer Protocol
Most of us know about this, HTTP connection between client (web user) and the web server.
It is the commonly use protocol for the Internet, can be the most use for IoT devices that need to publish a lot of data. Meanwhile, it use normal IP header for routing of packets and data is not encrypt before transmission.
REFER HERE to compare the performance test of MQTT vs HTTP
REFER HERE to learn more about HTTP protocol