Top Banner
École d’Été Web Intelligence 2013 - Web des Objets September 4 th 2013, St. Germain au Mont d’Or Simon Mayer, ETH Zurich Service Integration in the Web of Things
294

Service Integration in the Web of Things

Jan 19, 2015

Download

Education

Simon Mayer

Talk about service integration technologies in REST systems held at the "Web Intelligence 2013 - Le Web des Objets" Summer School on the 4th of September 2013 in Lyon, France. The slides give an overview of the Web of Things and current efforts to integrate services offered by Web-enabled devices.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Service Integration in the Web of Things

Service Integration in the Web of Things 1|Simon Mayer

http://people.inf.ethz.ch/mayersi

École d’Été Web Intelligence 2013 - Web des Objets

September 4th 2013, St. Germain au Mont d’Or

Simon Mayer, ETH Zurich

Service Integration in the Web of Things

Page 2: Service Integration in the Web of Things

Service Integration in the Web of Things 2|Simon Mayer

http://people.inf.ethz.ch/mayersi

MyselfSimon Mayer, PhD Student at ETH Zurich, WoT since 2009

Page 3: Service Integration in the Web of Things
Page 4: Service Integration in the Web of Things
Page 5: Service Integration in the Web of Things
Page 6: Service Integration in the Web of Things

www.cloud-think.com

Page 7: Service Integration in the Web of Things
Page 8: Service Integration in the Web of Things

Example: Sensor Platforms

Sensors: Temperature, Ambient Light, Accelerometer

Actuators: 8 LEDs, Analog Outputs (e.g., motor controller)

Page 9: Service Integration in the Web of Things

Example: Smart Cars

Sensors: Speed, GPS, Fuel Consumption, Total KM

Actuators: Unlock, Start, Accelerate, Brake

Page 10: Service Integration in the Web of Things
Page 11: Service Integration in the Web of Things

Service Integration in the Web of Things 11|Simon Mayer

http://people.inf.ethz.ch/mayersi

Services measure or actuate values in the real, physical

world. They are provided by smart things

Smart environments allow well-informed decisions

Umbrella lights up if the forecast shows rain

Smart environments can perform complex tasks

Example: Music stream that follows the user

Service Integration and the Web of Things

Page 12: Service Integration in the Web of Things

Service Integration in the Web of Things 12|Simon Mayer

http://people.inf.ethz.ch/mayersi

Smart Things can already do powerful tasks by themselves…

Service Integration and the Web of Things

http://koubachi.ch

Page 13: Service Integration in the Web of Things

Open endpoints that are accessible by all authorized users

Modeling according to the REST principles

However, the full potential is realized by

integrating functionality across services

Page 14: Service Integration in the Web of Things

The “Social Web of Things” (Ericsson, 2010)

Note the explicit communication between David and his smart

home…

“Leaving work”, “Sophia comes”, “No dinner”, “Order the usual”

…and the hidden communication between smart things

Oven, carpet vacuuming, smart umbrella, HiFi downloading playlist

Page 15: Service Integration in the Web of Things

Our Menu for Today.

45min.30min.15min.

Introduction/Overview WS-* Web Services

REST Service Integration Features

Service Integration via Structured Metadata

(WoT in the Wild)Semantic Service Integration

vous êtes ici

Page 16: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic MountainsUnexplored State of Usability

Page 17: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic MountainsUnexplored State of Usability

Page 18: Service Integration in the Web of Things

Service Integration in the Web of Things 18|Simon Mayer

http://people.inf.ethz.ch/mayersi

Service Integration in the Web of Things

Overview: WoT Concepts and Challenges

Saint Germain au Mont d’Or, Francesaintgermainaumontdor.fr

École d’Été Web Intelligence 2013 - Web des Objets

September 4th 2013, St. Germain au Mont d’Or

Simon Mayer, ETH Zurich

Page 19: Service Integration in the Web of Things

Service Integration in the Web of Things 19|Simon Mayer

http://people.inf.ethz.ch/mayersi

Definitions of the following concepts in a Web of Things

context

Major challenges for service integration

Overview

Web of Things Concepts and Challenges

Smart ThingsServices

Service

IntegrationService

Mashups

Arrive-and-

Operate

Mashup

Management

Automatic Service

Composition

Page 20: Service Integration in the Web of Things

Service Integration in the Web of Things 20|Simon Mayer

http://people.inf.ethz.ch/mayersi

Cyber-physical functionality

Sensing, Actuation (or both) of real, physical quantities

Structured according to the REST principles

Respect the HATEOAS property (application statelessness)

Interfaces are “open”, but secure

Fully described for people and machines

Interacting Smart Things: Smart Environments

Smart Things in the Web of Things (WoT)

Page 21: Service Integration in the Web of Things

Service Integration in the Web of Things 21|Simon Mayer

http://people.inf.ethz.ch/mayersi

Smart Things in the Web of Things

Example: RESTful Sun SPOTs

http://vs3.inf.ethz.ch:8081/sunspots/Spot3

GET

<HTML>…

GET

json

Page 22: Service Integration in the Web of Things

Service Integration in the Web of Things 22|Simon Mayer

http://people.inf.ethz.ch/mayersi

Generally: Services are Sub-Resources of Smart Things

A Smart Thing itself (i.e., the top URL) can also be a service

Services in the Web of Things

M. Kovatsch, S. Mayer, and B. Ostermaier. Towards the Thin Server Architecture for the Internet of Things, 2012

Page 23: Service Integration in the Web of Things

Service Integration in the Web of Things 23|Simon Mayer

http://people.inf.ethz.ch/mayersi

Services in the Web of Things

Example: RESTful Sun SPOTs

Temperature Sensor:

http://vs3.inf.ethz.ch:8081/sunspots/Spot3/sensors/temperature

GET

28.5

Page 24: Service Integration in the Web of Things

Service Integration in the Web of Things 24|Simon Mayer

http://people.inf.ethz.ch/mayersi

Services in the Web of Things

Example: RESTful Sun SPOTs

PUT

‘on

OK

LED Switch: vs3.inf.ethz.ch:8081/sunspots/Spot3/actuators/leds/3/switch

Page 25: Service Integration in the Web of Things

Service Integration in the Web of Things 25|Simon Mayer

http://people.inf.ethz.ch/mayersi

Prevalent Types

Visual Data Rendering

Cartographic / Geographic

Data Converters, Aggregators (Feeds, News)

Examples: programmableweb.com/mashups

In the Web of Things, mashups also act on physical

quantities!

Service Mashups in the Web of Things

“A mashup (…) is a web application that

uses content from more than one source to

create a single new service.”

Page 26: Service Integration in the Web of Things

Service Integration in the Web of Things 26|Simon Mayer

http://people.inf.ethz.ch/mayersi

Mashups in the Web of Things

Example: Anti-Theft Mashup

Shop management system + RFID reader + Web Cam

All with Web servers on-board!

Goal: Take a picture if a theft is detected= if an item is read by the RFID reader but not marked as “sold”

Send the picture to a mobile phone

D. Guinard, C. Floerkemeier, S. Sarma. Cloud Computing, REST and Mashups to Simplify RFID Application Development and Deployment, 2011

Page 27: Service Integration in the Web of Things

Service Integration in the Web of Things 27|Simon Mayer

http://people.inf.ethz.ch/mayersi

Mashups in the Web of Things

Example: Room Configuration

Page 28: Service Integration in the Web of Things

Service Integration in the Web of Things 28|Simon Mayer

http://people.inf.ethz.ch/mayersi

Enabling people to talk to services

Enabling services to talk to each other and form mashups

Enabling people to talk to service mashups

Service Integration in the Web of Things

Page 29: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic MountainsUnexplored State of Usability

Page 30: Service Integration in the Web of Things

Now, let’s talk about some

challenges in service

integration

Arrive-and-Operate: Service Discovery and Look-Up

Mashup Management: For Everyone

Automatic Service Composition

Page 31: Service Integration in the Web of Things

Now, let’s talk about some

challenges in service

integration

Arrive-and-Operate: Service Discovery and Look-Up

Mashup Management: For Everyone

Automatic Service Composition

Page 32: Service Integration in the Web of Things

Service Integration in the Web of Things 32|Simon Mayer

http://people.inf.ethz.ch/mayersi

Advertise services that are provided by devices within a

smart environment!

Arrive and Operate

Service Discovery

What’s the current

temperature?I know that!

It’s 23°C

Thank you :-)

Page 33: Service Integration in the Web of Things

Service Integration in the Web of Things 33|Simon Mayer

http://people.inf.ethz.ch/mayersi

Arrive and Operate

Service Look-Up

It’s not static text documents anymore!

Possible to use Google for this?

Which attributes? Keywords, Device Type, Reviews,..

Search Engines for the WoT, e.g., Dyser, InfraWoT

B. Ostermaier, K. Römer, F. Mattern, M. Fahrmair, and W. Kellerer. A Real-Time Search Engine for the Web of Things, 2010

S. Mayer, D. Guinard, and V. Trifa. Searching in a Web-based Infrastructure for Smart Things, 2012

Page 34: Service Integration in the Web of Things

Service Integration in the Web of Things 34|Simon Mayer

http://people.inf.ethz.ch/mayersi

Search for smart things that exhibit a given state at the

time of the query

“Empty rooms that have a temperature of 23°C”

Querying for real-time states is expensive!

Dyser: Create statistical models for sensors. First query

sensors that likely satisfy the parameters

Arrive and Operate

Service Look-Up: Dyser

Page 35: Service Integration in the Web of Things

Service Integration in the Web of Things 35|Simon Mayer

http://people.inf.ethz.ch/mayersi

Now, let’s talk about some

challenges in service

integration

Arrive-and-Operate: Service Discovery

Mashup Management: For Everyone

Automatic Service Composition

Page 36: Service Integration in the Web of Things

Service Integration in the Web of Things 36|Simon Mayer

http://people.inf.ethz.ch/mayersi

Non-PhD-Nabaztag idea: Dom Guinard

Mashups for Everyone

I don’t have a PhD in computer

science...

Enable tech-savvy users to develop applications that

leverage functionality from sensors and actuators

[“programming the real world”]

Page 37: Service Integration in the Web of Things

Service Integration in the Web of Things 37|Simon Mayer

http://people.inf.ethz.ch/mayersi

Mashups for Everyone

Graphical Editors for Physical Mashups

Facilitate the composition of RESTful services Clickscript (JavaScript-based visual programming language)

https://github.com/lnaef/ClickScript

Web of Things modules: Thermometer, fan, etc.

Page 38: Service Integration in the Web of Things

Service Integration in the Web of Things 38|Simon Mayer

http://people.inf.ethz.ch/mayersi

Mashups for Everyone

Graphical Editors for Physical Mashups

[Clickscript.ch]

D. Guinard, C. Floerkemeier, S. Sarma. Cloud Computing, REST and Mashups to Simplify RFID Application Development and Deployment, 2011

Page 39: Service Integration in the Web of Things
Page 40: Service Integration in the Web of Things

Service Integration in the Web of Things 40|Simon Mayer

http://people.inf.ethz.ch/mayersi

Now, let’s talk about some

challenges in service

integration

Arrive-and-Operate: Service Discovery

Mashup Management: For Everyone

Automatic Service Composition

Page 41: Service Integration in the Web of Things

Service Integration in the Web of Things 41|Simon Mayer

http://people.inf.ethz.ch/mayersi

Automatic Service Composition

Embed information about what smart things can do!

Syntactic level: Data type, units of measurement, etc.

Semantic level: “What is the meaning of this data?”

Is automatic mashup creation even possible? We’ll see… :-D

...and tell others!

Page 42: Service Integration in the Web of Things

Service Integration in the Web of Things 42|Simon Mayer

http://people.inf.ethz.ch/mayersi

Smart Service Composition

Possibilities

Page 43: Service Integration in the Web of Things

Service Integration in the Web of Things 43|Simon Mayer

http://people.inf.ethz.ch/mayersi

Smart Service Composition

Possibilities

