This document discusses Internet of Things (IoT) technologies including MQTT, a lightweight messaging protocol commonly used for IoT. It describes how MQTT works using a publish/subscribe model and its features such as quality of service levels, wildcard subscriptions, and retained messages. The document also outlines IBM's IoT Foundation platform, how it uses MQTT to connect devices and applications, and provides examples of connecting devices and apps using MQTT and the IoT Foundation APIs. It demonstrates how to develop IoT applications in a model-driven approach using IBM Rhapsody.
1. 1
POLITECNICO DI BARI
April 28-29, 2015
Bari
IBM Bluemix and the
Internet of Things
Giulio Santoli (@gjuljo)
ibm.biz/Bluemix2015
2. 2 ยฉ 2015 IBM Corporation
A new economic paradigm...
3. 3 ยฉ 2015 IBM Corporation
Jeremy Rifkin: the Third Industrial Revolution
Herbie
Airbus Phantom Eye
4. 4 ยฉ 2015 IBM Corporation
Hype cycle for emerging technologies 2014
Internet of Things
is here!
5. 5 ยฉ 2015 IBM Corporation
EveryTHING is connected
My tells my that the is over
My tells my to open the garage and start my
My tells my that an intruder is entred
A tells my to tell my that a arrived
6. 6 ยฉ 2015 IBM Corporation
Internet of Things: Many different technologies
7. 7 ยฉ 2015 IBM Corporation
MQTT, a messaging protocol for IoT
Open (standard, 40+ client implementations)
Lightweight (minimal overhead, efficient format, tiny clients)
Reliable (QoS for reliability in unrealiable neworks)
Simple (43-pages specification, connect/publish/subscribe)
Late 90s Aug 2010 Nov 2011 Sep 2014
Invented by and Published by Eclipse M2m Standard
(v. 3.1.1)
9. 9 ยฉ 2015 IBM Corporation
MQTT: publis/subscribe
Thanks to Bryan Boyd (http://www.slideshare.net/BryanBoyd/mqtt-austin-api)
10. 10 ยฉ 2015 IBM Corporation
MQTT: payload agnostic
Thanks to Bryan Boyd (http://www.slideshare.net/BryanBoyd/mqtt-austin-api)
11. 11 ยฉ 2015 IBM Corporation
MQTT: wildcard subscriptions
Thanks to Bryan Boyd (http://www.slideshare.net/BryanBoyd/mqtt-austin-api)
12. 12 ยฉ 2015 IBM Corporation
MQTT: quality of service
Thanks to Bryan Boyd (http://www.slideshare.net/BryanBoyd/mqtt-austin-api)
13. 13 ยฉ 2015 IBM Corporation
MQTT: retained message for last value caching
Thanks to Bryan Boyd (http://www.slideshare.net/BryanBoyd/mqtt-austin-api)
14. 14 ยฉ 2015 IBM Corporation
MQTT: cleanSession for session state
Thanks to Bryan Boyd (http://www.slideshare.net/BryanBoyd/mqtt-austin-api)
15. 15 ยฉ 2015 IBM Corporation
MQTT: last will and testament
Thanks to Bryan Boyd (http://www.slideshare.net/BryanBoyd/mqtt-austin-api)
16. 16 ยฉ 2015 IBM Corporation
MQTT Brokers
Appliance Cloud Open Source
โข IBM Message Sight โข IBM IoT Foundation
โข HiveMQ
โข Eurotech EDC
โข Litmus Loop
โข ...
โข Mosquitto (C)
โข Mosca (NodeJS)
โข Moquette (Java)
โข RSMB (C)
โข ...Up & running in <30 minutes
1 rack = 273M msg/sec
21M concurrent connections
DMZ-ready, FIPS 140-2
deny-based access control
http://mosquitto.org
http://www.mosca.io
https://eclipse.org/paho
17. 17 ยฉ 2015 IBM Corporation
IBM MessageSight Virtual Appliance
https://developer.ibm.com/messaging/messagesight
18. 18 ยฉ 2015 IBM Corporation
Example: simple moquitto
> mosquitto -v
> mosquitto_sub -d -t hello/world
> mosquitto_pub -d -t hello/world -m "Hello, MQTT. This is my first message."
> mosquitto_sub -d -t hello/+
> mosquitto_pub -d -t hello/aaa -m "Hello, MQTT. This is my first message."
> mosquitto_pub -d -t hello/bbb -m "Hello, MQTT. This is my first message."
26. 26 ยฉ 2015 IBM Corporation
IoT Foundation: REST APIs
View an organization (GET):
https://internetofthings.ibmcloud.com/api/v0001/organizations/<org-id>
List all devices (GET) / Registr a device (POST):
https://internetofthings.ibmcloud.com/api/v0001/organizations/<org-id>/devices
Historical data for a device (GET):
https://internetofthings.ibmcloud.com/api/v0001/historian/<org-id>/<type-id>/<id>?filter
REST API Examples
https://developer.ibm.com/iot/recipes/api-documentation
curl --user "<key>:<token>" https://internetofthings.ibmcloud.com/api/v0001/organizations/<org-id>/devices
Example: get all devices
44. 44 ยฉ 2015 IBM Corporation
IBM Rhapsody Developer
http://www.ibm.com/developerworks/downloads/r/rhapsodydeveloper
45. 45 ยฉ 2015 IBM Corporation
IBM Redbooks
http://www.redbooks.ibm.com
Redpaper: MQTT and Arduino Devices
http://www.redbooks.ibm.com/abstracts/redp4929.html?Open
47. 47 ยฉ 2015 IBM Corporation
Bluemix works.
Start a free trial today
ibm.biz/Bluemix2015
Editor's Notes
1st Industrial Revolution
communication = steam power printing and the telegraph
energy = coal and steam (vapore)
mobility = locomotive and railroad
2nd Indutrial Revolution
communication = centralized electicity and telephone, later radio and television
energy = oil
mobility = internal combustion engine
3rd Industrial Revolution
communication = internet (three internets in one, including the internet of things)
energy = renewable energy and distributed renewable energy
mobility = automated vehicles, logistics and automated drones