1. Service Oriented Architectures
for the Web of Things
Dominique Guinard
ETH Zurich / SAP Research / MIT Auto-ID Labs
Brown Bag @ Credit Suisse, Zurich, May 30 2011
2. I, in a Nutshell @ Alma Mater
2005: Bachelor in CS and 2010 – 2011: Visiting
Management @ Fribourg: Researcher @ MIT:
Scalable (Java EE) RFID Indoor Using Cloud-Computing and REST to
Assets Tracking Framework simplify standard RFID software
(RFIDLocator) @ Sun Microsystems applications.
2006 – 2007: Master Thesis in
Computer Science @ Lancaster:
SOA for sensor supported interactions
with mobile phones
2008 – now: Ph.D. @ ETH
Zurich:
“Integrating the Real-World in the Web
of Things - A Service Architecture to
Support Application Development”
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 2 / 50
3. I, in a Nutshell @ Work
2007 – 2011: SAP AG:
Associate Researcher, SOA (Java EE,
WS-*) for integrating embedded
devices (e.g., machines) and IT
backend systems (e.g., ERPs)
2007 – 2008: Auto-ID Labs
Zurich:
« Mobile Internet of Things » project
with Nokia Research.
2005: Sun Microsystems
Intern, virtualized Java EE Portal for
Banking Business
1997 – 2006: GMIPSoft &
Spoker.com:
Co-founder, developer, manager
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 3 / 50
5. Things? Smart Things!
and tagged objects!
to sensor networks…
From appliances and machines…
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 5 / 50
6. The Smart Things Era
Ubiquitous:
Home appliances
Industries
Smart Cities
Connected:
Zigbee, Bluetooth, Wifi
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 6 / 50
7. Service Oriented Architecture for Smart Things
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)
Idea:
Propose an SOA for enabling
composite applications with Smart
Things
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 7 / 50
8. Motivation: Use Case Enterprise
ERP, SCM, PLM, SRM, CRM
The manufacturing industry is
facing a number of challenges: DISCONNECT
Mass customization, last-minute
changes
Cross-organizations processes Factory/Plant
… in a very heterogeneous
world.
Need for increased flexibility
and agility in the manufacturing
process:
Enable dynamic reconfiguration
and composition Heterogeneous Plant Floor IT Infras.
Enable shop-floor events to be
integrated to top-floor enterprise
applications (e.g ERP, etc.)
Machinery & Plant Assets
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 8 / 50
9. Today’s Menu
1. Motivation
2. Smart Things SOAs:
1. A WS-* Architecture for Smart
Things
2. The Web of Things
3. Physical Mashups
4. Case study: WEB-enabling the
Global RFID Network
5. Conclusion
[http://www.flickr.com/photos/lessio/1346732230/]
Dominique Guinard ETH / MIT
Credit Suisse, May 30, 2011 9 / 50
10. SOA-Ready Device Integration in Enterprise Systems
Develop a cross-layer infrastructure
composed of web service enabled
devices (SOA-ready) strongly
coupled with enterprise
applications.
Leading competitors in the automation
area.
SAP’s contribution is in the enterprise
integration.
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 10 / 50
12. Device Layer: Device Profile for Web Services
Based on DPWS:
Open standard for providing
WS-* Web Services at smart WS-Discovery WS-Eventing
things level
WS-Addressing
Minimal set of standards WS-MetadataExchange
Smaller footprint WS-Policy
Similarities with UPnP but WS-Security
based on WS standards SOAP 1.2
DPWS = WS + Discovery + WSDL 1.1, XML Schema
Service Description + Security HTTP 1.1
and focus on Eventing UDP
TCP
IPv4/IPv6
Goal: Embedding DPWS in
devices and even « in silicon »: Devices Profile for Web Services
Schneider Electric, ABB, ARM (DPWS)
protocol stack
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 12 / 50
14. Creating Workflows With Smart Things
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 14 / 50
15. Qualitative Results: Still Rather Heavy
Still heavy on the embedded
device itself:
No DPWS on Sun SPOT, Gripper, PLC
yet.
Maybe just a matter of time?
Heavy to program services and
clients:
Have a WSDL, generate stub from
WSDL, databinding (JAXB) and SOAP,
service lookup, etc.
WS-* Web Services probably not
the best SOA implementation for
Smart Things [11]
Especially not for tactical, ad-hoc,
applications [6,7]
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 15 / 50
16. Thinking about Alternatives: REST?
Many practical benchmarking
has shown that REST
outperforms WS-* in the IoT field.
Yazar and Dunkels [10] have
compared both technologies for
wireless sensor networks.
Source [10] Yazar, Dunkels
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 16 / 50
17. Thinking about Alternatives
Study with ~70 developers:
REST seen as more adapted to smart
things
REST seen as easier to learn
=> Fosters public innovation
Security as the biggest drawback
of REST:
REST offers security over the
communication channel (HTTPS)
WS-* offers endpoint to endpoint
security (WS-Security)
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 17 / 50
19. The Web of Things
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 19 / 50
20. REST: The Core of the Web [1,2]
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
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 20 / 50
21. Case Study with Sun Spots Resource Identification Hypermedia
1) 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
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 21 / 50
22. 2) Representation Design Self-Describing Messages Hypermedia
HTML as default, ideal for browsing:
http://webofthings.com/spots
JSON & JSONp, ideal for mashups
XML, ideal for integration with business systems
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 22 / 50
23. 3) Interface Design Uniform Interface Self-Describing Messages
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
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 23 / 50
24. 4) Bringing Things to the Internet&Web:
Smart Gateways [3]
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
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 24 / 50
25. Quantitative Evaluation
10’000 requests on the Sun
SPOTs
1) Embedded Webserver:
205 ms (97 – 8500)
Could be improved with a proxy!
2) Smart Gateway:
Sync-based (caching)
4 ms (2 – 49)
Age max: 300 ms
Good enough for most sub-
second use cases.
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 25 / 50
27. 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
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 27 / 50
28. « Energie Visible »: Mashup and UIs [4]
Web UI / Mashup using Javascript (GWT):
www.webofthings.com/energievisible
E-Meter iPhone App
[http://www.vs.inf.ethz.ch/res/show.html?what=emeter_demo]
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 28 / 50
29. Physical Mashup Editors [5]
• Clickscript:
– Javascript (JQuery / DOJO) based
visual language.
• Added wrappers for WoT
devices:
– SunSPOT, Ploggs, RFID reader
[http://www.clickscript.ch]
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 29 / 50
30. A (business-relevant) case-study in RFID
WEB-ENABLING THE GLOBAL RFID NETWORK
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 30 / 50
31. EPC Network in a Nutshell
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 31 / 50
32. Paint-Point: Complicated applications developments:
Goal:
Offer lighter APIs
Allow integration with IoT devices
(sensors, mobile phones)
Allow Web 2.0 integration
Remedy:
RESTful APIs
Real-time Web
[www.flickr.com/photos/jgarber/]
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 32 / 50
33. EPC Network in a Nutshell
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 33 / 50
34. API Design: Addressability & Connectedness
Resources:
Locations, Readers, Tagged objects
(EPC), etc.
Links:
Every resource is linked to its children.
And to relevant resources.
http://.../location/migros:basel/reader/warehouse:incoming/time/2009-12-21T13:22:04.000Z/event/EPC
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 34 / 50
35. Design: Representations
Several representations:
XML: EPCIS standard
JSON: Web integration
HTML: browsability
CSS for browser
CSS for mobile (IUI)
Selected through “HTTP content
negotiation”
Atom feeds for subscription to
queries.
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 35 / 50
38. Applications
Easier to build mobile apps
Easier to build Web apps
(mashup dashboard)
Shortcomings:
How about real-time?
Beyond EPCIS?
« Reader » push?
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 38 / 50
39. Remedy: Real-Time Web in a Nutshell
Current Web Real-Time Web
[Generated with websequencediagrams.com]
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 39 / 50
40. HTML 5 Websockets
Full-duplex in the browser
Part of the soon standard HTML
5 spec.
Subscription through Javascript
Increasing number of browsers
support
[Generated with websequencediagram.com]
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 40 / 50
41. Application: Mobile Reader Monitor
Use-case:
Scan QR code
Monitor an RFID reader (via
LLRP/ALE) live from any mobile
browser
Technology:
Fosstrak EPC Cloud
tPusher
~20 lines of Javascript compatible with
most mobile browsers
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 41 / 50
42. Paint-Point: Complex and expensive back-end
deployments and maintenance
Goal:
Reduce installation & maintenance
time and costs:
Software
Harware
Remedy:
Virtualization & Cloud Computing
[www.flickr.com/photos/sunep]
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 42 / 50
43. A Typical EPC Software Deployment…
1 4
5
6
2 3
8
9
7
10
11) Java App Contrainer ~12 software components
12) Java Enterprise SDK for a typical RFID
(e.g., Tomcat)
deployment!!
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 43 / 50
44. Remedy: Virtualization
Test / dev for the EPC Network
locally in 5 minutes
Virtualized development
environment:
Eclipse, LLRP Commander, Readers
simulators, WSN simulators, toolkits, etc.
All Fosstrak components
Based on VMWare:
Private Cloud
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 44 / 50
45. Remedy: Cloud Computing
Run your EPC Network server in
5 minutes!
Cloud appliance:
Full EPC Network server
Admin Web interface
Fully configured Tomcat Instance
Based on Amazon EC2:
Public Cloud
Utility Computing
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 45 / 50
46. All together: EPC Cloud Infrastructure
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 46 / 50
47. Application: RFID Mashup Editor
[Clickscript.ch]
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 47 / 50
49. Conclusions
The integration of Smart Things
should be rooted on the best
practices of SOAs
2 SOA Architectures for
composite applications with
Smart Things:
WS-*, DPWS-based
Better security, built-in eventing and
discovery.
REST
Better Web integration, easier to use,
more lightweight
Key-point: looking beyond the
technological hype.
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 49 / 50
50. Thanks a lot for your attention
Dominique Guinard
Contact details:
www.guinard.org
Blog:
www.webofthings.com
Software:
www.webofthings.com/projects
Papers and articles:
www.guinard.org/publications
Special thanks to:
Vlad Trifa, Simon Mayer, Christian
Floerkemeier, Mathias Mueller, Mathias
Fischer and the WoT members…
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 50 / 50
51. References All our papers are on: www.guinard.org/publications
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
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 51 / 50
52. References
6. Pautasso, Cesare, Olaf Zimmermann, and Frank Leymann.
“Restful web services vs. "big" web services: making the right
architectural decision.” WWW '08
7. Pautasso, Cesare, and Erik Wilde. “Why is the Web Loosely
Coupled? A Multi-Faceted Metric for Service Design.”
WWW’09
8. Kindberg, Tim, John Barton, Jeff Morgan, Gene Becker, Debbie
Caswell, Philippe Debaty, Gita Gopal, et al. “People, places,
things: web presence for the real world.” Mob. Netw. Appl. 7,
no. 5 (2002): 365-376.
9. Dominique Guinard, Mathias Fischer, Vlad Trifa
“Sharing Using Social Networks in a Composable Web of
Things.” Proc. of the First IEEE International Workshop on the
Web of Things (WOT2010). Mannheim, Germany, March 2010
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 52 / 50
53. References
10. Yazar, D., & Dunkels, A.. Efficient application integration in
IP-based sensor networks. Proceedings of the First ACM
Workshop on Embedded Sensing Systems for Energy-
Efficiency in Buildings (p. 4350). Berkeley, CA, USA.
Credit Suisse, May 30, 2011 Dominique Guinard ETH / MIT 53 / 50