When you have been involved in web applications as long as I have, everything starts to fall into the paradigm of the ubiquitous and omnipresent HTTP way of doing things. You request something, and get a response. With something that general, how could it ever be wrong? But when you have worked on the amount of connected product projects that I have, you wouldn’t know how to survive without the publish/subscribe paradigm that flies in the face of the all-mighty HTTP request/response.
Bringing these paradigms to the non-computer world, imagine if you had to remember to request a new magazine every month instead of just subscribing to it? Not only would the magazine producer need to deal with all of the direct requests every month, but if you asked too soon, you might get two copies of the same magazine. Apply this to the world of IoT and imagine if you had to continually ask your smoke alarm if there is a fire in your house, or ask your car if there is engine trouble? A much more elegant way of handling these types of communications is to state what you are interested in by subscribing to it, and receiving published data on those topics. The best way to achieve this in IoT is to use a protocol called MQTT.
Being on either side of the request/response paradigm is not too much to ask of a modern browser, but it is a lot to ask of circuit board of chips amounting to less than a 100th of the computing resources resident in the machine you are reading this blog on. Not only do you get the benefits of not having to package up communications requests and responses, you get the benefits of publishing to many people at once, not having to manage who gets what as they have already been verified to receive that information. There are further benefits of the MQTT protocol that go beyond just the publish and subscribe mind shift that have solidified it as a front-runner for the defacto standard communication protocol for the IoT.
This is why we built Xively around our own customized MQTT broker that allows us to manage and deliver billions of messages to millions of devices in milliseconds. It gives us the scale and speed to support the needs of IoT. We let our MQTT broker do all the heavy lifting in the cloud to connect the smallest of devices and sensors. As you look to make modern web applications for IoT connectivity, I recommend you explore the power of this protocol.