a roa for the wot
DESCRIPTION
A resource oriented architecture for the Web of ThingsTRANSCRIPT
A Resource Oriented Architecture for the Web of ThingsDominique Guinard (ETH / SAP Research / MIT Auto-ID Labs)Vlad Trifa (ETH Zurich / SAP Research)Erik Wilde (UC Berkeley)
2Dominique Guinard ETH / SAP / MIT
INTRODUCTION AND MOTIVATION
What’s the Web of Things? What is it good for?
Dec. 1, 2010
[http://www.flickr.com/photos/moragcasey/]
3Dominique Guinard ETH / SAP / MITDec. 1, 2010
The Embedded Systems Era
Ubiquitous: Home appliances Industries Smart Cities
Connected: Zigbee, Bluetooth, Wifi
Application Integration?
4Dominique Guinard ETH / SAP / MIT
Finding an Application Integration Platform
Question: How do we enable tech savvys and
companies to create applications on top of this eco-system?
Hundreds of different platforms Web?
Scalable (7000 Facebook p/sec.)
Ubiquitous (from mobile to desktop)
Well-understood (1.73 Bio. users)
Thesis: Re-use and develop Web-standards to
build a Things Universal API.
Dec. 1, 2010
5Dominique Guinard ETH / SAP / MIT
WEB OF THINGS ARCHITECTURE
Building a Web of Things, piece by piece…
Dec. 1, 2010
[http://www.flickr.com/photos/julianbleecker]
6Dominique Guinard ETH / SAP / MIT
REST: The Core of the Web
REST: architecture with 5 constraints
1. Identify resources and links: A resource: something, that can and that’s worth, getting a URI and
links
2. Design respresentations
3. Use the uniform interface
4. Bring things to the Internet&Web
Dec. 1, 2010
[2] Architectural styles…
[1] RESTful Web Services.
7Dominique Guinard ETH / SAP / MIT
Case Study with Sun Spots1) Resources and Links
Thanks to their atomicity services on embedded devices are quite adapted to Resource-Oriented Architectures. Resources:
Spots: http://webofthings.com/spots Spot 2: http://webofthings.com/spots/2 Light Sensor: http://webofthings.com/spots/2/sensors/light Led Actuator:
http://webofthings.com/spots/2/actuators/led
Resource Identification Hypermedia
Dec. 1, 2010
8Dominique Guinard ETH / SAP / MIT
2) Representation Design
HTML as default, ideal for browsing: http://webofthings.com/spots
JSON & JSONp, ideal for mashups
XML, ideal for integration with business systems
Self-Describing Messages Hypermedia
Dec. 1, 2010
9Dominique Guinard ETH / SAP / MIT
3) Interface Design
Leverage content negotiation: Accept: application/json
Use the HTTP Verbs extensively: GET, PUT, POST, DELETE GET http://webofthings.com/spots/2/sensors/temperature PUT http://webofthings.com/spots/2/actuators/led/1
Map status codes: 200 OK, 201 Created, 400 Bad Request
Dec. 1, 2010
Uniform Interface Self-Describing Messages
10Dominique Guinard ETH / SAP / MIT
4) Bringing Things to the Internet&Web: Smart Gateways
6lowpan coming quickly: Cisco, IPSO, OpenPicus
HTTP Reverse Proxy Hiding IoT proprietary protocols
(Zigbee, Bluetooth, etc.): Dongle based
OSGi modularity
Installed on residential gateways: Wireless routers (OpenWrt)
NAT
RESTful Design Process can be (partially) automated
Dec. 1, 2010
[3] Facilitating Integration of
Services for WoT
11Dominique Guinard ETH / SAP / MIT
APPLICATIONS
What can we build on top of the Web of Things?
Dec. 1, 2010
[http://www.flickr.com/photos/docman]
12Dominique Guinard ETH / SAP / MIT
Typical WoT Architecture: « Energie Visible »
Project for a private foundation for sustainability (cudrefin02.ch)
Goal: an easily deployable system for better understanding consumption: Cross-platform
Web access
Uses the Plogg sensor nodes Smart Gateway provides
RESTful API
Dec. 1, 2010
13Dominique Guinard ETH / SAP / MIT
« Energie Visible »: Mashup and UIs
Web UI / Mashup using Javascript (GWT): www.webofthings.com/energievisible
E-Meter iPhone App
Dec. 1, 2010
[http://www.vs.inf.ethz.ch/res/show.html?what=emeter_demo]
[4] Increasing Energy Awareness Through Web-enabled Power Outlets.
14Dominique Guinard ETH / SAP / MIT
Physical Mashup Editors
• Clickscript:– Javascript (JQuery / DOJO) based
visual language.
• Added wrappers for WoT devices:
– SunSPOT, Ploggs, RFID reader
Dec. 1, 2010
[http://www.clickscript.ch]
[5] Mashing up Your Web-Enabled Home
15Dominique Guinard ETH / SAP / MIT
EVALUATION
Ok, it’s easier to build apps upon, but is the WoT really feasible?
Dec. 1, 2010
[ http://www.flickr.com/photos/myfwc]
16Dominique Guinard ETH / SAP / MIT
Quantitative Evaluation
10’000 requests on the Sun SPOTs
1) Embedded Webserver: 205 ms (97 – 8500)
2) Smart Gateway: Sync-based (caching)
4 ms (2 – 49)
Age max: 300 ms
Good enough for most sub-second use cases.
Dec. 1, 2010
17Dominique Guinard ETH / SAP / MIT
BEYOND REST
What is the Web of Things good for?
Dec. 1, 2010
[http://www.flickr.com/photos/brapke/]
18Dominique Guinard ETH / SAP / MIT
Beyond Client-Server: Real-Time Web
Client-server paradigm not really natural for sensing application.
Need for sensor push. First step:
Atom (cleaner RSS) / AtomPub
Real push Pubsubhubbub
HTML 5 Web Sockets
Server-sent events
RESTful XMPP
Dec. 1, 2010
19Dominique Guinard ETH / SAP / MIT
Beyond HTML: Discovering Services
Service Discovery: Microformats HTML5 Microdata RDFa Google Custom Engine Yahoo Search Monkey Dyser
Dec. 1, 2010
20Dominique Guinard ETH / SAP / MIT
Thanks a lot for your attention
Contact us if you want to use our APIs in your projects: Dominique Guinard
www.guinard.org
www.webofthings.com
Special thanks to: Simon Mayer, Lukas Naef and Thomas Pham.
Dec. 1, 2010
21Dominique Guinard ETH / SAP / MIT
References
1. L. Richardson and S. Ruby. RESTful Web Services. O'Reilly Media, Inc., 2007
2. R. Fielding: “Architectural styles and the design of network-based software architectures”, 2000
3. S. Mayer, D. Guinard, V. Trifa: “Facilitating Integration and Interaction of Real-World Services for WoT” Urban IoT 2010
4. M. Weiss, D. Guinard: “Increasing Energy Awareness Through Web-enabled Power Outlets” MUM 2010
5. D. Guinard: “Mashing up Your Web-Enabled Home”, Touch the Web 2010
Dec. 1, 2010
22Dominique Guinard ETH / SAP / MIT
Backup
Dec. 1, 2010
23Dominique Guinard ETH / SAP / MIT
Qualitative Evaluation
Plogg RESTful API & Sun SPOT API used by 6 independent research labs.
Early feedback: Easy to understand and use Straightforward testing & Web-integration
Currently evaluating with 80 students.
Dec. 1, 2010
24Dominique Guinard ETH / SAP / MIT
Age of Cache
Dec. 1, 2010