Page 44: Service Integration in the Web of Things

Service Integration in the Web of Things 44|Simon Mayer

http://people.inf.ethz.ch/mayersi

Smart Service Composition

Possibilities

Page 45: Service Integration in the Web of Things

Service Integration in the Web of Things 45|Simon Mayer

http://people.inf.ethz.ch/mayersi

Smart Service Composition

Possibilities

Page 46: Service Integration in the Web of Things

Service Integration in the Web of Things 46|Simon Mayer

http://people.inf.ethz.ch/mayersi

Web of Things Concepts

Smart Things and Smart Environments

Services

Service Integration

Service Mashups

Web of Things Challenges

Arrive and Operate: Service Discovery and Look-Up

Mashups: Enable tech-savvy users to program the real world

Service Composition: Fully automatic?

Summary

Page 47: Service Integration in the Web of Things

Introductory Stroll

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic MountainsUnexplored State of Usability

WS-* Forest

Page 48: Service Integration in the Web of Things

Service Integration in the Web of Things 48|Simon Mayer

http://people.inf.ethz.ch/mayersi

Service Integration in the Web of Things

A History Primer: WS-* Web Services

Sonoma County, USAahmadladhani.wordpress.com

École d’Été Web Intelligence 2013 - Web des Objets

September 4th 2013, St. Germain au Mont d’Or

Simon Mayer, ETH Zurich

Page 49: Service Integration in the Web of Things

Service Integration in the Web of Things 49|Simon Mayer

http://people.inf.ethz.ch/mayersi

Service Integration in the Web of Things

A History Primer: WS-* Web Services

Bliss, Microsoftahmadladhani.files.wordpress.com

École d’Été Web Intelligence 2013 - Web des Objets

September 4th 2013, St. Germain au Mont d’Or

Simon Mayer, ETH Zurich

Page 50: Service Integration in the Web of Things

Introductory Stroll

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic MountainsUnexplored State of Usability

WS-* Forest

Page 51: Service Integration in the Web of Things

Service Integration in the Web of Things 51|Simon Mayer

http://people.inf.ethz.ch/mayersi

Here, endpoints are service calls, not resources

Resource: www.myserver.org/thermometer/temperature

Service: www.myserver.org/getTemperature

Main Technologies:

Service Access SOAP

Service Description WSDL

Service Discovery UDDI

The Service-Oriented Architecture

Page 52: Service Integration in the Web of Things

Service Integration in the Web of Things 52|Simon Mayer

http://people.inf.ethz.ch/mayersi

Challenge (1995):

How to make heterogeneous services on the

Internet discoverable and usable for clients?

Internet too heterogeneous for a single RPC technology

Goal: Language-independent standards for Web Services

The Service-Oriented Architecture

Main Technologies

Page 53: Service Integration in the Web of Things

Service Integration in the Web of Things 53|Simon Mayer

http://people.inf.ethz.ch/mayersi

SOAP: Service Access (1998)

“Simple Object Access Protocol”, today just “SOAP”

Dave Winder (also RSS!), together with MS engineers

Transport usually via HTTP, but also possible via, e.g., SMTP

The Service-Oriented Architecture

Main Technologies: SOAP

Page 54: Service Integration in the Web of Things

Service Integration in the Web of Things 54|Simon Mayer

http://people.inf.ethz.ch/mayersi

WSDL: Service Description (2000)

Web Services Description Language

IBM, MS, Ariba

UDDI: Service Discovery (2000)

Universal Description Discovery and Integration (part of WS-I)

MS, IBM, Ariba

SOAP, WSDL, and UDDI are part of the WS-* stack

The Service-Oriented Architecture

Main Technologies: WSDL and UDDI

Page 55: Service Integration in the Web of Things

Service Integration in the Web of Things 55|Simon Mayer

http://people.inf.ethz.ch/mayersi

The Service-Oriented Architecture

Main Technologies

XML Documens

Client Server

Registry-Service

UDDI

WSDLWSDL

SOAP

register

look up

request / reply

Material adapted from: F. Mattern, Distributed Systems Lecture, ETH Zurich, 2012

Page 56: Service Integration in the Web of Things

Service Integration in the Web of Things 56|Simon Mayer

http://people.inf.ethz.ch/mayersi

The Service-Oriented Architecture

Main Technologies

Client Server

Lookup-Service

UDDI

WSDLWSDL

SOAP

register

look up

request / reply

SOAP envelope

Header (optional)

Body

WSDL description

types, messages

portType

binding

service

Page 57: Service Integration in the Web of Things

Service Integration in the Web of Things 57|Simon Mayer

http://people.inf.ethz.ch/mayersi

The Service-Oriented Architecture

Main Technologies: SOAP

SOAP envelope

Header (optional)

Body

Envelope

SOAP Definition and Encoding Style

Optional Header

Transaction Context: Authentication and Billing

Body

Page 58: Service Integration in the Web of Things

Service Integration in the Web of Things 58|Simon Mayer

http://people.inf.ethz.ch/mayersi

Types: What does the exchanged data look like?WSDL description

types, messages

portType

binding

service

Messages: What are messages composed of?

PortType: What do the operations look like?

Binding: Which protocol to use?

Service: Structure/Bundling of operations

The Service-Oriented Architecture

Main Technologies: WSDL

Page 59: Service Integration in the Web of Things

Service Integration in the Web of Things 59|Simon Mayer

http://people.inf.ethz.ch/mayersi

Types: Define Serialization Objects

<xs:element name="myName" type="myObject"/>

<xs:complexType name="myObject"><xs:sequence><xs:element name="i" type="xs:int"/><xs:element name="j" type="xs:float"/>

</xs:sequence></xs:complexType>

“complexType”: Composite Objects!

WSDL description

types, messages

portType

binding

service

The Service-Oriented Architecture

Main Technologies: WSDL

Page 60: Service Integration in the Web of Things

Service Integration in the Web of Things 60|Simon Mayer

http://people.inf.ethz.ch/mayersi

Messages

<message name="myRequest"><part name="parameters"

element="tns:myName"/><part name="optionalParameters"

element="tns:myOpt"/></message>

<message name="myResponse"><part name="result" element="tns:myRet"/>

</message>

WSDL description

types, messages

portType

binding

service

The Service-Oriented Architecture

Main Technologies: WSDL

“tns”: target namespace

myObject

Page 61: Service Integration in the Web of Things

Service Integration in the Web of Things 61|Simon Mayer

http://people.inf.ethz.ch/mayersi

PortType: Define Operations

<portType name="groupOfServices"><operation name="myService"><input message="tns:myRequest"/><output message="tns:myResponse"/><fault message="tns:someFault"/>

</operation></portType>

WSDL description

types, messages

portType

binding

service

The Service-Oriented Architecture

Main Technologies: WSDL

There can also be multiple operations

Page 62: Service Integration in the Web of Things

Service Integration in the Web of Things 62|Simon Mayer

http://people.inf.ethz.ch/mayersi

Transport Binding

<binding name="myBinding“type="tns:allMyServices">

<soap:bindingtransport="http://schemas.xml-soap.org/soap/http"

style="document"/></binding>

WSDL description

types, messages

portType

binding

service

The Service-Oriented Architecture

Main Technologies: WSDL

Page 63: Service Integration in the Web of Things

Service Integration in the Web of Things 63|Simon Mayer

http://people.inf.ethz.ch/mayersi

Service: Packaging the Service

<service name="SimpleService"><port binding="tns:myBinding">

<soap:address location=“http://simpleService.org"/>

</port></service>

WSDL description

types, messages

portType

binding

service

The Service-Oriented Architecture

Main Technologies: WSDL

Page 64: Service Integration in the Web of Things

Service Integration in the Web of Things 64|Simon Mayer

http://people.inf.ethz.ch/mayersi

Stubs handle communication issues such as message packingand unpacking (“marshalling”)

Server stub is also responsible for publishing the WSDL file

The Service-Oriented Architecture

WS-* in Practice

Applic

ation-S

erv

er

Server Logic

Server Stub

Clie

nt

Client Stub

Client Logic

Page 65: Service Integration in the Web of Things

Service Integration in the Web of Things 65|Simon Mayer

http://people.inf.ethz.ch/mayersi

The “server stub” Handle SOAP marshalling

Publish WSDL

Two possibilities to create the server stub

1. Bottom-Up / Code-First: Stub from implementation

Example on next slide (JAX-WS)

2. Top-Down / Contract-First: Stub from Interface WSDL

The Service-Oriented Architecture

WS-* in Practice: WS-* Servers

Applic

ation-S

erv

er

Server Logic

Server Stub

Page 66: Service Integration in the Web of Things

Service Integration in the Web of Things 66|Simon Mayer

http://people.inf.ethz.ch/mayersi

The Service-Oriented Architecture

Java API for XML Web Services (JAX-WS)

Java Annotations to create Web Services from simple Java code

Page 67: Service Integration in the Web of Things

Service Integration in the Web of Things 67|Simon Mayer

http://people.inf.ethz.ch/mayersi

Stubs handle communication issues such as message packing and unpacking (“marshalling”)

Server stub is also responsible for publishing the WSDL file

The Service-Oriented Architecture

WS-* in Practice

Applic

ation-S

erv

er

Server Logic

Server Stub

Clie

nt

Client Stub

Client Logic

Page 68: Service Integration in the Web of Things

Service Integration in the Web of Things 68|Simon Mayer

http://people.inf.ethz.ch/mayersi

The “client stub” handles SOAP marshalling

Two options:

1. Bottom-Up / Code-First: Stub from implementation

2. Contract-First: Stubs from WSDL

Highly appealing for enterprises!

The Service-Oriented Architecture

WS-* in Practice: WS-* Clients

Clie

nt

Client Stub

Client Logic

Page 69: Service Integration in the Web of Things

Service Integration in the Web of Things 69|Simon Mayer

http://people.inf.ethz.ch/mayersi

The Service-Oriented Architecture

Discussion of WS-*

Immensely powerful and lots of available tools!

Huge complexity - hard to learn

WSDL: Enormous documents for simple functionality!

SOAP: Only POST (for http-binding)

Therefore no http-based caching possible!

UDDI: No role-based access, no service life-cycle

management, limited look-up capabilities (IBM, 2007)

Page 70: Service Integration in the Web of Things

Service Integration in the Web of Things 70|Simon Mayer

http://people.inf.ethz.ch/mayersi

It is that it has features that encourage the

compiling of clients against it, and that

such clients are not flexible enough to

adapt to changing interfaces

(creation of client stubs from WSDL)

One of the biggest problems of WSDL (and WADL, see later) isn’t technical…

Page 71: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic Mountains

REST Beacon of Hope

Page 72: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 72|Simon Mayer

http://people.inf.ethz.ch/mayersi

Service Integration in the Web of Things

(Back) to the Future: REST

CERN, Switzerland/Francehome.web.cern.ch

École d’Été Web Intelligence 2013 - Web des Objets

September 4th 2013, St. Germain au Mont d’Or

Simon Mayer, ETH Zurich

Page 73: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 73|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Google Trends, 2004-2013

LHC

Image: Compact Muon Solenoid Experiment

[one of the main particle detectors at CERN]

Page 74: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic Mountains

REST Beacon of Hope

Page 75: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 75|Simon Mayer

http://people.inf.ethz.ch/mayersi

Introduction to REST by Michaël and Lionel (yesterday)

Comparison of REST and WS-*

Google Trends

Performance of REST vs. WS-*

Ease of use of REST and WS-*

A different approach to understanding REST

The main REST feature for service integration: HATEOAS

Overview: REST, WS-*, and HATEOAS

Page 76: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 76|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Google Trends, 2004-2013

SOAP

Makes no sense to look this up… ;-)

Page 77: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 77|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Google Trends, 2004-2013

“SOAP Java”

Page 78: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 78|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Google Trends, 2004-2013

WSDL

Page 79: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 79|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Google Trends, 2004-2013

UDDI

Page 80: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 80|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Google Trends, 2004-2013

REST

