WoT @ Oracle-Labs

46
Researching the Web of Things Dominique Guinard MIT Auto-ID Labs / ETH Zurich / SAP Research

description

Presentation of the Web of Things for Oracle Labs in Menlo Park, California.

Transcript of WoT @ Oracle-Labs

Page 1: WoT @ Oracle-Labs

Researching the Web of Things

Dominique GuinardMIT Auto-ID Labs / ETH Zurich / SAP Research

Page 2: WoT @ Oracle-Labs

2Dominique Guinard MIT / ETH

I, in a Nutshell

2005: Bachelor in Fribourg: RFID Indoor Assets Tracking

Framework (RFIDLocator) @ Sun Microsystems

2006 – 2007: Master in Lancaster: Service architecture for sensor

supported interactions from mobile phones

2007 – 2008: Auto-ID Labs Zurich: « Mobile Internet of Things » project

with Nokia Research.

2007 – 2011: SAP: Socrades & Sensei IoT projects

2008 – now: Ph.D. @ ETH Zurich: Pervasive Computing, Web of Things

2010 – now: Visiting Researcher @ MIT: Web-enablement of the RFID network

Oracle-Labs, Jan. 26, 2011

Page 3: WoT @ Oracle-Labs

3Dominique Guinard MIT / ETH

INTRODUCTION AND MOTIVATION

What’s the Web of Things? What is it good for?

