Thursday, May 29, 2014

Twitter of Things

When explained the publish-subscribe mechanism of MQTT to the CEO, he understood it on his own way: "So, it's like a twitter of things?". Yes, exactly! That's a perfect analogy.

Devices publish messages, they do tweet, not necessarily even knowing who is listening to. Just like birds are twittering in the trees on my backyard. And then are subscribers "followers", who receive the messages from the sources they are interested in. And not necessarily all messages from one publisher, but only those with relevant topic "hashtag".

Publish-subscribe mechanism
In addition to publisher and subscriber, there exists broker in between, who does the book keeping of subscriptions and delivers messages to whom they belong to. Just like the Twitter service does. So you only receive tweets from those who you're following at. And not necessarily all the messages one publishes, but only those with relevant content "hashtag".

Tuesday, May 27, 2014

Bluemix

IBM is challenging the IoT market with it's new cloud offering.

Old mainframe servers and classical personal computer's from 80's are perhaps what many associate to the Big Blue. IBM has revised it's business strategy and is now focusing on software business only. MobileFirst and Internet of Things strategies as an example.

Last summer IBM acquired hosting company SoftLayer, and has invested to increase the network to cover 40 data centers worldwide. Since the acquisition, IBM has invested significantly to cloud software portfolio.

Bluemix illustration. Image source: IBM
Bluemix is IBM's Platform as a Service (PAAS) solution a top of SoftLayer's Infrastructure as a Service (IAAS). SoftLayer hosting is compatible with OpenStack specification. Bluemix provides CloudFoundry compatible cloud computing environment with simple web user interface for easy development and deployment.

At the moment, Bluemix is in beta, and available for developers free of charge. Commercial launch of the service is scheduled at summer. Pricing is not yet published. Bluemix represents a new software licensing model to IBM. Instead of initial investment and annual maintenance fee, customer pay per use (capacity), just like in case of popular hosting services.

The pay per use business model without initial license fee makes Bluemix cloud solution appealing to small enterprises and startups as well. As Bluemix is primarily intented for boosting sales of SoftLayer hosting, thus the price of the PAAS can not be significantly higher than the plain IAAS. As there is significant competition in the IAAS market, the pricing must be at competitive level.

Open APIs and open standards makes IBM offering appealing from developers and businesses point of view. Future maintainability and extendability is secured, and customer has freedom to choose preferred service provider without single-source vendor lock-in.

Tuesday, May 20, 2014

MQTT vs. WebSocket

WebSocket is good for browsers, but is it optimal for embedded connectivity?

WebSocket was initially created in order to provide browser a way to establish a full-duplex communication channel. It's the TCP socket of Web, as ordinary browser can not open a native TCP socket. WebSocket can be used for connectivity of embedded devices as well, but is it optimal for that purpose?

I have been looking for alternative solutions, but haven't found a satisfying one, until I got informed about MQTT. The acronyme stands for Message Queue Telemetry Transport, a protocol initially invented by IBM. The aim of the protocol can be expressed as follows:

"MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal of the emerging “machine-to-machine” (M2M) or “Internet of Things” world of connected devices, and for mobile applications where bandwidth and battery power are at a premium."

IBM and IoT, doesn't immediately sounds like they have anything in common. What does the Big Blue have to do here? Even if IBM is behind the protocol, it's not a single source proprietary stuff. Protocol specifications are published publicly, and a technical committee of OASIS organization is on it's way to standardize it. Not only to have an open specification, but to have an open standard, to emphasis open APIs.

What makes MQTT more suitable than WebSocket or HTTP REST API in context of Embedded Systems?
- MQTT provides publish/subscribe mechanism already in protocol level
- MQTT provides Quality of Service policy
- MQTT introduces minimal overhead in communication
- MQTT is designed for narrowband communication channel and constrained devices

What is still unclear to me and under investigation is what is the most feasible way of providing security in communication, and how does MQTT cope with firewalls. Once these questions are clear to me, I'm ready to favor MQTT over WebSocket in embedded connectivity.