Makes little sense to look this up either… ;-)

Page 81: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 81|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Google Trends, 2004-2013

RESTful

Page 82: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 82|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Google Trends, 2004-2013

UDDIRESTful

“SOAP Java”

Page 83: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 83|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST outperforms WS-*

Some data in a minute…

REST is a better fit to the “Do-It-Yourself” Web

Often frontend creation, i.e., quick data access

“Web Developers” vs. “Programmers”

WS-* suite is a complex standard, now

Makes it hard to use for novices

Some data in a minute…

REST and WS-*

The Downside of WS-* Web Services…

Page 84: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 84|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and SOAP on devices with limited resources

REST and WS-*

Performance

Power Consumption [mW] Completion Time [s]

D. Yazar and A. Dunkels: Efficient Application Integration in IP-based Sensor Networks, 2009

Page 85: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 85|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Better Fit for Do-It-Yourself Web

RESTful vs. “Big” Web Services

REST for tactical, ad hoc integration over the Web

(“Mashups”)

WS-* in professional enterprise application integration

scenarios with a longer lifespan and advanced QoS

requirements

Today, REST is being more and more adopted for this use case!

C. Pautasso, O. Zimmermann, and F. Leymann: RESTful Web Services vs. “Big” Web Services. Making the Right Architectural Decision, 2008

Page 86: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 86|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Complexity & Approachability

Also consider the perceived ease of use as a key to the

adoption of an IT system

Increasing reliance on external developers to build

innovative services (App Store, Google Play, etc.)

F. D. Davis. Perceived Usefulness, Perceived Ease of Use, and User Acceptance of Information Technology, 1989

D. Gefen and M. Keil. The Impact of Developer Responsiveness on Perceptions of Usefulness and Ease of Use, 1998

An easy to learn and easy to use API is key

to foster a broad community of developers!

Page 87: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 87|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective

Study to evaluate the developers’ experience when

learning and implementing Web Service applications

Perceived advantages & disadvantages of REST and WS-*

Ease and speed of learning

Perceived suitability of REST and WS-* for different scenarios

Participants

Computer science students (n = 69)

Third or fourth year of Bachelor studies

D. Guinard, I. Ion, S. Mayer: REST or WS-*? A Developers’ Perspective, 2011

Page 88: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 88|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Study Setup

Data Sources (quantitative and qualitative feedback)

1. Implementation Task Teams (n = 25)

2. Structured Questionnaire Individual (n = 69)

3. Feedback Form Anonymous (n = 37)

Implementation Task: Mobile Phone Applications (n = 25)

Access temperature measurements on wireless sensor nodes

a. RESTful API

b. WS-* (WSDL + SOAP) API

Standard libraries: Apache HTTPClient for REST, kSoap2 for WS-*

All course material is available online: tinyurl.com/vs-material

Page 89: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 89|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Study Setup

Page 90: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 90|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Study Setup

2. Structured Questionnaire (n = 69)

Advantages and disadvantages of REST and WS-*

Suitability of WS-* and REST in different domains

Completed after finishing implementation

3. Anonymous Feedback Form (n = 37)

WS-* / REST ease and speed of learning

Suitability of WS-* / REST in different domains

Completed after finishing implementation

Page 91: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 91|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Results

Perceived advantages of each technology

Ease and speed of learning

Perceived suitability for use cases

Embedded devices

Mobile phone client applications

Business applications

Page 92: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 92|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Perceived Advantages

REST

Very easy to understand, learn, and implement (36 participants)

More lightweight (27)

More scalable (21)

WS-*

WSDL enables service contracts (31)

Better security features (19)

Better level of abstraction (11)

Qualitative Results, n = 69

Page 93: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 93|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Ease of Learning

“Easy” or “Very easy” to learn

REST: 70%

WS-*: 11%

REST M = 3.85, SD = 1.09

WS-* M = 2.50, SD = 1.10

REST significantly easier to learn (p < 0.001, Wilcoxon signed rank test)

Not easy at all Not easy Average Easy Very easy

0

2

4

6

8

10

12

14

16

18

REST

WS-*

5 point Likert scale [1 = Not easy at all, ..., 5 = Very easy], n = 37

Page 94: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 94|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Speed of Learning

“Fast” or “Very fast” to learn

REST: 65%

WS-*: 0%

REST: M = 3.43, SD = 1.09

WS-*: M = 2.21, SD = 0.80

REST significantly faster to learn (p < 0.009, Wilcoxon signed rank test)

Not fast at all Not fast Average Fast Very fast

0

2

4

6

8

10

12

14

REST

WS-*

5 point Likert scale [1 = Not fast at all, ..., 5 = Very fast], n = 37

Page 95: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 95|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST easier to learn because RESTful Web Services are based on

familiar technologies such as HTTP (9)

REST made it easier to understand what services the sensor nodes

offer (25). This is because of the HTML interface (8)

WSDL and SOAP are more complex to use (8)

Good that WSDL is “standard” (7)

REST and WS-*

Developers’ Perspective: Summary

“REST is easy and WS-* is

just a complicated mess.”

“Everybody who is using a browser

already knows a little about [REST]”

Qualitative Results, n = 69

Page 96: Service Integration in the Web of Things

[http://www.innoq.com/soa/ws-standards/poster/innoQ%20WS-Standards%20Poster%202007-02.pdf]

WS-* Standards Overview

Page 97: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 97|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Use Cases

Would you use REST or WS-* for…

… Embedded Devices?

… Mobile Phone Clients?

… Business Applications?

Page 98: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 98|Simon Mayer

http://people.inf.ethz.ch/mayersi

5 point Likert scale [1 = WS-*, ..., 5 = REST], n = 37

REST and WS-*

Developers’ Perspective: Use Cases

Page 99: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 99|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Use Cases

Embedded Devices

REST (66%), WS-* (8%)

Reasons: REST better in heterogeneous environments, more

lightweight

Smart Home Sensor Network (students’ private homes)

REST (89%), WS-* (7%)

Reasons: Simplicity of deployment and use (24)

(avg. footprint 17.46 kB for REST, 83.27 kB for WS-* application)

5 point Likert scale [1 = WS-*, ..., 5 = REST], n = 37 + qualitative data

Page 100: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 100|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Use Cases

Mobile Phones

REST (53%), WS-* (16%), 32% undecided

Reasons: REST causes less traffic (7)

Undecided reasons: Mobile phones getting very powerful

5 point Likert scale [1 = WS-*, ..., 5 = REST], n = 37 + qualitative data

Page 101: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 101|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Use Cases

Business Applications

WS-* (52%), REST (24%)

WS-* Reasons: Security needs (21), better service contracts (18)

REST Reasons: Simplicity (10), Scalability (10)

5 point Likert scale [1 = WS-*, ..., 5 = REST], n = 37 + qualitative data

Page 102: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 102|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

Developers’ Perspective: Summary

REST: Intuitive, flexible, lightweight

WS-*: Advanced security, standardization, contracts

Learning Ease and Speed: REST Preference (significant)

Embedded and Mobile Apps: REST Preference (significant)

Business Applications: WS-* Preference (not significant)

Study done among novice developers

Page 103: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 103|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

REST Advantages: Summary

Great for open, interoperable APIs Greatly facilitates creation of mashups

Web features for free Bookmark your devices and their functionality

Caching for scalability, security mechanisms

People are used to exploring the Web using a browser

Seems to facilitate application development

Page 104: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 104|Simon Mayer

http://people.inf.ethz.ch/mayersi

REST and WS-*

REST Advantages: Summary

REST and SOAP on devices with limited resources

UDDI discontinued by IBM, Microsoft, SAP in 2006

Functionality removed from Windows Server in 2010

WS-* APIs discontinued by Google in 2011

Power Consumption [mW] Completion Time [s]

[derekskeba.com]

Page 105: Service Integration in the Web of Things

Try to avoid repeating the same mistakes for service

integration in the Web of Things

Do not create service descriptions

that encourage the compiling of

clients against them

Page 106: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic Mountains

Page 107: Service Integration in the Web of Things

Now for the cool stuff: HATEOAS[or, Hypermedia as the Engine of Application State]

[or, the server guides clients using hyperlinks]

Page 108: Service Integration in the Web of Things

Did you ever experience that the “back”

button broke a hypermedia application?e-banking, e-commerce, flights booking, etc.

Why is that?

Page 109: Service Integration in the Web of Things

“The Hypertext Transfer Protocol (HTTP)

is a networking protocol for distributed,

collaborative, hypermedia information

systems. HTTP is the foundation of data

communication for the World Wide Web.”“Prominent members

include the Hypertext

Transfer Protocol.”

http://en.wikipedia.org/wiki/HTTP

http://en.wikipedia.org/wiki/Networking_protocol

http://en.wikipedia.org/wiki/WWW

http://en.wikipedia.org/wiki/URI

http://en.wikipedia.org/wiki/Hyperlink

HATEOAS: Simple Example

Known URL!

Page 110: Service Integration in the Web of Things

Clients that click “back” break the HATEOAS “contract”!

The server didn’t want a “back” button to be available in the application. Else,

there would be a hypermedia control to enable the “back”-action

Page 111: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 111|Simon Mayer

http://people.inf.ethz.ch/mayersi

All possible state transitions of an application are under

control of the server. To guide clients in applications, the

server provides hyperlinks that they may follow

Clients only follow provided hyperlinks! “follow your nose”

Take Care! What if a client wants to buy a book, but only

finds a link “Add to shopping cart”?

Representational State Transfer (REST)

HATEOAS [Hypermedia as the Engine of Application State]

No Problem!What about

me??

Page 112: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 112|Simon Mayer

http://people.inf.ethz.ch/mayersi

Client context,

e.g.: Do I like

chocolate?

Page contents,

e.g.: ”Zurich”

advertisement

Representational State Transfer (REST)

HATEOAS for Human Clients

Page 113: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 113|Simon Mayer

http://people.inf.ethz.ch/mayersi

Important part of REST! Especially for service integration…

Representational State Transfer (REST)

HATEOAS: Google Trends (2004-2013)

HATEOAS

Page 114: Service Integration in the Web of Things

http://bookstore.org/books/book1

HATEOAS: Book Store Example

Known URL!

“Recommended Books: Book1

Books in your cart: None.

Checkout not possible (no books).”“This is Book1. It’s great!

Add book to cart”

GET books/book1

Page 115: Service Integration in the Web of Things

http://bookstore.org/carts/simon http://bookstore.org/books/book1

http://bookstore.org/checkout?customerID=simon

HATEOAS: Book Store Example

Known URL!

“This is Book1. It’s great!

Add book to cart”

POST carts/simon?book=Book1

“Recommended Books: None

Books in your cart: Book1.

Go to checkout.”

“Select payment type:

Credit Card, Debit Card”

Page 116: Service Integration in the Web of Things

http://bookstore.org/carts/simon

Known URL!

http://bookstore.org/books/book1 http://bookstore.org/XYZ/book1

HATEOAS: Book Store Example

What if the bookstore renames the /books pages?

Page 117: Service Integration in the Web of Things

http://bookstore.org/XYZ/book1

Known URL!

“Recommended Books: Book1

Books in your cart: None.

Checkout not possible (no books).”“This is Book1. It’s great!

Add book to cart”

GET XYZ/book1

HATEOAS: Book Store Example

Page 118: Service Integration in the Web of Things

http://bookstore.org/carts/simonhttp://bookstore.org/XYZ/book1

http://bookstore.org/checkout?customerID=simon

Known URL!

“This is Book1. It’s great!

Add book to cart”

GET XYZ/book1

POST carts/simon?book=Book1

“Recommended Books: None

Books in your cart: Book1.

Go to checkout.”

“Select payment type:

Credit Card, Debit Card”

HATEOAS: Book Store Example

Page 119: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 119|Simon Mayer

http://people.inf.ethz.ch/mayersi

HATEOAS is what adds flexibility to REST systems!

Links are discovered by clients at runtime

Clients will automatically adapt if links change!

This is why browsers are general-purpose tools and not

specialized applications

What if the book store API was described in WSDL?

Risk that clients are compiled from the WSDL

Not mandatory, but was common practice! Why?

WSDLs are more complex to parse and perceived as being static

Representational State Transfer (REST)

HATEOAS and Flexible Service Consumption

Page 120: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 120|Simon Mayer

http://people.inf.ethz.ch/mayersi

We assume that a machine client can follow its nose

Can they, really? What is required to “follow your nose”?

How to combine services from different providers?

They don’t know about each other!

They cannot include links to each other!

HATEOAS cannot accomplish such service integration

tasks alone!

Representational State Transfer (REST)

HATEOAS for Machine Clients: Challenges

Page 121: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic Mountains

Page 122: Service Integration in the Web of Things

This is where HATEOAS breaks down for machine clients!

Options?

Create a new type of WSDL, for RESTful Web Services(top-down, standardization, look at WADL in the next slides)

Offer Web developers ways of annotating their resources(basically the same thing, but taking into account the developers’ perspective / bottom-up)

Page 123: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 123|Simon Mayer

http://people.inf.ethz.ch/mayersi

Web Application Description Language

Initial draft (2005) by Marc Hadley

Sun Microsystems (today: Oracle)

Some words about WADL

WADL

Page 124: Service Integration in the Web of Things

Web-based Interaction with Smart Environments 124|Simon Mayer

http://people.inf.ethz.ch/mayersi

WADL: Repeating WS-* Mistakes?

WADL example to annotate a news search

Alternative Option: OpenSearch

WADL documents are verbose and

perceived as rather rigid

“the REST answer to WSDL”

Risk of compiling against WADL!

http://www.w3.org/Submission/wadl/

http://www.opensearch.org/Specifications/OpenSearch/1.1

Page 125: Service Integration in the Web of Things

Service Integration in the Web of Things 125|Simon Mayer

http://people.inf.ethz.ch/mayersi

Service Integration in the Web of Things

WoT Service Integration

Zurich, Switzerlandethz.ch

École d’Été Web Intelligence 2013 - Web des Objets

September 4th 2013, St. Germain au Mont d’Or

Simon Mayer, ETH Zurich

Page 126: Service Integration in the Web of Things

Service Integration in the Web of Things 126|Simon Mayer

http://people.inf.ethz.ch/mayersi

Example Scenario

Page 127: Service Integration in the Web of Things

Service Integration in the Web of Things 127|Simon Mayer

http://people.inf.ethz.ch/mayersi

User enters personal preferences into smartphone (temperature, preferred song, etc.)

Smartphone negotiates with devices in the surroundings

to set these preferences

Constraints

Must be flexible: Should work in the user’s home, office, hotels, etc.

Interaction metadata must be discoverable on the fly!

Discourage compiling against service descriptions!

Example Scenario

Page 128: Service Integration in the Web of Things

Service Integration in the Web of Things 128|Simon Mayer

http://people.inf.ethz.ch/mayersi

Heterogeneous services from different providers should

be dynamically composable

Services don’t know anything about how to interact with

other services when they are created (i.e., no “standards”)

No HATEOAS: No hyperlinks between services!

Links are known only between “local” services where URLs have

been intentionally linked by the service provider

The big picture…

Page 129: Service Integration in the Web of Things

Service Integration in the Web of Things 129|Simon Mayer

http://people.inf.ethz.ch/mayersi

Make things smart enough to know what they can do…

First level: Syntax

“What type does a service’s output data have?”

REST offers a great mechanism to help with that: Content Negotiation

Second level: Semantics

“Does it make sense to link these two services?”

Service Integration: Self-aware Things!

...and tell others!

Page 130: Service Integration in the Web of Things

Service Integration in the Web of Things 130|Simon Mayer

http://people.inf.ethz.ch/mayersi

Make things smart enough to know what they can do…

First level: Syntax

“What type does a service’s output data have?”

REST offers a great mechanism to help with that: Content Negotiation

Second level: Semantics

“Does it make sense to link these two services?”

Service Integration: Self-aware Things!

...and tell others!

Page 131: Service Integration in the Web of Things

Service Integration in the Web of Things 131|Simon Mayer

http://people.inf.ethz.ch/mayersi

A smart thermostat takes inputs as XML:

The client’s desired temperature is in a JSON document:

Service Integration: “Self-aware” Things?

A Glimpse at Syntactic Service Integration

commonName:”clientX”,

desiredSong:”Yellow Submarine”,

desiredTemperature:”20”

Method: PUT

Endpoint: myserver.org/things/thermostat

Content: (…)<value>23.3</value>(…)

Page 132: Service Integration in the Web of Things

Service Integration in the Web of Things 132|Simon Mayer

http://people.inf.ethz.ch/mayersi

Describe the service’s API in an Internet Media Type!

Make this information public!

Client can now create/render the input and use the service

This is part of REST self-describing messages!

Service Integration: “Self-aware” Things?

A Glimpse at Syntactic Service Integration

Method: PUT

Endpoint: myserver.org/things/thermostat

Content: (…)<value>23.3</value>(…)

Content-Type: application/xml+simon-thermostat

Page 133: Service Integration in the Web of Things

Service Integration in the Web of Things 133|Simon Mayer

http://people.inf.ethz.ch/mayersi

Make things smart enough to know what they can do…

First level: Syntax

“What type does a service’s output data have?”

REST offers a great mechanism to help with that: Content Negotiation

Second level: Semantics

“Does it make sense to link these two services?”

Service Integration: Self-aware Things!

...and tell others!

Page 134: Service Integration in the Web of Things

How to infer that it’s about temperatures

and not about a GPS longitude?

Not possible! They look the same!

Yes, but their semantics are different.

?

Page 135: Service Integration in the Web of Things

True, the messages aren’t self-descriptive with respect to

this: “value” could be anything

Method: PUT

Endpoint: myserver.org/things/thermostat

Content: (…)<value>23.3</value>(…)

But we can fix that, by adding semantic metadata!

Not possible! They look the same!

Page 136: Service Integration in the Web of Things

Alright… from the beginning :-)

