web messaging for open for web of things
TRANSCRIPT
Web Messaging for Open and Scalable Distributed Sensing Applications
ICWE2010, Vienna, Austria - 6 July 2010
Vlad Trifa, Dominique Guinard, Vlatko Davidovski,
Andreas Kamilaris, and Ivan Delchev
The Internet of ThingsNetworked devices everywhere
Lots of different devices ‣ Capabilities/functions‣ Applications/middleware‣ Networking protocols
Internet connectivity‣ Cheap‣ Ubiquitous‣ HTTP also possible
Web of Things [1]:Use the Web to combine heterogeneous mobile devices to create interactive ad-hoc applications!
[1] Online at: http://www.webofthings.com
RESTful SunSpotEmbedded NanoHTTPD
‣ Talks HTTP (over 802.15.4)‣ Becomes a Web device
Properties and functions are Web resources, so can be
‣ Browsed‣ Bookmarked‣ Shared
But also use twitter, send emails, chat, etc..
D. Guinard, V. Trifa, T. Pham, and O. Liechti. Towards Physical Mashups in the Web of Things. In Proceedings of the 6th International Conference on Networked Sensing Systems (INSS 2009), 2009.
Show Time!
Wait - what about eventing & streaming ?
The Web wasn’t quite made for that...
Need more than Pull, more than Push!
Web mainly request/response (HTTP)Need for eventing & streaming for many users
‣ Sensor data represented as sequence of messagesScalable pub/sub for devices as substrate
‣ Use the Web to build distributed event driven appsParameterized subscriptions (channels/queries)
‣ Specify what sensors, devices, locations, etc...Many solutions (XMPP, etc....)
‣ None really integrate with the Web ‣ ATOM/ATOMpub is RESTful, but not push
Here comes the real-time Web!Very active community expanding Use the Web for distributed event driven appsComet
‣ Keeps the HTTP connection open‣ Long polling‣ Ajax push
Web Hooks‣ Bi-directional‣ Push from server to HTTP callbacks
RESTful Messaging System (RMS)Similar to pubsubhubbub (PuSH) or RestMS
‣ But lighter (less options) to run on devicesInterested by a generic “Web push” mechanism
‣ Simple to use‣ No complex client required
Minimal pub/sub support‣ queues‣ subscriptions
RMS/rms/channels - every sub-resource represents a hierarchical channel where entities can post data to, ex: /rms/channels/ethz/ifw/floor/d/49.2/rms/subscriptions - contains each subscription of entities to individual channels/rms/channels/x/publishers - contains all entities that are publishing data on the channel x/rms/channels/y/subscribers - contains all entities that are subscribed to events on the channel y
Usage examples
curl basic request POST data "temperature=23" http://localhost:8080/aparat/rms/channels/simulation
curl request POST data "rmssubscriptioncallbackurl=http://192.168.1.1/handler" http://localhost:8080/aparat/rms/channels/simulation
Subscribe to a channel:
Publish to a channel:
Live DemoPlogg Smart Meter
‣ Talks HTTP (over Zigbee)‣ Becomes a Web device
Posting through RMS‣ /aparat/rms/channels/.../hifi
Browser client using Comet (Ajax Long Polling)
Show Time!
Many devices - one receiver
Many receivers
Real deployment setup
Web of Things @ Percom
Vlad Trifa - SAP/ETH Zurich
ConclusionLeverage REST as native API for devices
‣ Inherit all the tools & expertise in Web technologies‣ Caching, security, scalability
Flexibility through real-time Web‣ Loose coupling between application components‣ Pub/sub helps to scale and is good for ad-hoc interactions
Good performances‣ 100 msg/s delivered with low latency, 200 subscribers
notified with 360ms delay in average‣ Real deployment 15 devices sampling@1Hz (< 60 ms delay)
Web of Things, 7.4.2010 Vlad Trifa - SAP/ETH Zurich
Take away notesGood performances for Web messaging and integrates devices directly with existing Web (REST).
The Web goes physical!
Tools & best practices for Web-enabled things are needed.
Web engineering can contribute a lot towards building a programmable world.
We need applications (deployments) and testing!