Realtime Mobile and IOT Solutions Using MQTT 
Ravi Katikala ITS, WebSphere Technical Sales Chris Baker ITS, WebSphere Technical Sales
The Compelling Experience 
•Information is relevant and contextual 
•Data arrives when you need it, not when you ask for it 
•The app provides a collaborative, social experience 
•Services are integrated seamlessly together 
•“response time = revenue” 
What makes an application delight to use?
The World is Changing…
New Customer Interaction Points for the 21st Centuty Devices & Mobiles will be the touch points that drive new revenue streams
MQTT for Mobile Messaging and IOT 
•Publish/subscribe messaging protocol designed for mobile and telemetry devices 
•Open (royalty-free), simple, lightweight, easy to implement 
•Allows for decoupled applications (“Internet of Things”) 
•Quality of service for assured message delivery 
•MQTT clients connect to an MQTT broker 
What is it? 
•Connected vehicles (ex. Sprint Velocity) 
•Connected cities (ex. NYPD ESU) 
•Connected people (ex. Facebook Messenger) 
•...and everywhere else 
Where is it?
Why MQTT? 
•Publish/subscribe messaging 
–Transmit information one to many 
–Subscribe to interesting topics 
–Distribute small data packets in huge volumes 
•" Quality of Service (QoS) for assured messaging 
–“At most once”, “At least once”, “Exactly once” 
•" Simple API 
–3 verbs: Connect, Publish, Subscribe (+ Receive) 
–Useful features: Last Will and Testament, Retain 
–Clients everywhere (40+) 
•JavaScript, C, C++, Python, Node.js, Java, Ruby, etc. 
•" Lightweight 
–2-byte header, low latency 
–Mobile (LTE) = ~100ms, Browser (Wifi) = ~50ms (RTT)
7 
Simplifies “Internet of things”, connected car, and mobile 
Designed for millions things, millions of events 
Very dense, very green technology 
m2m engineered for wireless, with low latency, reliable delivery and quality of service 
93x faster, 10x less battery, 8x lower bandwidth versus HTTPS 
Source: http://stephendnicholas.com/archives/1217 
IBM MessageSight appliance for MobileFirst & M2M
pub / sub 
MQTT 
HTML5 WebSocket 
IBM MessageSight 
Content 
Insurers 
OEM Apps 
MQ 
WebSocket & MQTT 
InfoSphere Streams 
IBM MessageSight for mobile and m2m 
millions of connections 
million of events 
very dense, very green 
1 appliance ~ 50+ Web Servers 
1 rack = 1,000 web servers 
93x faster messaging on mobile 
11.89x less battery to send 
170.9x less battery to receive 
8x less wireless overhead 
50μs app-to-app on fast network
IBM Messaging Appliance: Capabilities 
Hours not Weeks 
Deploy 
Orders of Magnitude 
Improvements 
Performance 
What you expect from IBM 
Simple Programming 
Model 
Friendly 
Open Standards 
DMZ-ready Messaging Appliance 
Persistent messaging performance 
 400K to 600K+ messages/second 
Non persistent messaging performance 
 16.2 M+ messages per second 
Number of concurrent connections 
 1M+ Connections 