We’ll see four service integration techniques, an

example for each, and discuss their suitability for

our considered applications

Page 137: Service Integration in the Web of Things

Service Integration in the Web of Things 137|Simon Mayer

http://people.inf.ethz.ch/mayersi

Simple Hypermedia Crawling

Metadata: Microformats and Microdata

Crowd-sourced Service Integration

Web Linking: “Globalized” HATEOAS?

Semantics-based Service Integration

Web Linking + Metadata Embedding My current research…

Service Integration: “Self-aware” Things?

Techniques for Semantic Service Integration

more

fun

ctio

nality

……

more

co

mp

lexity

Page 138: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic Mountains

Page 139: Service Integration in the Web of Things

Service Integration in the Web of Things 139|Simon Mayer

http://people.inf.ethz.ch/mayersi

Simple Hypermedia Crawling

Metadata: Microformats and Microdata

Crowd-sourced Service Integration

Web Linking: “Globalized” HATEOAS?

Semantics-based Service Integration

Web Linking + Metadata Embedding My own current research…

Service Integration: “Self-aware” Things?

Techniques for Semantic Service Integration

Page 140: Service Integration in the Web of Things

Service Integration in the Web of Things 140|Simon Mayer

http://people.inf.ethz.ch/mayersi

Crawling of hypermedia structures sometimes is already

sufficient as enabler for integration Mainly relies on: GET Well-known, right?

HEAD Who knows this?

OPTIONS And this one?

Friends and Things: Sharing of physical and digital

artifacts via social networks

Techniques for Semantic Service Integration

Hypermedia Crawling

D. Guinard, M. Fischer, V. Trifa. Sharing Using Social Networks in a Composable Web of Things, 2010

Page 141: Service Integration in the Web of Things

Service Integration in the Web of Things 141|Simon Mayer

http://people.inf.ethz.ch/mayersi

@home Sharing your energy consumption

Encouraging energy savings…

@work Laboratory automation

“You may monitor my mass spectrometer”

@business Sharing the trace of tagged products

RESTful EPCIS

Hypermedia Crawling

The Friends and Things Project

Page 142: Service Integration in the Web of Things

Service Integration in the Web of Things 142|Simon Mayer

http://people.inf.ethz.ch/mayersi

Hypermedia Crawling

The Friends and Things Project

Page 143: Service Integration in the Web of Things

Service Integration in the Web of Things 143|Simon Mayer

http://people.inf.ethz.ch/mayersi

FaT must discover thing APIs to be shared first

Entirely done via hypermedia crawling, no semantics whatsoever

Then, things can be shared via the OpenSocial API

…and used by others

Hypermedia Crawling

The Friends and Things Project

Page 144: Service Integration in the Web of Things

Service Integration in the Web of Things 144|Simon Mayer

http://people.inf.ethz.ch/mayersi

Hypermedia Crawling

The Friends and Things Project

Page 145: Service Integration in the Web of Things

Service Integration in the Web of Things 145|Simon Mayer

http://people.inf.ethz.ch/mayersi

Only API discovery, nothing else!

No information about how APIs can be used: Only

specialized applications can use them

For crawling to work, links must already exist!(the “local” hyperlinks problem, again…)

Techniques for Semantic Service Integration

Hypermedia Crawling: Limitations

Page 146: Service Integration in the Web of Things

Service Integration in the Web of Things 146|Simon Mayer

http://people.inf.ethz.ch/mayersi

Hypermedia Crawling

Discussion

Rating Comments

Interface

DiscoveryPartial Requires APIs to be connected via hyperlinks

Automatic

Service UsageNo

Can be used to discover APIs that are then used

by tailored applications (like Friends and Things

does!)

Level of

Semantic

Integration

None No semantic integration whatsoever

Simplicity Very Easy No specific annotations required

Page 147: Service Integration in the Web of Things

Service Integration in the Web of Things 147|Simon Mayer

http://people.inf.ethz.ch/mayersi

Simple Hypermedia Crawling

Metadata: Microformats and Microdata

Crowd-sourced Service Integration

Web Linking: “Globalized” HATEOAS?

Semantics-based Service Integration

Web Linking + Metadata Embedding My own current research…

Service Integration: “Self-aware” Things?

Techniques for Semantic Service Integration

Page 148: Service Integration in the Web of Things

Service Integration in the Web of Things 148|Simon Mayer

http://people.inf.ethz.ch/mayersi

Easy: Find a common way of embedding “useful” metadata

Standardized “structured Data” can be successful… ;-)

vCard supporters:Android, Symbian, Apple Mac OS X, combit Relationship Manager, Egroupware, Kontact,

Lotus Notes, Lotus Organizer, Gmail, Microsoft Outlook, Mozilla Thunderbird, Novell

Evolution, Novell GroupWise, Roundcube, SOGo, Palm Desktop, The Bat, Trillian, Turba,

WebWeaver Suite, etc.

Techniques for Semantic Service Integration

Metadata Embedding

Anybody know the vCard format?

Page 149: Service Integration in the Web of Things

Service Integration in the Web of Things 149|Simon Mayer

http://people.inf.ethz.ch/mayersi

Easy: Find a common way of embedding “useful” metadata

Standardized “structured Data” can be successful… ;-)

Wikipedia “Infoboxes”

Wikidata

Techniques for Semantic Service Integration

Metadata Embedding

http://fr.wikipedia.org/wiki/Lyon

http://www.wikidata.org/wiki/Q456

Page 150: Service Integration in the Web of Things

Service Integration in the Web of Things 150|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microformats

Specifically hRESTS for service integration

Standardized formats for describing contact info, products, etc.

Example application: Service lookup infrastructure

Microdata

Driven by the “big players”, often linked to ontologies

Example application: UI descriptions

Techniques for Semantic Service Integration

Metadata Embeddingboth: HTML!

Page 151: Service Integration in the Web of Things

Service Integration in the Web of Things 151|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microformats

Specifically hRESTS for service integration

Standardized formats for describing contact info, products, etc.

Example application: Service lookup infrastructure

Microdata

Driven by the “big players”, often linked to ontologies

