This document proposes using web standards to develop applications for networked devices, known as the Web of Things. It discusses representing devices, sensors, and functions as RESTful resources with URIs, links, and uniform interfaces. This would allow developing simple web applications for integrating real-world data and taking advantage of existing web features. Examples are given of modeling device properties and functions as resources and representing data in JSON, XML, and XHTML for different uses.
4. Megaco Modbus
OGC SensorML
Zorro III
AMQP
OPC-UA
5. Problem:
How to combine
heterogeneous mobile devices
to create interactive ad-hoc
applications?
I don’t have a
PhD in Computer
Given that tons of different Science...
‣ Devices
‣ Capabilities Can I use this
‣ Functionalities too?
‣ Applications/middlewares pleeeeease?
‣ Networking protocols
6. We need an universal protocol
that is:
simple, lightweight, loosely-
coupled, scalable, flexible
and hopefully... standard
7. Sounds like the Web...
Use Web standards to develop applications for
networked devices.
HTTP, HTML, XML, JSON, RSS, ATOM, MIME,...
‣ TCP/IP & Web granted, WiFi routers ubiquitous
‣ Development of simple Web apps: cheap & quick
‣ Integrate real-world data on the Web
‣ Get features of the Web for free
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
8. Social Web
Physical Web
Real-time Web
Semantic Web Programmable Web
Web of Things
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
10. The Web of Things in a nutshell
Steps to create a basic Web of Things:
1. Connecting things to the Internet (IPv4/IPv6)
2. Embedded Web servers
3. Make devices part of the Web (using REST)
‣ Model their function as RESTful resources
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
11. RESTful SunSPOTs
‣ Properties and functions are
RESTful resources
‣ Devices/services become Web
resources
‣ URI-addressed
‣ Links between them (hateoas)
‣ Different representations (content
negotiation)
‣ Uniform interface (HTTP verbs, status
codes)
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
12. Sunspots resources modeling
Services on embedded devices are adapted for resource oriented
architectures
‣ root: www.spotshost.com
‣ spots list: www.spotshost.com/sunspots
‣ spot #1: www.spotshost.com/sunspots/1
‣ sensors list: www.spotshost.com/sunspots/1/sensors
‣ LEDs : www.spotshost.com/sunspots/1/actuators/leds
‣ LED #1 : www.spotshost.com/sunspots/1/actuators/leds/led1
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
13. Representations
‣ XHTML ideal for browsing
http://webofthings.com/spots
‣ JSON ideal for parsing (& lightweight for
device)
http://webofthings.com/spots.json
‣ XML ideal for business integration
http://webofthings.com/spots.xml
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
14. Uniform interface
‣ HTTP verbs
‣ GET: current temperature
‣ POST: add a timer
‣ PUT: turn a device on/off
‣ DELETE: delete a timer on a device
‣ HTTP headers
‣ Accept header for MIME types
‣ Status codes (200 ok, 401 unauthorized)
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
15. Internet
HTTP
Proxy Router
Gateway
Indirect Pass-through
Legacy HTTP
Non Web-enabled Web-enabled Devices
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
16. Gateway level integration: Energie Visible
Web
/
Mobile
Interface
GET http://10.1.1.5:8080/energymonitor/ploggs/*
[{
Gateway
"deviceName": "ComputerAndScreen",
(IP:10.1.1.5) "currentWatts": 50.52,
"KWh": 5.835,
"maxWattage": 100.56
},
"deviceName": "Fridge",
"currentWatts": 86.28.,
Sensors
"KWh": 4.421,
(Ploggs)
"maxWattage": 288.92
}, {...}]
Electric
appliances
D. Guinard and V. Trifa. Towards the web of things: Web mashups for embedded devices. In 2nd Workshop on
Mashups, Enterprise Mashups and Lightweight Composition on the Web (MEM 2009), Madrid, Spain, April 2009.
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
17. Towards infrastructures
/ethz
(can run anywhere)
virtual gateways
../building/CNB
../CNB/FloorD ../CNB/FloorE
../southWing/D48.1
(must be embodied)
physical gateways
../floorD/southWing
../southWing/D48.2
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
19. Real-world Web applications
REST URL
REST
I
AP
Ja
va
P
ST
PH
Sc
RE
rip
t
[hCp://www.pachube.com] [hCp://www.webothings.com/energievisible] [hCp://www.clickscript.ch]
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
20. So, my fridge is online. But what
about
sharing and
authentication?
21. FAT - Friends and Things
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
22. Err, what about eventing &
streaming ?
The Web wasn’t quite made for
that...
Yet we need this!
23. Need more than Push
‣ Web mainly request/response (HTTP)
‣ Need for eventing & streaming for many users
‣ Sensor data represented as sequence of messages
‣ Scalable pub/sub for devices as substrate
‣ Use the Web to build distributed event driven apps
‣ Parameterized 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
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
24. !"##$%&'($)' *$+,-./0$'($)'
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
25. HTML5 Websockets
• !"##$%"&#'()*+),-')
./012'/)
• 34/,)05),-')200+)
2,4+%4/%)6789):)2&';<)
• =".2;/*&>0+),-/0"?-)
@4A42;/*&,)
• B+;/'42*+?)+"C.'/)05)
./012'/2)2"&&0/,)
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
26. Ok, great. But how do I quickly
prototype
end-to-end applications?
27. Data streams
‣ Sensor data represented as Web streams
‣ Publish/subscribe paradigm
‣ Users can create and subscribe to streams
‣ Parameterized
‣ devices
‣ sensors
‣ filter data
‣ sampling frequency
‣ Using REST...
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
28. Messaging implementation
‣ Messages transported in JSON
‣ Message broker as an external entity (“outsourced”)
‣ Swappable
‣ Scalable
‣ Currently use RabbitMQ
‣ Web integration with pubsubhubbub, RMS, etc.
‣ RESTful, Web-hook based pub/sub
‣ Supports CometD for Web push
‣ HTML5 WebSockets
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
29. Wisspr - Web infrastructure for sensor streams processing
user@machine:~$ curl -i -d "devices=http://vslab20:8083/sunspots/device_11
&data=temperature,light,tiltX&filter=temperature > 10" http://vslab20:8085/datastreams
30. Request
POST example.org/datastreams/ HTTP/1.1
Content-Type: application/x-www-form-urlencoded
devices=purpleSensor &
data=temperature,light &
frequency=2 &
filter=light < 200 && temperature > 19
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
31. Response
HTTP/1.1 201
[...]
Content-Location: http://example.com:8085/datastreams/bh_0
[...]
Connection: close
‣ Then we just subscribe to it:
curl -vd "hub.mode=subscribe&hub.callback=http://example.com:
8888/client_callback_handler&hub.topic=&hub.verify=sync"
http://example.com:8085/datastreams/bh_0
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
32. Ok, great. But is this useful for
real world
applications?
33. | SENSEable City Lab
crowd sourcing
application design
LIVE Singapore!
real time data
platform with tools
real Singapore city
and citizens
enabling platform for application development
Enabling platform for developing urban applications
data collection/combination/distribution
Data collection/processing/distribution
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
34. real-time
(raw) data streams
LIVE Singapore!
Web API
this is you
http://senseable.mit.edu/livesingapore
36. A typical Fosstrack deployment...
$
! %
&
" #
' (
)
!*+
!!,+-./.+011+23456.7486+ ~12 software components for a
!",+-./.+@4586167A8+BCD+ typical RFID deployment!!
98:;:<+=3>?.5,+
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
37. Case Study: WoT patterns for Global RFID Network
‣ Reduce the deployment complexity of standard RFID/
IoT software stacks.
‣ Allow easier (cheaper), more lightweight (mobile/
WSNs) RFID application development.
‣ Enable RFID mashability:
‣ Composition of RFID/WSNs/appliances and existing services on
the Web
‣ Allow anyone to implement simple use-cases
‣ By applying Web and Web of Things blueprints!
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
39. Cloud computing
‣ Run your EPC Network server in 5 minutes!
‣ Cloud appliance:
‣ Full EPC Network backend
‣ Admin Web interface
‣ Fully configured Tomcat Instance
‣ Based on Amazon EC2:
‣ Public Cloud
‣ Utility Computing
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
40. • !"#$%&'()*#+,-&,"-).,'/,
0'&&.)-1,
• !$#%*23*1,3$&.-22,'$,.'",
'/,0'&&.)-1,45678,
• 6)'&&%9)':&#),;#9,
3$.#)/-*#,
• <'932#,=&#),7$.#)/-*#,
?E"FCCAAAC!"#$%"&CB3@)'&F9-C'($)('C,
:-)#?'(&#F3$*'B3$@C%*(C,
• :#9'>?3$@&A*'BC)D+,,
GHHI%JG%GJKJLFGGFHMAHHHNC(+(&,C456,
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
41. • !"#$%&'()&*+$',-.**(
– /01+,2023(4"'(./5(,6,2+1(
– !$%7*%,8,'9(
• :(,6,2+(-;(2()"22,<+"'1(
– )"2+'"%(+='"$3=(>5?@4$%(
.ABC(
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
42. • !"#$%&'($)"*+,-"$
• )&../*0'$'"+"*12$
0*13'./*0'4$
– !"#'/-5"0'$
– 6/378./22,37$9$:/;"0$
– )0*"1;,37$
• :2,"30$<;/#,2"9!"#=$
1..2,-1>/3$,3$?@$2,3"'A$
• B1'"C$/3$D0;/'.("*"9
E"*'"F$13C$,0'$EG&"*F$
%2&7,3$
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
43. Mobile Reader Monitor
• !"#$%&"#'(
– )%&*(+,(%-.#(
– /-*01-2(&*(,345(2#&.#2(
670&(88,9:;8<=(>07#(?2-@(
&*A(@-B0>#(B2-C"#2(
• D#%E*->-FA'(
– 3-""12&G(<9H(H>-I.(
– 19I"E#2(:(%&J1I2#(
K#B&.&J1#2(
– LMN(>0*#"(-?(O&7&"%20J1(
%-@J&PB>#(C01E(@-"1(
@-B0>#(B2-C"#2"(
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
48. Conclusions
‣ Huge opportunities ahead for WoT
‣ The Web of Things is hard because
‣ People are good Web developers
XOR
‣ Good embedded systems developers
‣ Tools & best practices for Web-enabled things are needed
‣ Tradeoff between performance and features
‣ Web developers need to apply their skills and
expertise to build a programmable world
‣ Prototyping via large-scale applications
‣ Deployment support, runtime debugging, patterns & toolkits, etc.
Web of Things, 3.3.2011 Vlad Trifa/Dominique Guinard - ETH Zurich
49. Thanks for your
attention !
trifa@inf.ethz.ch
dguinard@inf.ethz.ch
http://www.webofthings.com