exposing m2m to the rest of us
DESCRIPTION
In the ”Internet of Things” (IoT) vision the physical world blends with virtual one, while machine-to-machine interaction improve our daily life. Clearly, how these virtual objects are exposed to us is critical, so that their user interface must be designed to support the easiness of usage that is driven by the users’ needs, which is different from what machines requires. These two requirements must be solved, and an integrated solution should emerge, if we want to bring the IoT to the 50 billions network that is predicted to became in the next years.TRANSCRIPT
Exposing M2Mto the REST of us
@matteocollina
Matteo Collina
Ph.D. Student @ University of Bologna
@matteocollina matteocollina.com
http://500px.com/photo/20389019
We are #coders
http://500px.com/photo/32597639
We are no Jedi
http://500px.com/photo/20388963
We #code apps
Did you see it coming
http://www.flickr.com/photos/12738000@N00/360231193/
Stevedid.
http://www.flickr.com/photos/noppyfoto/6216399465/
Thanks.
http://www.flickr.com/photos/noppyfoto/6216399465/
They didn’t!
...
We don’t #code for this phone anymore!
7:11 PMiPad
How do we #code an App?
7:11 PMiPad
We #code a response to some kind of user action
Pop-up Dialog
OK
This message comefrom the server!
Cancel
Web ServerTap
We #code a remote web server
Web and Mobile apps are based on
HTTP
REST
REpresentationalState Tranfer = REST
http://500px.com/photo/20591939
Things are different
http://500px.com/photo/4766384
In the future, this chain will be connected to the Internet
http://500px.com/photo/26425201
We want to #code the (real) world.
Arduino is an open source microcontroller that you can use to hack things
http://www.flickr.com/photos/mattrichardson/5029708468/
The Internet is our pillar
http://500px.com/photo/20050837
we want to monitor the seating of this room?
What if
http://500px.com/photo/20050837
we measure people’s emotions?
Can
When you sit,we can receive
an event
The world is event based!
Our controlroom is in the Cloud
How can we make Things talk?
http://www.flickr.com/photos/iboy_daniel/77412822/in/photostream/
Pidgeons are not a communication protocol
See RFC1149http://500px.com/photo/32895129
http://www.flickr.com/photos/clearlyambiguous/48185613/
HTTP is slow and safe
We need a fast, binary protocol
http://www.flickr.com/photos/grrphoto/305649629
• Binary
• Publish/Subscribe
• Free
• Standard (in a few months)
How to use
on
Download PubSubClient, the library for
on Arduino: Setup
String server = String("qest.me");
PubSubClient client = PubSubClient(server, 1883, callback);
if (!client.connected()) { client.connect("arduino");}client.loop();
char s[10];itoa(get_temperature(), s, 10);client.publish("temp", s);
on Arduino: publishing
if (!client.connected()) { client.connect("arduino");}client.loop();
char s[10];itoa(get_temperature(), s, 10);client.publish("temp", s);
This is called a topic, and it is where we publish
data on MQTT.
on Arduino: publishing
Your app cannot serve two masters.
http://500px.com/photo/35382862
QESTA MQTT/REST bridge
qest.me
• MQTT broker
• REST interface
• can be deployed on top of very pub/sub systems
• built in node.js
QEST
REST Server
Redis
MQTT Server
QEST
Data Layer
HTTP Clients MQTT Clients
• Ascoltatori: the pub/sub library for node backed by Redis, MongoDB, AMQP (RabbitMQ), ZeroMQ, MQTT (Mosquitto) or just plain node: https://github.com/mcollina/ascoltatori
• Mosca, the multi-transport MQTT broker for node.js. It supports AMQP, Redis, ZeroMQ or just MQTT: https://github.com/mcollina/mosca
• MQTT.js, the MQTT library for node: https://github.com/adamvr/MQTT.js
QEST’s pillars
Strings are the most common data format.
http://500px.com/photo/28990737
Not these strings.
http://500px.com/photo/28990737
Strings are not the better way of sending data
What else
There are LOTs of choices
• JSON
• MessagePack
• BSON
• Bysant
• Protobuf
Size matters if we pay for every byte sent!
There are LOTs of choices
There are LOTs of choices
Developers think in Lists and Maps, not in nodes and children.
XML will not play a major role in the Internet of
Things
• What devices can a user monitor?
• What devices can 'listen' to the state of other devices?
• Who can access the devices state?
• Is the communication secure?
Security Issues
We need to interconnect UsersSocial profiles tothe Devices!
http://500px.com/photo/31083423
We need a Bridge between the REST and the
“Things” world
http://500px.com/photo/31083423
• Multiple communication protocols
• Data representation
• Security and provisioning
We need to address:
From an end-user perspective
(bridge in Italian)
http://eclipse.org/proposals/technology.ponte/
The initial contribution is QEST
will play well with the others
http://www.flickr.com/photos/oneaustin/1261907803
DEMO!
http://500px.com/photo/26425201
Ruby on Rails has drastically changed how web apps are
built
A 10-minutes blog video changed everything
http://500px.com/photo/26425201
We aim to a Rails-like
experience for the IoT
Our goal is to deliver a10-minutes M2M app video
Credits• Font Awesome for the
Icons.
• Flickr and 500px for LOTS of CC images :).
• Keynotopia for the iPad mockups
Matteo Collina ([email protected])
Thank You!
@matteocollina
http://www.flickr.com/photos/axel-d/479627824/
http://500px.com/photo/31083423
Bridging two worlds
http://eclipse.org/proposals/technology.ponte/