Example application: UI descriptions

Techniques for Semantic Service Integration

Metadata Embedding

Page 152: Service Integration in the Web of Things

Service Integration in the Web of Things 152|Simon Mayer

http://people.inf.ethz.ch/mayersi

Standardized HTML-embeddable structured data profiles

Metadata Embedding

Microformats

<div class="vcard">

<a class="url fn" href="http://tantek.com/">Tantek Çelik</a>

</div>

hCard format

For API descriptions! Next slide!

hRESTS format

Page 153: Service Integration in the Web of Things

Service Integration in the Web of Things 153|Simon Mayer

http://people.inf.ethz.ch/mayersi

Does this really help machine clients?

Microformats

The hRESTS Format for API Descriptions

<div class="service">

This <span class="label">thermostat</span> enables users to

<div class="operation”>

<span class="label">configure the current temperature</span>

. It is invoked using a

<span class="method">PUT</span>

request at

<span class="address">http://myserver.org/thermostat?t=temp</span>

with

<span class="input">the desired temperature</span>

replacing the

<code>temp</code>

parameter.

</div>

</div>Demonstration!

Page 154: Service Integration in the Web of Things

Service Integration in the Web of Things 154|Simon Mayer

http://people.inf.ethz.ch/mayersi

A management infrastructure for smart things

Enables searching for devices in smart environments

Parameters:

UUID, Name, Keywords

Type/Category of device

Location

Reviews

Type of REST API

Microformats

Embedded Microformats Example: InfraWoT

S. Mayer, D. Guinard, and V. Trifa. Searching in a Web-based Infrastructure for Smart Things, 2012

Find a Thermostat at the

location Living Room that

takes a temperature as input

Page 155: Service Integration in the Web of Things

Service Integration in the Web of Things 155|Simon Mayer

http://people.inf.ethz.ch/mayersi

Hierarchies of management nodes, nodes only aware of

direct neighbors

highly scalable! (tested with 100k devices…)

Microformats

The InfraWoT Project

Page 156: Service Integration in the Web of Things

Service Integration in the Web of Things 156|Simon Mayer

http://people.inf.ethz.ch/mayersi

Management infrastructure for smart things

Service Discovery and Look-up

Microformats

The InfraWoT Project

Trifa, V., Guinard, D., Mayer, S. Leveraging the Web for a Distributed Location-aware Infrastructure for the Real World, 2010

Things register

first…

Page 157: Service Integration in the Web of Things

Service Integration in the Web of Things 157|Simon Mayer

http://people.inf.ethz.ch/mayersi

Management infrastructure for smart things

Service Discovery and Look-up

Microformats

The InfraWoT Project

…and can be

found by clients!

Things register

first… Find a Thermostat at the

location Living Room that

takes a temperature as input

Page 158: Service Integration in the Web of Things

Service Integration in the Web of Things 158|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microformats

The InfraWoT Project: Registration

Page 159: Service Integration in the Web of Things

Service Integration in the Web of Things 159|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microformats

The InfraWoT Project: Metadata

Parameters Microformat

Identification Name, UUIDNone. Information

derived from URL

Product Info Device Type, Brand, Price, etc. hProduct

User Reviews Ratings, Description hReview

Context Location (GPS + Indoor Location)GEO for GPS, proprietary

format for indoor

API DescriptionLabel, URL Template, Input,

OutputhRESTS

Page 160: Service Integration in the Web of Things

Service Integration in the Web of Things 160|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microformats

The InfraWoT Project: Service Look-Up

Find a Thermostat at the location

Living Room that takes a

temperature as input

www.myserver.org/things/thermostatMethod: HTTP PUT

Rating: 4.3 (0..5)

hProduct Category

GEO

hRESTS Input

Page 161: Service Integration in the Web of Things

Service Integration in the Web of Things 161|Simon Mayer

http://people.inf.ethz.ch/mayersi

Information is not machine-interpretable

hRESTS service label can only be “understood” by humans!

Only allows to annotate text/html representations

Clumsy embedding via HTML overloading of “class”

Declining interest…

Microformats

Discussion

Microformats

Page 162: Service Integration in the Web of Things

Service Integration in the Web of Things 162|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microformats

Discussion

Rating Comments

Interface

DiscoveryNone Requires to fall back on crawling or indexing

Automatic

Service UsagePartial

hRESTS allows definition of API, but no format to

describe it for machine clients

Level of

Semantic

Integration

PartialMicroformats define the semantics of objects, but

are only partially linked to ontologies

Simplicity MediumCumbersome annotation of HTML

representations required

Page 163: Service Integration in the Web of Things

Service Integration in the Web of Things 163|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microformats

Specifically hRESTS for service integration

Standardized formats for describing contact info, products, etc.

Example application: Service lookup infrastructure

Microdata

Driven by the “big players”, often linked to ontologies

Example application: UI descriptions

Techniques for Semantic Service Integration

Metadata Embedding

Page 164: Service Integration in the Web of Things

Service Integration in the Web of Things 164|Simon Mayer

http://people.inf.ethz.ch/mayersi

Also based on structured data and HTML embedding

New attributes instead of overloading

Part of HTML5

“More semantics”: Linking to ontologies possible via fixed

vocabularies like www.schema.org or data-vocabulary.org

Maintainers: Google, MS, etc.

schema.org

Metadata Embedding

Microdata

Page 165: Service Integration in the Web of Things

Service Integration in the Web of Things 165|Simon Mayer

http://people.inf.ethz.ch/mayersi

Smarter embedding via special HTML attributes<… itemprop=“propertyName”> to annotate specific items

<… itemscope itemprop=“scopeName”> for scoping

Usually added to <span> or <div> tags

Demonstration (navigate to colored LED)

Metadata Embedding

Microdata

<html>…<span itemscope itemprop=“vCard”>This page is

about <span itemprop=“firstName”>Maximilian</span>

<span itemprop=“lastName”>Muster</span> who lives in

<span itemprop=“locality”>Zurich</span></span>…</html>

Page 166: Service Integration in the Web of Things

Service Integration in the Web of Things 166|Simon Mayer

http://people.inf.ethz.ch/mayersi

Goal: Automatic UI generation for smart things

Intuitive interfaces for multiple modalities (GUI, speech, haptics, etc.)

Metadata should be easy to embed for developers

UI Information embedded as Microdata

Microdata

Embedded Microdata Example: InterWoTions

Page 167: Service Integration in the Web of Things

Service Integration in the Web of Things 167|Simon Mayer

http://people.inf.ethz.ch/mayersi

InterWoTions

Human- and machine-readable volume controller interaction markup.

Microdata

The InterWoTions Project

Page 168: Service Integration in the Web of Things

GUI / Touch Screen

Haptic / Gyro

Example: Interaction with a Web-enabled LED

Page 169: Service Integration in the Web of Things

Speech

Haptic / Accelerometer

Example: Interaction with a Web-enabled Power Plug

Page 170: Service Integration in the Web of Things

Haptic / Gyroscope

Example: Interaction with a Web-enabled Toy Robot

Page 171: Service Integration in the Web of Things

GUI / Gyroscope

Composite UIset intensity,

switch, get data,

goto, move

Example: Interaction with iTunesFaster than the iPhone-App!

Page 172: Service Integration in the Web of Things

Service Integration in the Web of Things 172|Simon Mayer

http://people.inf.ethz.ch/mayersi

Yields useful interfaces

Covers lots of use cases: Home automation, A/V, lecture

controls, car controls, etc.

Markup is easily producible for tech-savvy users

Microdata

Embedded Interaction Information: InterWoTions

Page 173: Service Integration in the Web of Things

Service Integration in the Web of Things 173|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microdata

Discussion

Rating Comments

Interface

DiscoveryNone Requires to fall back on crawling or indexing

Automatic

Service UsageNo No standard format to annotate Web APIs

Level of

Semantic

Integration

PartialAllows to define an object’s class/type, if

ontologies like schema.org are used

Simplicity EasyAnnotation of HTML representations required.

Better usability than Microformats

Page 174: Service Integration in the Web of Things

Service Integration in the Web of Things 174|Simon Mayer

http://people.inf.ethz.ch/mayersi

We never actually tried that! Rather, we moved on to explore “full”,

functional semantic integration…

Works only for HTML representations (like Microformats)

W3C working on Microdata-RDF Transformation

Microdata

Discussion

Allows to define an object’s class/type, if

ontologies like schema.org are used

Page 175: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic Mountains

Page 176: Service Integration in the Web of Things

Goal: Extract interesting information about a device

regardless of the annotation format

Approach: Discovery based on a runtime-dynamic set of

strategies (Microformats-Strategy, Microdata-Strategy, proprietary

strategies, etc.)

Brief Outtake! How to merge different embedded

Metadata Descriptions

S. Mayer, D. Guinard. An Extensible Discovery Service for Smart Things, 2011

Page 177: Service Integration in the Web of Things

Forecast: Rain

Temperature: 24˚C Please configure

forecast data source

Your fridge currently

consumes 45W

I’m located in Zurich!

Human-readable and understandable

Lots of smart things…

Page 178: Service Integration in the Web of Things

...and multiple semantic annotation formats...

“data”:[“weather-

forecast”:”Rain”],

“name”:”MyNabaztag”

…<div itemscope><div

itemprop=“tag=“>Illumination</div><div

itemprop=“value”>150</div></div>…

...

<div class="geo">GEO: <span

class="latitude">8.549902</span>,

<span class="longitude">-

47.378088</span></span></div>

“consumption”:”45”,

“unit”:”Watts”,

“appliance”:”fridge”

Page 179: Service Integration in the Web of Things

...and multiple semantic annotation formats...

“data”:[“weather-

forecast”:”Rain”],

“name”:”MyNabaztag”

…<div itemscope><div

itemprop=“tag=“>Illumination</div><div

itemprop=“value”>150</div></div>…

...

<div class="geo">GEO: <span

class="latitude">8.549902</span>,

<span class="longitude">-

47.378088</span></span></div>

Content type:

application/json

Content type: text/html

Annotations: Microdata

Content type: text/html

Annotations: Microformats

Machine-readable

“consumption”:”45”,

“unit”:”Watts”,

“appliance”:”fridge”

Content type:

application/json

Page 180: Service Integration in the Web of Things

Does every smart device have to be

capable of parsing every single

format...?

Page 181: Service Integration in the Web of Things

Service Integration in the Web of Things 181|Simon Mayer

http://people.inf.ethz.ch/mayersi

And it gets worse...

“data”:[“weather-forecast”:”Rain”],

“name”:”MyNabaztag”

Imagine we agreed on everybody using application/json...

Content type:

application/json

“data”:“weather-forecast”:”Rain”,

“name”:”MyNabaztag”

“data-item”:[“weather-forecast”:”Rain”],

“name”:”MyNabaztag”

Page 182: Service Integration in the Web of Things

Service Integration in the Web of Things 182|Simon Mayer

http://people.inf.ethz.ch/mayersi

A single, agreed upon,

standard format

Options for annotating smart things

Or multiple (but few!) formats

Syntax problem remains

Probably not feasible...

Page 183: Service Integration in the Web of Things

Service Integration in the Web of Things 183|Simon Mayer

http://people.inf.ethz.ch/mayersi

Different Syntax: OK!

A method to understand

multiple different formats

Options for annotating smart things

Future formats?

Page 184: Service Integration in the Web of Things

Service Integration in the Web of Things 184|Simon Mayer

http://people.inf.ethz.ch/mayersi

Different Syntax: OK!

An extensible method to

understand multiple

different formats

Options for annotating smart things

Future formats: OK!

Page 185: Service Integration in the Web of Things

Service Integration in the Web of Things 185|Simon Mayer

http://people.inf.ethz.ch/mayersi

Uses multiple strategies to extract metadata

More strategies can be loaded at runtime

Can handle protected resources and resources behind firewalls

Great help for decoupling service providers and consumers

The DiscoWoT Project

GET /analyze?http://thing.org

Information about thing.org