[http://www.flickr.com/photos/moragcasey/]

Oracle-Labs, Jan. 26, 2011

Page 4: WoT @ Oracle-Labs

4Dominique Guinard MIT / ETH

The Embedded Systems Era

Ubiquitous: Home appliances Industries Smart Cities

Connected: Zigbee, Bluetooth, Wifi

Application Integration?

Oracle-Labs, Jan. 26, 2011

Page 5: WoT @ Oracle-Labs

5Dominique Guinard MIT / ETH

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.

Oracle-Labs, Jan. 26, 2011

Page 6: WoT @ Oracle-Labs

6Dominique Guinard MIT / ETH

The Web of Things

Oracle-Labs, Jan. 26, 2011

Page 7: WoT @ Oracle-Labs

Today’s Menu

1. Motivation

2. Web of Things Architecture

3. Applications

4. Evaluations

5. Case Study in RFID

6. Challenges beyond REST

7. WoT and the business

7

[http://www.flickr.com/photos/lessio/1346732230/]

Dominique Guinard, ETH / SAP Research

Page 8: WoT @ Oracle-Labs

8Dominique Guinard MIT / ETH

WEB OF THINGS ARCHITECTURE

Building a Web of Things, piece by piece…

[http://www.flickr.com/photos/julianbleecker]

Oracle-Labs, Jan. 26, 2011

Page 9: WoT @ Oracle-Labs

9Dominique Guinard MIT / ETH

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

[2] Architectural styles…

[1] RESTful Web Services.

Oracle-Labs, Jan. 26, 2011

Page 10: WoT @ Oracle-Labs

10Dominique Guinard MIT / ETH

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

Oracle-Labs, Jan. 26, 2011

Page 11: WoT @ Oracle-Labs

11Dominique Guinard MIT / ETH

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

Oracle-Labs, Jan. 26, 2011

Page 12: WoT @ Oracle-Labs

12Dominique Guinard MIT / ETH

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

Uniform Interface Self-Describing Messages

Oracle-Labs, Jan. 26, 2011

Page 13: WoT @ Oracle-Labs

13Dominique Guinard MIT / ETH

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

[3] Facilitating Integration of

Services for WoT

Oracle-Labs, Jan. 26, 2011

Demo!

Page 14: WoT @ Oracle-Labs

14Dominique Guinard MIT / ETH

APPLICATIONS

What can we build on top of the Web of Things?

[http://www.flickr.com/photos/docman]

Oracle-Labs, Jan. 26, 2011

Page 15: WoT @ Oracle-Labs

15Dominique Guinard MIT / ETH

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

Oracle-Labs, Jan. 26, 2011

Page 16: WoT @ Oracle-Labs

16Dominique Guinard MIT / ETH

« Energie Visible »: Mashup and UIs

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]

[4] Increasing Energy Awareness Through Web-enabled Power Outlets.

Oracle-Labs, Jan. 26, 2011

Page 17: WoT @ Oracle-Labs

17Dominique Guinard MIT / ETH

Physical Mashup Editors

• Clickscript:– Javascript (JQuery / DOJO) based

visual language.

• Added wrappers for WoT devices:

– SunSPOT, Ploggs, RFID reader

[http://www.clickscript.ch]

[5] Mashing up Your Web-Enabled Home

Oracle-Labs, Jan. 26, 2011

Demo!

Page 18: WoT @ Oracle-Labs

18Dominique Guinard MIT / ETH

Protecting Access to Things: Friends and Things (FAT)

Oracle-Labs, Jan. 26, 2011

[9] “Sharing Using Social Networks in a

Composable Web of Things.”

Page 19: WoT @ Oracle-Labs

19Dominique Guinard MIT / ETH

Friends and Things: User Interface

Oracle-Labs, Jan. 26, 2011

Demo!

Page 20: WoT @ Oracle-Labs

20Dominique Guinard MIT / ETH

EVALUATION

Ok, it’s easier to build apps upon, but is the WoT really feasible?

[ http://www.flickr.com/photos/myfwc]

Oracle-Labs, Jan. 26, 2011

Page 21: WoT @ Oracle-Labs

21Dominique Guinard MIT / ETH

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.

Oracle-Labs, Jan. 26, 2011

Page 22: WoT @ Oracle-Labs

22Dominique Guinard MIT / ETH

Next Steps: Qualitative Evaluations

Plogg RESTful API & Sun SPOT API used by ~10 independent research labs.

Early feedback: Easy to understand and use Straightforward testing & Web-integration

Evaluation with 80 students: REST easier to understand, more straightforward REST more adapted to embedded devices

Oracle-Labs, Jan. 26, 2011

Page 23: WoT @ Oracle-Labs

23Dominique Guinard MIT / ETH

WEB-ENABLING THE GLOBAL RFID NETWORK

A (business-relevant) case-study in RFID

Oracle-Labs, Jan. 26, 2011

Page 24: WoT @ Oracle-Labs

24Dominique Guinard MIT / ETH

The Web Era

Rise of the WoT: Ubiquitous & Scalable The new universal integration

bus Machines, appliances,

sensors, mobile phones consumer electronics are in

Full of apps, widgets and mashups

Where is RFID?

Web

Oracle-Labs, Jan. 26, 2011

Page 25: WoT @ Oracle-Labs

25Dominique Guinard MIT / ETH

EPC Network in a Nutshell

Integration

Interface

Oracle-Labs, Jan. 26, 2011

Page 26: WoT @ Oracle-Labs

26Dominique Guinard MIT / ETH

Towards a mashable EPC Network

Classical SOAP Web Services adequate for business integration (e.g., ERP): Not so much for more light-weight, ad-hoc integration

Requirements for new API: Low entry barrier for developements (easier/cheaper) Direct data access to users Lightweight (embedded/mobile devices) Easy to scale (cloud)

[6] “Restful web services vs. "big" web services:

making the right architectural decision.”

[7] “Why is the Web Loosely Coupled? A Multi-

Faceted Metric for Service Design.”

Oracle-Labs, Jan. 26, 2011

Page 27: WoT @ Oracle-Labs

27Dominique Guinard MIT / ETH

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

Oracle-Labs, Jan. 26, 2011

Page 28: WoT @ Oracle-Labs

28Dominique Guinard MIT / ETH

Wait, the EPCIS is not Hierachical!

The EPCIS data isn‘t really hierachical: Complex queries become cumbersome:

all events occurring in 2010 for urn:epc:id:sgtin: 0057000.123430.2025 Query-based interface

http://.../eventquery/result?param1=value1&..&paramN=valueN

http://.../eventquery/result?reader=sap:regensdorf:frc:storage&epc=urn:epc:id:sgtin:200057000.*

Oracle-Labs, Jan. 26, 2011

Page 29: WoT @ Oracle-Labs

29Dominique Guinard MIT / ETH

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.

Oracle-Labs, Jan. 26, 2011

Page 30: WoT @ Oracle-Labs

30Dominique Guinard MIT / ETH

Implementation: EPCIS Web-adapter

Oracle-Labs, Jan. 26, 2011

Page 31: WoT @ Oracle-Labs

31Dominique Guinard MIT / ETH

Performance Evaluation

Oracle-Labs, Jan. 26, 2011

Page 32: WoT @ Oracle-Labs

32Dominique Guinard MIT / ETH

EPC Mashup Dashboard

Javascript mashup (GWT). Uses the REST API. Extensible widget base.

Oracle-Labs, Jan. 26, 2011

Demo!

Page 33: WoT @ Oracle-Labs

33Dominique Guinard MIT / ETH

Next Steps: EPC Cloud @ MIT Auto-ID Labs

Oracle-Labs, Jan. 26, 2011

Demo!

Page 34: WoT @ Oracle-Labs

34Dominique Guinard MIT / ETH

CHALLENGES BEYOND REST

Where is/should the Web of Things go?

[http://www.flickr.com/photos/brapke/]

Oracle-Labs, Jan. 26, 2011

Page 35: WoT @ Oracle-Labs

35Dominique Guinard MIT / ETH

Enabling the Real-Time Web: Beyond Client-Server

Client-server paradigm not really natural for sensing application.

Need for sensor push. First step:

Atom (cleaner RSS) / AtomPub

Real push HTML5 Websockets

Pubsubhubbub

Server-sent events

XMPP

Oracle-Labs, Jan. 26, 2011

Page 36: WoT @ Oracle-Labs

36Dominique Guinard MIT / ETH

Search and Performances

Finding Services: HTML5 Microdata RDFa WoT Search:

Google Custom Engine Yahoo Search Monkey Dyser

Performances! Push vs Pull Highly scalable Web-servers

Node.js Grizzly

Cloud solutions: GWE

Oracle-Labs, Jan. 26, 2011

Page 37: WoT @ Oracle-Labs

37Dominique Guinard MIT / ETH

WOT & THE BUSINESS

A Compelling Business Use Case for the WoT

[http://www.flickr.com/photos/daviddmuir/]

Oracle-Labs, Jan. 26, 2011

Page 38: WoT @ Oracle-Labs

38Dominique Guinard MIT / ETH

Actors of the (future) WoT Market

«  Smart Things » manufacturers: Consumer « gadgets »:

Violet, Chumby, Poken, Arimaz

Sensors/actuators nets: Phidget, SunSPOTs, Sentilla,

OpenPicus, etc.

Energy Monitoring and Management: Energy Optimizers, DiyKyoto,

Current Cost, etc.

[http://violet.net/] [http://www.chumby.com]

[http://www.plogginternational.com/] [http://www.diykyoto.com/]

Oracle-Labs, Jan. 26, 2011

Page 39: WoT @ Oracle-Labs

39Dominique Guinard MIT / ETH

Actors of the (future) WoT Market

«  Smart Gateway » providers: There corporation (ex-Nokia),

Oberon.ch, Netgear, Arimaz, ioBridge, etc.

The OSGi folks. Energy dedicated gateways:

Apple, Energy Optimizers[http://therecorporation.com/] [http://www.netgear.com]

[http://www.iobridge.com][http://www.arimaz.com]

Oracle-Labs, Jan. 26, 2011

Page 40: WoT @ Oracle-Labs

40Dominique Guinard MIT / ETH

Actors of the (future) WoT Market

Software / Cloud solution providers Pachube Sensor.Network Google:

Power Meter Visualization API GAE

SAP, Oracle, IBM SAP MII, AII IBM Smarter Planet Sensor Edge Server

[http://www.google.org/powermeter]

[http://www.pachube.com]

[http://www.sap.com]

[http://code.google.com/apis/charttools]

Oracle-Labs, Jan. 26, 2011

Page 41: WoT @ Oracle-Labs

Wrap Up: Beware, WoT is coming!

The vision of our everyday physical world merging with the World Wide Web is becoming a reality.

There is a need for standards or at least good practices. The REST architectural style and the Web are a good

candidates: Ubiquitous Rather easy to understand Scalable Core to the Web Lightweight, etc.

A lot of WoT consumer-products / business opportunities are emerging.

41Dominique Guinard MIT / ETHOracle-Labs, Jan. 26, 2011

Page 42: WoT @ Oracle-Labs

42Dominique Guinard MIT / ETH

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

Oracle-Labs, Jan. 26, 2011

Page 43: WoT @ Oracle-Labs

43Dominique Guinard MIT / ETH

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

Oracle-Labs, Jan. 26, 2011

All our papers are on: www.guinard.org/publications

Page 44: WoT @ Oracle-Labs

44Dominique Guinard MIT / ETH

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 Trifa10. “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

Oracle-Labs, Jan. 26, 2011

Page 45: WoT @ Oracle-Labs

45Dominique Guinard MIT / ETH

Backup

Oracle-Labs, Jan. 26, 2011

Page 46: WoT @ Oracle-Labs

46Dominique Guinard MIT / ETH

Age of Cache

Oracle-Labs, Jan. 26, 2011