|Featured Blog Entries|
An introduction to the MQTT transport for Mobile Messaging & M2M
j0nnymac 120000F9BQ Visits (7720)
Learn about the messaging capabilities that MQ telemetry transport (MQTT) brings to mobile platforms and devices. It’s a lightweight protocol designed to minimize network traffic and quickly and simply bring the reliability of messaging applications written for these environments.
MQTT can be used for mobile apps and also for telemetry and sensor machine-to-machine (M2M) apps.
For apps running on mobile devices, such as smartphones and tablets, MQTT offers a highly scalable publish/subscribe protocol with assured delivery. This saves the mobile app developer having to deal with connectivity logic for their application. Large numbers of mobile apps can connect into the enterprise using MQTT coming into a WebSphere® MQ server. See Servers for Mobile Messaging & M2M.
Telemetry is the automated sensing, measurement of data, and control of remote devices. The emphasis is on the transmission of data from devices to a central control point. Telemetry also includes sending configuration and control information to devices.
An MQTT app can connect these small and often remote devices using the MQTT protocol. WebSphere MQ bridges between devices connected with the MQTT protocol and the enterprise. The bridge makes it easier to build "smart solutions". Smart solutions unlock the wealth of information that can be provided to business by integrating this sensor and device information with the rest of the business. Two examples of smart applications based on telemetry are smart electricity, and smart health services.
Figure 1. Smart electricity metering
Figure 2. Smart health monitoring
The C and Java libraries run on iOS, Android, Windows, and a number of UNIX and Linux platforms. You can port the C source code for the MQTT client library to other platforms. The MQTT client libraries for C and Java are available with an open source license from the Eclipse Paho project. See Eclipse Paho. The MQTT protocol specification is open, and available from MQTT.org.
The MQTT protocol is lightweight in the sense that clients are small, and it uses network bandwidth efficiently. The MQTT protocol supports assured delivery and fire-and-forget transfers. In the protocol, message delivery is decoupled from the application. The extent of decoupling in an application depends on the way an MQTT client and MQTT server are written. Decoupled delivery frees up an application from any server connection, and from waiting for messages. The interaction model is like email, but optimized for application programming.
The MQTT V3.1 protocol is a fully published specification that was jointly authored by IBM and Eurotech; see MQTT V3.1 Protocol Specification. The specification identifies a number of distinctive features about the protocol:
MQTT version 3.1 is supported by IBM WebSphere MQ and IBM MessageSight.
This developerWorks® Messaging community is a good start point for MQTT developers that are writing applications for mobile platforms or telemetry devices.
MQTT.org is a good place to go to learn about and discuss implementations and extensions to the MQTT protocol.