S. Mayer, D. Guinard. An Extensible Discovery Service for Smart Things, 2011

Page 186: Service Integration in the Web of Things

Computer vision techniques + Embedded UI Information

=

Intuitive Interfaces!

Outtake! Embedded Metadata to Interact

with Smart Things!

S. Mayer, M. Schalch, M. George, G. Sörös: Device Recognition for Intuitive Interaction with the Web of Things, 2013

Page 187: Service Integration in the Web of Things

Service Integration in the Web of Things 187|Simon Mayer

http://people.inf.ethz.ch/mayersi

Object Recognition + Embedded UI Metadata

Object

Categorization

Object

Tracking Rendered UI

(InterWoTions)

Page 188: Service Integration in the Web of Things

Service Integration in the Web of Things 188|Simon Mayer

http://people.inf.ethz.ch/mayersi

Object Recognition + Embedded UI MetadataExample: Web-enabled Toy Robot

GUI / Gyroscope

Page 189: Service Integration in the Web of Things

Service Integration in the Web of Things 189|Simon Mayer

http://people.inf.ethz.ch/mayersi

Object Recognition + Embedded UI MetadataExample: Volume Controller

GUI / Gyroscope

Page 190: Service Integration in the Web of Things

Service Integration in the Web of Things 190|Simon Mayer

http://people.inf.ethz.ch/mayersi

Object Recognition + Embedded UI MetadataSoon for cars?

Page 191: Service Integration in the Web of Things

Service Integration in the Web of Things 191|Simon Mayer

http://people.inf.ethz.ch/mayersi

Object Recognition + Embedded UI MetadataSoon for cars?

Page 192: Service Integration in the Web of Things

Service Integration in the Web of Things 192|Simon Mayer

http://people.inf.ethz.ch/mayersi

Object Recognition + Embedded UI MetadataCurrent status…

Page 193: Service Integration in the Web of Things

Service Integration in the Web of Things 193|Simon Mayer

http://people.inf.ethz.ch/mayersi

Microdata-based metadata is absolutely suitable for this!

Lots of potential, if data access is ensured!

Embedded UI information + Object RecognitionConclusion

S. Mayer, C. Beckel, B. Scheidegger, C. Barthels, G. Sörös: Uncovering Device Whispers in Smart Homes, 2012

S. Mayer, M. Schalch, M. George, G. Sörös: Device Recognition for Intuitive Interaction with the Web of Things, 2013

Page 194: Service Integration in the Web of Things

Service Integration in the Web of Things 194|Simon Mayer

http://people.inf.ethz.ch/mayersi

Simple crawling for interface discovery

Requires hyperlinks to be present!

Application: Access right management

Structured Data (Microformats and Microdata) for simple embedding of

metadata in resources

Application: Web of Things search engine

Application: Embedding of interaction information

Take-home Points

Page 195: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic Mountains

Page 196: Service Integration in the Web of Things

Service Integration in the Web of Things 196|Simon Mayer

http://people.inf.ethz.ch/mayersi

Simple Hypermedia Crawling

Metadata: Microformats and Microdata

Crowd-sourced Service Integration

Web Linking: “Globalized” HATEOAS?

Semantics-based Service Integration

Web Linking + Metadata Embedding My own current research…

Service Integration: “Self-aware” Things?

Techniques for Semantic Service Integration

Page 197: Service Integration in the Web of Things

However…

These are constrained to

operating within hypermedia

applications!

They require HATEOAS-style hypermedia controls to be already present!

[example coming right up…]

Page 198: Service Integration in the Web of Things

All possible state transitions of an application are under

control of the server. To guide clients in applications, the

server provides hyperlinks that they may follow

Clients only follow provided hyperlinks! “follow your nose”

Take Care! What if a client wants to buy a book, but

only finds a link “Add to shopping cart”?

Representational State Transfer (REST)

HATEOAS [Hypermedia as the Engine of Application State]

I can do

that! What about

me??

Still remember this?

Page 199: Service Integration in the Web of Things

http://bookstore.org/carts/simon http://bookstore.org/books/book1

http://bookstore.org/checkout?customerID=simon

Example from REST Introduction

Known URL!

“Recommended Books: Book1

Books in your cart: None.

Checkout not possible (no books).”“This is Book1. It’s great!

Add book to cart”

GET books/book1

POST carts/simon?book=Book1

“Select payment type:

Credit Card, Debit Card”

Page 200: Service Integration in the Web of Things

Example from REST Introduction

/book/cart

/checkout

Page 201: Service Integration in the Web of Things

What about multiple stores?

Not possible! No Link!

/book/cart

/checkout

/book/cart

/checkout

Store A

Store BI found this great book at store

A. It also exists in store B.

I’d like to buy it there!

I can

do that!…

Page 202: Service Integration in the Web of Things

Simon’s Office

- Contains 2 services

More seriously: Think about a smart environment…

I have a song title,

“Yellow Submarine”.

I’d like to play that song.

Songs Search

Machine

Method: GET

Input: Song Title

Output: MP3 URL

Media Player

Method: PUT

Input: MP3 URL

Output: Plays song

Not possible! No Link!

I can do

that, too! Will you stop

now !

Page 203: Service Integration in the Web of Things

It’s the “follow your nose”-Problem again!What if a client wants to “buy” a book, but only finds a link “Add to shopping cart”?

Hm, you

know. I can…YES! I got it.

Our goal is to enable it for this guy!

Page 204: Service Integration in the Web of Things

Service Integration in the Web of Things 204|Simon Mayer

http://people.inf.ethz.ch/mayersi

Special-purpose link lists that can be queried by users

Various implementations: Web Linking metadata

Link repositories

Multiple ways of constructing these

Crowd-sourced Linkbases

Semantics-based Linkbases

Globalization of HATEOAS: Linkbases

vs.

Page 205: Service Integration in the Web of Things

Service Integration in the Web of Things 205|Simon Mayer

http://people.inf.ethz.ch/mayersi

Simple Hypermedia Crawling

Metadata: Microformats and Microdata

Crowd-sourced Service Integration

Web Linking: “Globalized” HATEOAS?

Semantics-based Service Integration

Web Linking + Metadata Embedding My current research…

Service Integration: “Self-aware” Things?

Techniques for Semantic Service Integration

Page 206: Service Integration in the Web of Things

Service Integration in the Web of Things 206|Simon Mayer

http://people.inf.ethz.ch/mayersi

Rely on developers or users to publish links

Globalization of HATEOAS

Crowd-sourced Linkbases

Simon’s Office

- Contains 2 services

Songs Search

Machine

Method: GET

Input: Song Title

Output: MP3 URL

Media Player

Method: PUT

Input: MP3 URL

Output: Will play music

I know that you can

connect these services!

Let me show you!

Page 207: Service Integration in the Web of Things

Service Integration in the Web of Things 207|Simon Mayer

http://people.inf.ethz.ch/mayersi

S. Mayer, D. Karam. A Computational Marketplace for the Web of Things, 2012

Mashup developers find links manually, but publish their

mashups in a “WoT Marketplace”

Clients can ask the marketplace for linking information

These links make sense, because they are used in a mashup!

Clients only need to choose which link to follow

Yay! That sounds like we can use HATEOAS again!

Globalization of HATEOAS

Crowd-sourced Linkbases

Page 208: Service Integration in the Web of Things

Service Integration in the Web of Things 208|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Crowd-sourced Linkbases

Marketplace

Songs Search

Machine

Method: GET

Input: Song Title

Output: MP3 URL

Media Player

Method: PUT

Input: MP3 URL

Output: Will play music

Page 209: Service Integration in the Web of Things

Service Integration in the Web of Things 209|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Crowd-sourced Linkbases

Marketplace

Node A

Node B

Node C

Node D

Node F

Marketplace exposes linking metadata about nodes!

Node X: www.wot_marketplace.org/nodes/X

Page 210: Service Integration in the Web of Things

GET wot_marketplace.org/nodes/A

“service” : “www.songsearch.org”

“forward_paths” :

# None

Page 211: Service Integration in the Web of Things

Service Integration in the Web of Things 211|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Crowd-sourced Linkbases

Marketplace

Node A

Node B

Node C

Node D

Node F

I know that you can

connect the services at

A and F!

Page 212: Service Integration in the Web of Things

POST wot_marketplace.org/nodes/A?link=nodes/F&name=play_song

202 Created

Page 213: Service Integration in the Web of Things

Globalization of HATEOAS

Crowd-sourced Linkbases

Marketplace

Node A

Node B

Node C

Node D

Node F

Now, others can use

that information!

play_song

Page 214: Service Integration in the Web of Things

GET wot_marketplace.org/nodes/A

“service” : “www.songsearch.org”

“forward_paths” :

“play_song” : “nodes/F”

Page 215: Service Integration in the Web of Things

GET wot_marketplace.org/nodes/A

“service” : “www.songsearch.org”

“forward_paths” :

“play_song” : “nodes/F”

I can do that

now, too!

Page 216: Service Integration in the Web of Things

Service Integration in the Web of Things 216|Simon Mayer

http://people.inf.ethz.ch/mayersi

Clients need to be able to find services on the

marketplace and select appropriate services to achieve

their goal

The marketplace should provide meta-information about

services and thus help to optimize traversal

Mechanisms are required for security and billing

Globalization of HATEOAS

Crowd-sourced Linkbases

Page 217: Service Integration in the Web of Things

Service Integration in the Web of Things 217|Simon Mayer

http://people.inf.ethz.ch/mayersi

Clients need to be able to find services on the

marketplace and select appropriate services to achieve

their goal

The marketplace should provide meta-information about

services and thus help to optimize traversal

Mechanisms are required for security and billing

Globalization of HATEOAS

Crowd-sourced Linkbases

Page 218: Service Integration in the Web of Things

Service Integration in the Web of Things 218|Simon Mayer

http://people.inf.ethz.ch/mayersi

Marketplace API exposes paths

“Graph Crawler” keeps all paths up-to-date

Basically an ordinary search machine…

Globalization of HATEOAS

Crowd-sourced Linkbases: Interface Discovery

GET wot_marketplace.org/nodes/A

“service” : “www.songsearch.org”

“forward_paths” :

“play_song” : “nodes/F”

Page 219: Service Integration in the Web of Things

Service Integration in the Web of Things 219|Simon Mayer

http://people.inf.ethz.ch/mayersi

Clients need to be able to find services on the

marketplace and select appropriate services to achieve

their goal

The marketplace should provide meta-information about

services and thus help to optimize traversal

Mechanisms are required for security and billing

Globalization of HATEOAS

Crowd-sourced Linkbases

Page 220: Service Integration in the Web of Things

Service Integration in the Web of Things 220|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Crowd-sourced Linkbases: Service Traversal

The following use case is about

arrhythmia detection

We have a heartbeat feed and an

arrhythmia detector.

We want to decide whether to follow the

“ambulance” link

Page 221: Service Integration in the Web of Things

Service Integration in the Web of Things 221|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Crowd-sourced Linkbases: Service Traversal

Page 222: Service Integration in the Web of Things

Service Integration in the Web of Things 222|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Crowd-sourced Linkbases: Service Traversal

Yes, this is hard!But at least we have links again and can “outsource” the logic to

the client…

Here, clients are not “compiled” against the links anymore,

but against the link names!

This is a bit less bad…

Page 223: Service Integration in the Web of Things

Task: Implement a client such that it follows

the emergency link when the probability for

arrhythmia is higher than 50%

Page 224: Service Integration in the Web of Things

Service Integration in the Web of Things 224|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Crowd-sourced Linkbases: Service Traversal

Page 225: Service Integration in the Web of Things

Service Integration in the Web of Things 225|Simon Mayer

http://people.inf.ethz.ch/mayersi

Clients need to be able to find services on the

marketplace and select appropriate services to achieve

their goal

The marketplace should provide meta-information about

services and thus help to optimize traversal

Mechanisms are required for security and billing

Globalization of HATEOAS

Crowd-sourced Linkbases

Page 226: Service Integration in the Web of Things