Predictable latency under load (microseconds) for all connections 
Easy to High 
Reliable 
Developer 
Easy to Integrate 
Secure 
9 
11/2/2014 
Sprint - Pub / Sub Overview & MQTT 
9
Hours not Weeks 
Deploy 
Orders of Magnitude 
Improvements 
Performance 
What you expect from IBM 
Simple Programming 
Model 
Friendly 
Open Standards 
DMZ-ready Messaging Appliance 
Reliability 
Supports both persistent and non-persistent messaging 
Supports local transactions 
The appliance supports all 3 qualities of service defined in MQTT 
Bi-directional mapping of edge reliability and enterprise reliability 
Resilience 
Maintains two copies of recoverable objects, in volatile and non-volatile storage, but availability can be improved using HA feature 
High Availability/Disaster Recovery 
Supports high availability using a pair of appliances 
Updates to primary persistent store synchronously replicated to warm standby 
Primary and warm standby connected initially via RoCE 
It is possible to switch to TCP beyond subnets 
Easy to High Reliable 
Developer Easy to Integrate 
Secure 
10 
11/2/2014 
Sprint - Pub / Sub Overview & MQTT 
10 
IBM Messaging Appliance: Capabilities
Hardened Appliance Form Factor suitable for DMZ 
Secure firmware (signed and encrypted, sealed with TPM 
No user-visible, general purpose OS (no shell) 
No routing across network interfaces; ports must be explicitly enabled 
Admin security is role-based 
SSL /TLS 1.2 mutual authentication support for MQTT/JMS/MQ connections 
Federal Information Processing Standard (FIPS) 140-2 Level 1 certified cryptographic module 
Authentication via on-board repository of external LDAP 
Authorization is by rules in profiles and policies 
Hours not Weeks 
Easy to Deploy 
Orders of Magnitude 
Improvements 
High 
Performance 
What you expect from IBM 
Reliable 
Simple Programming 
Model 
Developer Friendly 
Open Standards 
Easy to Integrate 
DMZ-ready Messaging Appliance 
Secure 
User / Group, Client Identifier, Protocol, Network Interface, Listening Address / Port, Client IP / IP Address Range, Destination (topic, topic tree, queue) 
11 
11/2/2014 
11 
Restrict Access by: 
IBM Messaging Appliance: Capabilities
Hours not Weeks 
Easy to Deploy 
Orders of Magnitude 
Improvements 
High 
Performance 
What you expect from IBM 
Reliable 
Simple Programming 
Model 
Developer 
Friendly 
Open 
Standards 
Easy to Integrate 
DMZ-ready Messaging Appliance 
Secure 
Simple, powerful APIs consistent across multiple platforms 
Active messaging community on developerWorks 
Support for Mobile Application development 
Native Android and iOS MQTT libraries 
Browser-based: simple JavaScript (connect, subscribe, publish) plus HTML5 Websockets – bi-directional communication 
MQTT protocol – efficient pub/sub protocol designed for M2M 
Java Messaging Service: Pt-to-pt & pub-sub over high speed protocol 
Integrated with IBM Worklight 
Cloud-based demo systems for rapid prototyping 
12 
11/2/2014 
Sprint - Pub / Sub Overview & MQTT 
12 
IBM Messaging Appliance: Capabilities
Hours not Weeks 
Easy to Deploy 
Orders of Magnitude 
Improvements 
High 
Performance 
What you expect from IBM 
Reliable 
Simple Programming 
Model 
Developer 
Friendly 
Open 
Standards 
Easy to Integrate 
DMZ-ready Messaging Appliance 
Secure 
Compatible with a variety of application environments 
Standard Enterprise environments – JMS point-to-point, publish-subscribe 
Web Environment - compatible with Rich Internet Applications (WebSockets) 
(Mobile) javascript applications 
Connectivity with MQ, MQTT 
Appliance MQ connectivity service connects to Queue Managers 
Destination mappings to/from MQ queues/topics, optional wildcards 
Publication arriving on a topic can be republished to MQ & vice versa 
13 
11/2/2014 
Sprint - Pub / Sub Overview & MQTT 
13 
IBM Messaging Appliance: Capabilities
Hours not Weeks 
Easy to Deploy 
Orders of Magnitude 
Improvements 
High 
Performance 
What you expect from IBM 
Reliable 
Simple Programming 
Model 
Developer 
Friendly 
Open 
Standards 
Easy to Integrate 
DMZ-ready Messaging Appliance 
Secure 
Designed to be configured and running in 30 minutes 
Appliance form-factor simplifies physical installation 
DMZ ready 
Minimal configuration options 
Fast time-to-value 
Designed to support high numbers of connections 
Scalable admin based on policies/profiles, not objects 
Simple Web UI (dashboard) and CLI (Command Line Interface) 
14 
11/2/2014 
Sprint - Pub / Sub Overview & MQTT 
14 
IBM Messaging Appliance: Capabilities
Mobile – where efficiency matters 
•With “mobile messaging” your mobile apps are: 
–Faster than your competitors 
–Makes PhoneGap and Worklight faster, use less battery and bandwidth 
–MQTT is in Facebook Messenger 
•Low-latency phone-to-phone messaging 
–Get started with MQ: Benchmarked 240K concurrent users per queue manager at <5% CPU 
•10x more users than Apache web server handles. 
•240K wasn’t the limit – ran out of clients 
•MQTT versus HTTPS on Android 3G: 
–93x higher throughput and much lower latency 
–1/10th the bandwidth overhead. 
–179x lower battery use for receiving messages (high volume) 
–10x lower battery use for sending messages 
–50% lower battery for push connections (240 sec keep-alive) 
11/2/2014 
WebSphere Connectivity & Integration 
15
Native 
HTML, CSS, JavaScript 
Worklight API 
Worklight Hybrid app - HTML5, CSS, JavaScript, Images 
Device APIs 
Worklight Javascript API 
Common Controls 
Device API 
Worklight API 
messaging javascript 
MQTT plugin 
m2m MQTT PhoneGap plugin built on IBM contributed eclipse paho eclipse.org/paho 
MQTT for JavaScript 
JavaScript to native Bridge (PhoneGap) 
16 
IBM MessageSight with MobileFirst Worklight
Solution Examples 
3.Unlock command sent to car, door unlocks 
1.Owner pushes start button on app 
2. Sprint authenticates user 
SPRINT VELOCITY℠ 
“Key-fob “ response time & Driver preferences in the cloud 
Connected car 
“Now, Sprint's newly announced partnership with IBM will allow connected vehicles to communicate with other connected devices while using far less bandwidth and power.” says Bob Johnson, director of connected vehicle development at Sprint 
“Based on IBM MessageSight, the Sprint Velocity Service Bus is a new communications architecture that lets smartphones, tablets and other devices communicate through the cloud.” 1 
Press Release: http://www-03.ibm.com/press/us/en/pressrelease/41441.wss 1 M2M Evolution Magazine: http://bit.ly/1dCBA7M video
18 
Applications 
ESB 
Events 
Subscribe / Publish 
JMS / MQTT / WebSockets 
SMARTER CITIES 
traffic monitoring and control 
MOBILE BANKING Event notification Data gathering Collaboration Payments 
BUSINESS ANALYTICS 
Business agility 
Responsiveness 
ENERGY/UTILITY metering (energy, temperature) Control Intelligent prediction Analytics and broking 
Other Use Cases for Mobile and Machine-to-Machine 
VEHICLES Telematics Monitoring/recall Security Routing 
HEALTHCARE 
Patient monitoring, 
Automated patient records 
Pub / Sub and Point-Point 
11/2/2014 
18 
CUSTOMER SERVICE 
Private Instant Messaging 
across channels
References 
•“MobileFirst Connected Car” Demo 
–http://m2m.demos.ibm.com/connectedCar.html 
–iPad optimized with map, inbox, speed test, settings 
•HTML5 http://m2m.demos.ibm.com 
–just cars on a map without the frills 
•Redbook: Building Real-time Mobile Solutions with MQTT and IBM MessageSight 
–http://www.redbooks.ibm.com/Redbooks.nsf/RedpieceAbstracts/sg248228.html?Open 
•Redbook: Responsive Mobile User Experience using MessageSight 
–http://www.redbooks.ibm.com/abstracts/sg248183.html?Open
Questions?

Realtime mobile&iot solutions using mqtt and message sight

  • 1.
    Realtime Mobile andIOT Solutions Using MQTT Ravi Katikala ITS, WebSphere Technical Sales Chris Baker ITS, WebSphere Technical Sales
  • 2.
    The Compelling Experience •Information is relevant and contextual •Data arrives when you need it, not when you ask for it •The app provides a collaborative, social experience •Services are integrated seamlessly together •“response time = revenue” What makes an application delight to use?
  • 3.
    The World isChanging…
  • 4.
    New Customer InteractionPoints for the 21st Centuty Devices & Mobiles will be the touch points that drive new revenue streams
  • 5.
    MQTT for MobileMessaging and IOT •Publish/subscribe messaging protocol designed for mobile and telemetry devices •Open (royalty-free), simple, lightweight, easy to implement •Allows for decoupled applications (“Internet of Things”) •Quality of service for assured message delivery •MQTT clients connect to an MQTT broker What is it? •Connected vehicles (ex. Sprint Velocity) •Connected cities (ex. NYPD ESU) •Connected people (ex. Facebook Messenger) •...and everywhere else Where is it?
  • 6.
    Why MQTT? •Publish/subscribemessaging –Transmit information one to many –Subscribe to interesting topics –Distribute small data packets in huge volumes •" Quality of Service (QoS) for assured messaging –“At most once”, “At least once”, “Exactly once” •" Simple API –3 verbs: Connect, Publish, Subscribe (+ Receive) –Useful features: Last Will and Testament, Retain –Clients everywhere (40+) •JavaScript, C, C++, Python, Node.js, Java, Ruby, etc. •" Lightweight –2-byte header, low latency –Mobile (LTE) = ~100ms, Browser (Wifi) = ~50ms (RTT)
  • 7.
    7 Simplifies “Internetof things”, connected car, and mobile Designed for millions things, millions of events Very dense, very green technology m2m engineered for wireless, with low latency, reliable delivery and quality of service 93x faster, 10x less battery, 8x lower bandwidth versus HTTPS Source: http://stephendnicholas.com/archives/1217 IBM MessageSight appliance for MobileFirst & M2M
  • 8.
    pub / sub MQTT HTML5 WebSocket IBM MessageSight Content Insurers OEM Apps MQ WebSocket & MQTT InfoSphere Streams IBM MessageSight for mobile and m2m millions of connections million of events very dense, very green 1 appliance ~ 50+ Web Servers 1 rack = 1,000 web servers 93x faster messaging on mobile 11.89x less battery to send 170.9x less battery to receive 8x less wireless overhead 50μs app-to-app on fast network
  • 9.
    IBM Messaging Appliance:Capabilities Hours not Weeks Deploy Orders of Magnitude Improvements Performance What you expect from IBM Simple Programming Model Friendly Open Standards DMZ-ready Messaging Appliance Persistent messaging performance  400K to 600K+ messages/second Non persistent messaging performance  16.2 M+ messages per second Number of concurrent connections  1M+ Connections Predictable latency under load (microseconds) for all connections Easy to High Reliable Developer Easy to Integrate Secure 9 11/2/2014 Sprint - Pub / Sub Overview & MQTT 9
  • 10.
    Hours not Weeks Deploy Orders of Magnitude Improvements Performance What you expect from IBM Simple Programming Model Friendly Open Standards DMZ-ready Messaging Appliance Reliability Supports both persistent and non-persistent messaging Supports local transactions The appliance supports all 3 qualities of service defined in MQTT Bi-directional mapping of edge reliability and enterprise reliability Resilience Maintains two copies of recoverable objects, in volatile and non-volatile storage, but availability can be improved using HA feature High Availability/Disaster Recovery Supports high availability using a pair of appliances Updates to primary persistent store synchronously replicated to warm standby Primary and warm standby connected initially via RoCE It is possible to switch to TCP beyond subnets Easy to High Reliable Developer Easy to Integrate Secure 10 11/2/2014 Sprint - Pub / Sub Overview & MQTT 10 IBM Messaging Appliance: Capabilities
  • 11.
    Hardened Appliance FormFactor suitable for DMZ Secure firmware (signed and encrypted, sealed with TPM No user-visible, general purpose OS (no shell) No routing across network interfaces; ports must be explicitly enabled Admin security is role-based SSL /TLS 1.2 mutual authentication support for MQTT/JMS/MQ connections Federal Information Processing Standard (FIPS) 140-2 Level 1 certified cryptographic module Authentication via on-board repository of external LDAP Authorization is by rules in profiles and policies Hours not Weeks Easy to Deploy Orders of Magnitude Improvements High Performance What you expect from IBM Reliable Simple Programming Model Developer Friendly Open Standards Easy to Integrate DMZ-ready Messaging Appliance Secure User / Group, Client Identifier, Protocol, Network Interface, Listening Address / Port, Client IP / IP Address Range, Destination (topic, topic tree, queue) 11 11/2/2014 11 Restrict Access by: IBM Messaging Appliance: Capabilities
  • 12.
    Hours not Weeks Easy to Deploy Orders of Magnitude Improvements High Performance What you expect from IBM Reliable Simple Programming Model Developer Friendly Open Standards Easy to Integrate DMZ-ready Messaging Appliance Secure Simple, powerful APIs consistent across multiple platforms Active messaging community on developerWorks Support for Mobile Application development Native Android and iOS MQTT libraries Browser-based: simple JavaScript (connect, subscribe, publish) plus HTML5 Websockets – bi-directional communication MQTT protocol – efficient pub/sub protocol designed for M2M Java Messaging Service: Pt-to-pt & pub-sub over high speed protocol Integrated with IBM Worklight Cloud-based demo systems for rapid prototyping 12 11/2/2014 Sprint - Pub / Sub Overview & MQTT 12 IBM Messaging Appliance: Capabilities
  • 13.
    Hours not Weeks Easy to Deploy Orders of Magnitude Improvements High Performance What you expect from IBM Reliable Simple Programming Model Developer Friendly Open Standards Easy to Integrate DMZ-ready Messaging Appliance Secure Compatible with a variety of application environments Standard Enterprise environments – JMS point-to-point, publish-subscribe Web Environment - compatible with Rich Internet Applications (WebSockets) (Mobile) javascript applications Connectivity with MQ, MQTT Appliance MQ connectivity service connects to Queue Managers Destination mappings to/from MQ queues/topics, optional wildcards Publication arriving on a topic can be republished to MQ & vice versa 13 11/2/2014 Sprint - Pub / Sub Overview & MQTT 13 IBM Messaging Appliance: Capabilities
  • 14.
    Hours not Weeks Easy to Deploy Orders of Magnitude Improvements High Performance What you expect from IBM Reliable Simple Programming Model Developer Friendly Open Standards Easy to Integrate DMZ-ready Messaging Appliance Secure Designed to be configured and running in 30 minutes Appliance form-factor simplifies physical installation DMZ ready Minimal configuration options Fast time-to-value Designed to support high numbers of connections Scalable admin based on policies/profiles, not objects Simple Web UI (dashboard) and CLI (Command Line Interface) 14 11/2/2014 Sprint - Pub / Sub Overview & MQTT 14 IBM Messaging Appliance: Capabilities
  • 15.
    Mobile – whereefficiency matters •With “mobile messaging” your mobile apps are: –Faster than your competitors –Makes PhoneGap and Worklight faster, use less battery and bandwidth –MQTT is in Facebook Messenger •Low-latency phone-to-phone messaging –Get started with MQ: Benchmarked 240K concurrent users per queue manager at <5% CPU •10x more users than Apache web server handles. •240K wasn’t the limit – ran out of clients •MQTT versus HTTPS on Android 3G: –93x higher throughput and much lower latency –1/10th the bandwidth overhead. –179x lower battery use for receiving messages (high volume) –10x lower battery use for sending messages –50% lower battery for push connections (240 sec keep-alive) 11/2/2014 WebSphere Connectivity & Integration 15
  • 16.
    Native HTML, CSS,JavaScript Worklight API Worklight Hybrid app - HTML5, CSS, JavaScript, Images Device APIs Worklight Javascript API Common Controls Device API Worklight API messaging javascript MQTT plugin m2m MQTT PhoneGap plugin built on IBM contributed eclipse paho eclipse.org/paho MQTT for JavaScript JavaScript to native Bridge (PhoneGap) 16 IBM MessageSight with MobileFirst Worklight
  • 17.
    Solution Examples 3.Unlockcommand sent to car, door unlocks 1.Owner pushes start button on app 2. Sprint authenticates user SPRINT VELOCITY℠ “Key-fob “ response time & Driver preferences in the cloud Connected car “Now, Sprint's newly announced partnership with IBM will allow connected vehicles to communicate with other connected devices while using far less bandwidth and power.” says Bob Johnson, director of connected vehicle development at Sprint “Based on IBM MessageSight, the Sprint Velocity Service Bus is a new communications architecture that lets smartphones, tablets and other devices communicate through the cloud.” 1 Press Release: http://www-03.ibm.com/press/us/en/pressrelease/41441.wss 1 M2M Evolution Magazine: http://bit.ly/1dCBA7M video
  • 18.
    18 Applications ESB Events Subscribe / Publish JMS / MQTT / WebSockets SMARTER CITIES traffic monitoring and control MOBILE BANKING Event notification Data gathering Collaboration Payments BUSINESS ANALYTICS Business agility Responsiveness ENERGY/UTILITY metering (energy, temperature) Control Intelligent prediction Analytics and broking Other Use Cases for Mobile and Machine-to-Machine VEHICLES Telematics Monitoring/recall Security Routing HEALTHCARE Patient monitoring, Automated patient records Pub / Sub and Point-Point 11/2/2014 18 CUSTOMER SERVICE Private Instant Messaging across channels
  • 19.
    References •“MobileFirst ConnectedCar” Demo –http://m2m.demos.ibm.com/connectedCar.html –iPad optimized with map, inbox, speed test, settings •HTML5 http://m2m.demos.ibm.com –just cars on a map without the frills •Redbook: Building Real-time Mobile Solutions with MQTT and IBM MessageSight –http://www.redbooks.ibm.com/Redbooks.nsf/RedpieceAbstracts/sg248228.html?Open •Redbook: Responsive Mobile User Experience using MessageSight –http://www.redbooks.ibm.com/abstracts/sg248183.html?Open
  • 20.