In the last few years, we have seen a dramatic transformation of our personal and professional lives due to the ubiquitous use of the Internet. One critical underpinning of the Internet has been HTTP, a unique protocol that allowed the Internet to really take off and become part of our everyday lives.
I believe that the Internet (of people) that we see today might get dwarfed by the emergence of the Internet of Things (IoT) where devices and machines join the Internet. In the IoT, there will be many more “things” connected to the Internet than people.
The devices and machines around us are becoming progressively more instrumented and intelligent, and there is immense potential if the people and devices seamlessly connect and interact with each other.
But the IoT still lacks a widely accepted standard protocol. HTTP is not really ideal for many of its special needs, such as:
- Emitting information from one to many
- Listening for events whenever they may happen
- Distributing small packets of data in huge volumes
- Pushing information over unreliable networks
High sensitivity to
- Volume (cost) of data being transmitted
- Power consumption (battery-powered devices)
- Responsiveness (near real-time delivery of information)
- Security and privacy
HTTP versus MQTT
The table below offers a quick summary comparison of results from tests done between HTTPS and Message Queue Telemetry Transport (MQTT), one of the candidate protocols, from this blog post and webinar. The tests were done by sending and receiving 1024 messages of 1 byte each.
As the above sample data shows, HTTP:
- Uses more battery (percent battery/hour and percent battery/message)
- Is less reliable—note that only 240 (3G) / 524 (WiFi) messages were received out of a total of 1024 messages in the case of HTTP versus receiving all of the 1024 messages in the case of MQTT
- Is a lot slower (for example 1,708 messages/hour for HTTP versus 160,278 messages/hour for MQTT)
From this as well as other comparisons, it is quite clear that the search for the right protocol in the IoT is still an open topic. There are plenty of indications that there is a possibility to overcome many of the limitations of HTTP by adopting or creating a more suited solution for the IoT.
IoT protocol candidates
There are many IoT protocol candidates, and attempts are being made to standardize what protocol is used. Current candidates include the following:
- The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained networks and nodes for machine-to-machine applications such as smart energy and building automation.
- Extensible Messaging and Presence Protocol (XMPP) is an open technology for real-time communication, which powers a wide range of applications including instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication and generalized routing of XML data.
- Advanced Message Queuing Protocol (AMQP) is an open standard for passing business messages between applications or organizations. The key features of AMQP are message orientation, queuing, reliability and security.
- Representational State Transfer (REST) or RESTful HTTP is a style to use the existing features and capabilities of the web. REST does not invent new technologies, components or services. RESTful HTTP defines the principles and constraints to use the existing web standards in a better way.
- MQTT is a lightweight event and message-oriented protocol allowing devices to asynchronously communicate efficiently across constrained networks to remote systems.
While the search is on for the best fit, it may so happen that no single protocol fits all the needs of the IoT. Also, as Andy Piper (@andypiper), the community lead of MQTT.org, says, only the transport protocol is not enough. It has to be complemented with data formats, ontologies and semantics.
There are quite a few standardization attempts by various bodies, which include:
- OASIS MQTT Technical Committee
- Internet of Things-Architecture (IoT-A)
- Institute of Electrical and Electronics Engineers (IEEE) IoT Innovation Space
- Internet Engineering Task Force (IETF)
- World Wide Web Consortium (W3C) Semantic Sensor Net Ontology
We are living in interesting times, and I am excited to witness this metamorphosis.
Do you think one of these protocols would fit the needs of the Internet of Things better than others? I would love to hear from you if you have opinions or more information on this important area of technology, which I think will decide the success of the IoT. Please leave a comment below.
Follow Aditya on Twitter at @adityapdutta.