Service Integration in the Web of Things 226|Simon Mayer

http://people.inf.ethz.ch/mayersi

GET wot_marketplace.org/nodes/A

“service” : “www.arrhythmia_detect.net”

“forward_paths” :

“play_song” :

“node” : “nodes/F”,

“cost”:”0.02$”,

“delay”:”1sec”

Page 227: Service Integration in the Web of Things

Service Integration in the Web of Things 227|Simon Mayer

http://people.inf.ethz.ch/mayersi

Optimize traversal according to application needs

Multi-dimensional cost metrics: time, money, quality,...

Marketplace offers this information, but does not decide

on routes → Generic path deciders

Globalization of HATEOAS

Crowd-sourced Linkbases: Path Optimization

Page 228: Service Integration in the Web of Things

Service Integration in the Web of Things 228|Simon Mayer

http://people.inf.ethz.ch/mayersi

Marketplace

Globalization of HATEOAS

Crowd-sourced Linkbases

Node A

Node D

Node B

Node C Node E

This is for arrhythmia

detection, again!

Node A: Heartbeat feed

Nodes B, C, D: Arrhythmia Detectors. The marketplace provides delay metadata

Node E: Emergency-Link, “Call Ambulance” Service

Page 229: Service Integration in the Web of Things

This is the actual thing! (we use gephi.org/ to create these)

S. Mayer, D. Karam. A Computational Marketplace for the Web of Things, 2012

Page 230: Service Integration in the Web of Things

Task: Implement a client that

always uses the arrhythmia

detector with the lowest delay

Page 231: Service Integration in the Web of Things

Service Integration in the Web of Things 231|Simon Mayer

http://people.inf.ethz.ch/mayersi

Generic service traversal (lowest time cost path)

Globalization of HATEOAS

Crowd-sourced Linkbases: Path Optimization

Page 232: Service Integration in the Web of Things

Result: Automatic load balancing!That’s why we call it “marketplace”

Page 233: Service Integration in the Web of Things

Service Integration in the Web of Things 233|Simon Mayer

http://people.inf.ethz.ch/mayersi

Clients need to be able to find services on the

marketplace and select appropriate services to achieve

their goal

The marketplace should provide meta-information about

services and thus help to optimize traversal

Mechanisms are required for security and billing

Globalization of HATEOAS

Crowd-sourced Linkbases

Page 234: Service Integration in the Web of Things

Service Integration in the Web of Things 234|Simon Mayer

http://people.inf.ethz.ch/mayersi

Authentication, authorization, and billing schemes to

restrict access to computational resources

Don’t create a centralized repository for login data

Trust problems, security problems, scaling problems...

Instead use third-party schemes (like OAuth 2.0) and

inline this functionality as a linked computational node!

Globalization of HATEOAS

Crowd-sourced Linkbases: Security and Billing

Page 235: Service Integration in the Web of Things

Service Integration in the Web of Things 235|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Crowd-sourced Linkbases

Marketplace

Node A

Node B

Node C

Node D

Node F

The OAuth node controls

access to the media player!

Page 236: Service Integration in the Web of Things

Service Integration in the Web of Things 236|Simon Mayer

http://people.inf.ethz.ch/mayersi

Crowd-sourced Linkbases

Discussion

Rating Comments

Interface

DiscoveryYes Requires developers or users to publish links

Automatic

Service UsagePartial Only on syntactic level (data types and formats)

Level of

Semantic

Integration

None No annotations

Simplicity TrickyRelies on enough participants! And on them

being reliable enough!

Page 237: Service Integration in the Web of Things

Again, this didn’t enable automatic service usage!

Page 238: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic Mountains

Page 239: Service Integration in the Web of Things

Service Integration in the Web of Things 239|Simon Mayer

http://people.inf.ethz.ch/mayersi

Can we automate the publishing of links?

Globalization of HATEOAS

Crowd-sourced Linkbases

Simon’s Office

- Contains 2 services

Songs Search

Machine

Method: GET

Input: Song Title

Output: MP3 URL

Media Player

Method: PUT

Input: MP3 URL

Output: Will play music

Page 240: Service Integration in the Web of Things

Service Integration in the Web of Things 240|Simon Mayer

http://people.inf.ethz.ch/mayersi

Simple Hypermedia Crawling

Metadata: Microformats and Microdata

Crowd-sourced Service Integration

Web Linking: “Globalized” HATEOAS?

Semantics-based Service Integration

Web Linking + Metadata Embedding My current research…

Service Integration: “Self-aware” Things?

Techniques for Semantic Service Integration

Page 241: Service Integration in the Web of Things

Service Integration in the Web of Things 241|Simon Mayer

http://people.inf.ethz.ch/mayersi

Use semantic metadata to find potential links!

Globalization of HATEOAS

Semantics-based Linkbases

Simon’s Office

- Contains 2 services

Songs Search

Machine

Method: GET

Input: Song Title

Output: MP3 URL

Media Player

Method: PUT

Input: MP3 URL

Output: Will play music

R.Verborgh et al. RESTdesc - A Functionality-Centered Approach to Semantic Service Description and Composition, 2012

S. Mayer and G. Basler. Embedded Semantic Metadata to Support Device Interaction in Smart Environments, 2013

Page 242: Service Integration in the Web of Things

Service Integration in the Web of Things 242|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Semantics-based Linkbases

Simon’s Office

- Contains 2 services

Songs Search

Machine

Method: GET

Input: Song Title

Output: MP3 URL

Media Player

Method: PUT

Input: MP3 URL

Output: Will play music

Based on what I know

about these services, there

could be a link here!

Page 243: Service Integration in the Web of Things

Service Integration in the Web of Things 243|Simon Mayer

http://people.inf.ethz.ch/mayersi

We’ve already seen limited metadata embedding…

This time, we mean it!

Functional semantic service descriptions

Semantic reasoner to process these descriptions

Globalization of HATEOAS

Semantics-based Linkbases

How? Connect that information to its API

What?Describe what a service does

Page 244: Service Integration in the Web of Things

Service Integration in the Web of Things 244|Simon Mayer

http://people.inf.ethz.ch/mayersi

Usability as one major constraint

It should not be too hard to create service descriptions

It should be easy to create user goals

Pragmatism as another

Make use of previous research in semantic technologies

Use existing ontologies. Avoid creating new ones!

Format: Notation3 (user-friendly RDF with inference rules)

Globalization of HATEOAS

Semantics-based Linkbases

Page 245: Service Integration in the Web of Things

The title of the resource people.org/person1/, is “Person 1”, and it knows

another resource, people.org/person2/

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:dc=http://purl.org/dc/elements/1.1/ xmlns:foaf="http://xmlns.com/foaf/0.1/">

<rdf:Description rdf:about=“people.org/person1/">

<dc:title>Person 1</dc:title>

<foaf:knows>people.org/person2/</foaf:knows>

</rdf:Description>

</rdf:RDF>

Sta

nd

ard

RD

F/X

ML

@prefix dc: <http://purl.org/dc/elements/1.1/>.

@prefix foaf: <http://xmlns.com/foaf/0.1/>.

<people.org/person1>

dc:title "Person 1";

foaf:knows "people.org/person2/".

No

tati

on

3Brief N3 Primer: Statements

Remember Catherine’s talk?

Turtle Syntax

Page 246: Service Integration in the Web of Things

Brief N3 Primer: Rules

𝑹𝒖𝒍𝒆: 𝑃𝑟𝑒𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 → 𝑃𝑜𝑠𝑡𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛

“people.org/person1/ knows people.org/person2/ ”

implies

“people.org/person2/ knows people.org/person1/ ”

If one person knows another person, this second person also knows the first. (“foaf:knows is symmetric”)

Page 247: Service Integration in the Web of Things

No

tati

on

3Brief N3 Primer: Rules

@prefix dc: <http://purl.org/dc/elements/1.1/>.

@prefix foaf: <http://xmlns.com/foaf/0.1/>.

Precondition.

=>

Postcondition.

is shorthand for=> log:implies

If one person knows another person, this second person also knows the first. (“foaf:knows is symmetric”)

Page 248: Service Integration in the Web of Things

No

tati

on

3Brief N3 Primer: Rules

@prefix dc: <http://purl.org/dc/elements/1.1/>.

@prefix foaf: <http://xmlns.com/foaf/0.1/>.

?x a foaf:Person;

foaf:knows ?y.

=>

?y foaf:knows ?x.

If one person knows another person, this second person also knows the first. (“foaf:knows is symmetric”)

is shorthand for=> log:implies

Superb tutorial at n3.restdesc.org (by Ruben Verborgh)

Page 249: Service Integration in the Web of Things

Service Integration in the Web of Things 249|Simon Mayer

http://people.inf.ethz.ch/mayersi

Now: Semantic metadata for the Songs Search Machine

Simon’s Office

- Contains 2 services

Songs Search

Machine

Method: GET

Input: Song Title

Output: MP3 URL

Media Player

Method: PUT

Input: MP3 URL

Output: Will play music

Globalization of HATEOAS

Semantics-based Linkbases: Metadata

Page 250: Service Integration in the Web of Things

Service Integration in the Web of Things 250|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Semantics-based Linkbases: Metadata

Precondition: Facts that are required for a meaningful execution of the service

-> Knowledge of a Song Title

Postcondition: Additional facts that hold after an execution of the service?”

-> Knowledge of a URL of a song with that title

Songs Search

Machine

Method: GET

Input: Song Title

Output: MP3 URL

Page 251: Service Integration in the Web of Things

No

tati

on

3The Songs Search Machine

@prefix dc: <http://purl.org/dc/elements/1.1/>.

Precondition.

=>

Postcondition.

If we know a song title, we also know the URL of a song with that title.

Page 252: Service Integration in the Web of Things

If we know a song title, we also know the URL of a song with that title.

No

tati

on

3The Songs Search Machine

@prefix dc: <http://purl.org/dc/elements/1.1/>.

?songTitle a dc:title.

=>

?songURL a dc:Song;

myOnt:hasTitle ?songTitle.

Store this as ssm_rule.n3

Page 253: Service Integration in the Web of Things

Service Integration in the Web of Things 253|Simon Mayer

http://people.inf.ethz.ch/mayersi

Now, we only need to link that to the service!Multiple ways to do that…

We use HTTP OPTIONS for that

“This method allows the client to determine the options and/or requirements

associated with a resource, or the capabilities of a server, without implying a

resource action or initiating a resource retrieval.” (RFC 2616)

OPTIONS www.ssm.org

Link: <ssm_rule.n3>; rel=“describedBy“

We use the Link Header (RFC 5988) to return the description

Demonstration!

Songs Search

Machine

ssm_rule.n3

Page 254: Service Integration in the Web of Things

Who is not convinced?

Me!!

Page 255: Service Integration in the Web of Things

Why is that?

After reading ssm_rule.n3, I know

that I can get a song URL.

But I don’t know how!

Page 256: Service Integration in the Web of Things

How to include the request? Basically two options…

𝑹𝒖𝒍𝒆: 𝑃𝑟𝑒𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 ∧ 𝑅𝑒𝑞𝑢𝑒𝑠𝑡 → 𝑃𝑜𝑠𝑡𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛

𝑹𝒖𝒍𝒆: 𝑃𝑟𝑒𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 → 𝑃𝑜𝑠𝑡𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 ∧ 𝑅𝑒𝑞𝑢𝑒𝑠𝑡

This works, but is impractical (knowledge about all requests required from the start…)

It also messes up the quantification!

“Given the Preconditions, all GET requests give the Postcondition”

This works too, and it is sound!“Given the Preconditions, there exists a GET request that gives the Postcondition”

R.Verborgh et al. RESTdesc - A Functionality-Centered Approach to Semantic Service Description and Composition, 2012

The second option

sounds better to me!

Page 257: Service Integration in the Web of Things

No

tati

on

3The Songs Search Machine

@prefix dc: <http://purl.org/dc/elements/1.1/>.

?songTitle a dc:title.

=>

?songURL a dc:Song;

myOnt:hasTitle ?songTitle.

Request.

If we know a song title, we also know the URL of a song with that title. Plus, we

know about an HTTP request.

Page 258: Service Integration in the Web of Things

No

tati

on

3The Songs Search Machine

@prefix dc: <http://purl.org/dc/elements/1.1/>.

@prefix http: <http://www.w3.org/2011/http#>.

?songTitle a dc:title.

=>

?songURL a dc:Song;

myOnt:hasTitle ?songTitle.

_:request http:methodName “GET”;

http:requestURI (<www.ssm.org?title=>?songTitle);

http:resp [ http:body ?songURL ].

Store this as ssm_rule.n3 We’ll refer to it as a “RESTdesc” description

If we know a song title, we also know the URL of a song with that title. Plus, we

know about an HTTP request.

Page 259: Service Integration in the Web of Things

“Yellow Submarine” a dc:title.

“Yellow Submarine” a dc:Title.

?songURL a dc:Song;

myOnt:hasTitle “Yellow Submarine”.

_:request http:methodName “GET”;

http:requestURI (<www.ssm.org?title=>?songTitle);

http:resp [ http:body ?songURL ].

[+ proof]

ssm_rule.n3

Page 260: Service Integration in the Web of Things

But how do I say that

I want a song URL?

Page 261: Service Integration in the Web of Things

“Yellow Submarine” a dc:title.

Goal: ?song a dc:Song; hasTitle “Yellow Submarine”.

A proof that is parsed to an internal HTTP request description format

Send a GET request to www.ssm.org?title=songTitle and substitute “songTitle” with

“Yellow Submarine”. Then, unpack the response. Its body contains the song.

GET ?title=YellowSubmarine

www.songs.org/yellowsub.mp3

ssm_rule.n3

Songs Search

Machine

ssm_rule.n3

Page 262: Service Integration in the Web of Things

Why does this solve the

missing links Problem?

Page 263: Service Integration in the Web of Things

Service Integration in the Web of Things 263|Simon Mayer

http://people.inf.ethz.ch/mayersi

First: Add semantic metadata to the Media Player!

Globalization of HATEOAS

Semantics-based Linkbases: Metadata

Simon’s Office

- Contains 2 services

Songs Search

Machine

ssm_rule.n3

Media Player

Method: PUT

Input: MP3 URL

Output: Will play music

Page 264: Service Integration in the Web of Things

Service Integration in the Web of Things 264|Simon Mayer

http://people.inf.ethz.ch/mayersi

Parfait!

Globalization of HATEOAS

Semantics-based Linkbases: Metadata

Simon’s Office

- Contains 2 services

Songs Search

Machine

ssm_rule.n3

Media Player

mp_rule.n3

Page 265: Service Integration in the Web of Things

I want to play “Yellow

Submarine” now!!

Then formulate your goal.

But be precise!

?state a st:State;

log:includes

:SimonsOffice musicPlaying [ myOnt:hasTitle “Yellow Submarine” ]

I want Simon’s office to be in a state

where “Yellow Submarine” is playing.

Page 266: Service Integration in the Web of Things

“Yellow Submarine” a dc:title.

Client Goal

A proof that can be parsed to an internal HTTP request description format

Send a GET request to www.ssm.org?title=songTitle and substitute “songTitle”

with “Yellow Submarine”. Then, unpack the response. Its body contains the

songURL. Take this variable and send a PUT to www.mp.org?song=songURL

Execute the requests to play the song!

ssm_rule.n3

mp_rule.n3

Page 267: Service Integration in the Web of Things

Send a GET request to www.ssm.org?title=songTitle and substitute “songTitle” with

“Yellow Submarine”. Then, unpack the response. Its body contains the songURL. Take this

variable and send a PUT to www.mp.org?song=songURL

Media Player

mp_rule.n3

GET ?title=YellowSubmarine

www.songs.org/yellowsub.mp3

Songs Search

Machine

ssm_rule.n3

PUT ?song=www.songs.org/yellowsub.mp3

www.songs.org/yellowsub.mp3

Now, yellowsub.mp3 is playing in Simon’s office!

Page 268: Service Integration in the Web of Things

Sounds complicated. Could you

summarize what I have to do?

1. Formulate your goal

2. Search for a reasoner (e.g., using InfraWoT)

3. Ask the reasoner how to reach the goal

4. Parse the proof to extract the requests

5. Execute the requests

Page 269: Service Integration in the Web of Things

I don’t believe this!

Let’s see it!

Page 270: Service Integration in the Web of Things

http://192.168.8.102:8000/proof?q=http://people.inf.ethz.ch/

mayersi/n3goals/user-goal-

music.n3&r=http://people.inf.ethz.ch/mayersi/n3goals/user-

input.n3

+ reasoner has access to ssm_rule.n3, mp_rule.n3, and a states ontology.

Do Proof!(the two n3 files aren’t online anymore)

Page 271: Service Integration in the Web of Things

Oh, it actually works…

Page 272: Service Integration in the Web of Things

Isn’t it too hard to create the

goal, for a client like me?

That’s tricky. But we’re working on it!

One idea is to integrate the goal creation with Clickscript.

And you know how to use that, right?

Page 273: Service Integration in the Web of Things

Service Integration in the Web of Things 273|Simon Mayer

http://people.inf.ethz.ch/mayersi

A standard semantic reasoner

Lots of research done into this, optimized

Can handle lots of inference rules, will not be the

bottleneck, at least for home automation scenarios

Infer what a smart environment can do for us!

And how to trigger that functionality!

Globalization of HATEOAS

Semantics-based Linkbases: Discussion

Page 274: Service Integration in the Web of Things

Service Integration in the Web of Things 274|Simon Mayer

http://people.inf.ethz.ch/mayersi

Set favorite song on your mobile

phone to create a music stream

that follows you!

Indoor localization service

Stream server/transmitter

Stream players/receivers in all

rooms

Globalization of HATEOAS

Semantics-based Linkbases: Prototype

S. Mayer and G. Basler. Semantic Metadata to Support Device Interaction in Smart Environments, 2013

Page 275: Service Integration in the Web of Things

Service Integration in the Web of Things 275|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Semantics-based Linkbases: Prototype

A music stream that “follows” the user

Page 276: Service Integration in the Web of Things

Service Integration in the Web of Things 276|Simon Mayer

http://people.inf.ethz.ch/mayersi

Implementation (version 1)

Passive reasoner: Only active when queried by the client

Implementation (version 2)

Reasoner actively searching for services using the InfraWoT

discovery infrastructure

Globalization of HATEOAS

Semantics-based Linkbases: Prototype

Page 277: Service Integration in the Web of Things

Service Integration in the Web of Things 277|Simon Mayer

http://people.inf.ethz.ch/mayersi

Too many requests! 10s to change the song!

Globalization of HATEOAS

Semantics-based Linkbases: Prototype v1

Page 278: Service Integration in the Web of Things

Service Integration in the Web of Things 278|Simon Mayer

http://people.inf.ethz.ch/mayersi

Working on this… stay tuned!

Scalability testing looks good

InfraWoT strategy: Growing scopes

Globalization of HATEOAS

Semantics-based Linkbases: Prototype v2

Page 279: Service Integration in the Web of Things

Hm. So I should

just state my goals.

And I can find and

use services, too!

Page 280: Service Integration in the Web of Things

Crowd-sourced Linkbases

Discussion

Rating Comments

Interface

DiscoveryYes Only requires service entry endpoints

Automatic

Service UsageYes Contains API annotations for automatic usage

Level of

Semantic

Integration

Partial

Uses reasoner to deduce paths for reaching the

user’s goal. Does not make use of big ontologies

(but could/should…)

Simplicity ?

Requires annotation of devices and definition of

goals. Good progress, but not out of the

woods yet

Page 281: Service Integration in the Web of Things

Service Integration in the Web of Things 281|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Semantics-based Linkbases: Possibilities

Page 282: Service Integration in the Web of Things

Service Integration in the Web of Things 282|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Semantics-based Linkbases: Possibilities

Page 283: Service Integration in the Web of Things

Service Integration in the Web of Things 283|Simon Mayer

http://people.inf.ethz.ch/mayersi

Globalization of HATEOAS

Semantics-based Linkbases: Possibilities

Page 284: Service Integration in the Web of Things

Semantic Service Integration Technologies: Overview

Crawling Microformats Microdata Crowd

Linkbases

Semantic

Linkbases

Interface

DiscoveryPartial None None Yes Yes

Automatic

Service UsageNo Partial No Partial Yes

Level of

Semantic

Integration

None Partial Partial None Partial

Simplicity Very Easy Medium Easy Tricky ?

Page 285: Service Integration in the Web of Things

Introductory Stroll

WS-* Forest

REST Beacon of Hope

HATEOAS CliffsStructured

Data Lake

Crowded Village

Semantic MountainsUnexplored State of Usability

Page 286: Service Integration in the Web of Things

Service Integration in the Web of Things 286|Simon Mayer

http://people.inf.ethz.ch/mayersi

École d’Été Web Intelligence 2013 - Web des Objets

September 4th 2013, St. Germain au Mont d’Or

Simon Mayer, ETH Zurich

Service Integration in the Web of Things

Conclusion

Carinthia, Austriapresse.kaernten.at

Page 287: Service Integration in the Web of Things

Study techniques and technologies that

enable machines to discover smart

devices, to select appropriate services,

and to use them automatically!

Goal

Page 288: Service Integration in the Web of Things

Expose services as REST resources. Make

them discoverable via repositories or search

machines. Annotate them to expose their APIs

and make them automatically usable!

Approach

Page 289: Service Integration in the Web of Things

However, REST by itself is not enough for

automatic service usage

REST offers very interesting features for smart

environments and allows to embed API

descriptions and other metadata

Page 290: Service Integration in the Web of Things

We’ve seen multiple approaches to

facilitate the creation of mashups, and the

usage by machine clients

Embedding functional semantic service

descriptions could be a viable alternative to

“top-down” standardization

Page 291: Service Integration in the Web of Things

Service Integration in the Web of Things 291|Simon Mayer

http://people.inf.ethz.ch/mayersi

Beginnings in Europe, now intercontinental!

Web of Things Workshop Series: webofthings.org/wot

WoT 2010 @ PerCom, Mannheim

WoT 2011 @ Pervasive, San Francisco

WoT 2012 @ Pervasive, Newcastle

WoT 2013 @ UbiComp, Zurich

Community blog: webofthings.org

The Web of Things Community

Page 292: Service Integration in the Web of Things

Service Integration in the Web of Things 292|Simon Mayer

http://people.inf.ethz.ch/mayersi

Ruben Verborgh, David Karam

Nadine Inhelder, Gianin Basler

Markus Schalch, Andreas Tschofen

Dominique Guinard, Vlad Trifa

Matthias Kovatsch, Leyna Sadamori, Gábor Sörös

Erik Wilhelm, Josh Siegel, Sanjay Sarma

Special Thanks to Ruben, Nadine, and David for your input on these slides!

Credits

Page 293: Service Integration in the Web of Things

THANK YOU for this invitation !

Jean-Paul Jamont

Cécile Favre

Lionel Médini

Michaël Mrissa

Tous les participants de l’école d’été Web Intelligence 2013!

Page 294: Service Integration in the Web of Things

http://andrewbleakley.com

http://www.webmarchand.com

http://www.patentspostgrant.com/

http://www.orkin.com

http://sweetclipart.com

http://la-matrice.org

http://learn.randolph.k12.ma.us

http://theparisreview.org

http://bestclipartblog.com

http://freepik.com

http://http://www.rugdots.com

http://www.productdose.com

http://westwoodblinds.co.uk

http://www.ambientdevices.com

http://www.pats.ua.ac.be

http://www.vesternet.com

http://www.rovingnetworks.com

http://www.qualitymechanicalservices.com

http://chantalteakettle.org

http://blog.eeye.com

http://cartographersguild.com

http://haverford.edu

http://clker.com

http://stickers-addict.fr

http://en.wikipedia.org

Image Sources