SlideShare une entreprise Scribd logo
1  sur  294
Télécharger pour lire hors ligne
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
Service Integration in the Web of Things 2|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Myself
Simon Mayer, PhD Student at ETH Zurich, WoT since 2009
www.cloud-think.com
Example: Sensor Platforms
Sensors: Temperature, Ambient Light, Accelerometer
Actuators: 8 LEDs, Analog Outputs (e.g., motor controller)
Example: Smart Cars
Sensors: Speed, GPS, Fuel Consumption, Total KM
Actuators: Unlock, Start, Accelerate, Brake
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
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
 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
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
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
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
Unexplored State of Usability
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
Unexplored State of Usability
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, France
saintgermainaumontdor.fr
É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 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 Things
Services
Service
Integration
Service
Mashups
Arrive-and-
Operate
Mashup
Management
Automatic Service
Composition
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)
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}
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
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
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
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.”
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
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
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
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
Unexplored State of Usability
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
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
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 :-)
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
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
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
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”]
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.
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
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
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!
Service Integration in the Web of Things 42|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Smart Service Composition
Possibilities
Service Integration in the Web of Things 43|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Smart Service Composition
Possibilities
Service Integration in the Web of Things 44|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Smart Service Composition
Possibilities
Service Integration in the Web of Things 45|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Smart Service Composition
Possibilities
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
Introductory Stroll
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
Unexplored State of Usability
WS-* Forest
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, USA
ahmadladhani.wordpress.com
É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 49|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Service Integration in the Web of Things
A History Primer: WS-* Web Services
Bliss, Microsoft
ahmadladhani.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
Introductory Stroll
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
Unexplored State of Usability
WS-* Forest
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
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
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
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
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
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
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
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
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
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
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
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:binding
transport="http://schemas.xml-
soap.org/soap/http"
style="document"/>
</binding>
WSDL description
types, messages
portType
binding
service
The Service-Oriented Architecture
Main Technologies: WSDL
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
Service Integration in the Web of Things 64|
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
Application-Server
Server Logic
Server Stub
Client
Client Stub
Client Logic
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
Application-Server
Server Logic
Server Stub
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
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
Application-Server
Server Logic
Server Stub
Client
Client Stub
Client Logic
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
Client
Client Stub
Client Logic
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)
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…
Introductory Stroll
WS-* Forest
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
REST Beacon of Hope
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/France
home.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
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]
Introductory Stroll
WS-* Forest
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
REST Beacon of Hope
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
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… ;-)
Web-based Interaction with Smart Environments 77|
Simon Mayer
http://people.inf.ethz.ch/mayersi
REST and WS-*
Google Trends, 2004-2013
“SOAP Java”
Web-based Interaction with Smart Environments 78|
Simon Mayer
http://people.inf.ethz.ch/mayersi
REST and WS-*
Google Trends, 2004-2013
WSDL
Web-based Interaction with Smart Environments 79|
Simon Mayer
http://people.inf.ethz.ch/mayersi
REST and WS-*
Google Trends, 2004-2013
UDDI
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… ;-)
Web-based Interaction with Smart Environments 81|
Simon Mayer
http://people.inf.ethz.ch/mayersi
REST and WS-*
Google Trends, 2004-2013
RESTful
Web-based Interaction with Smart Environments 82|
Simon Mayer
http://people.inf.ethz.ch/mayersi
REST and WS-*
Google Trends, 2004-2013
UDDI
RESTful
“SOAP Java”
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…
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
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
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!
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
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
Web-based Interaction with Smart Environments 89|
Simon Mayer
http://people.inf.ethz.ch/mayersi
REST and WS-*
Developers’ Perspective: Study Setup
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
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
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
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
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
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
[http://www.innoq.com/soa/ws-standards/poster/innoQ%20WS-Standards%20Poster%202007-02.pdf]
WS-* Standards Overview
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?
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
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
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
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
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
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
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]
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
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
Now for the cool stuff: HATEOAS
[or, Hypermedia as the Engine of Application State]
[or, the server guides clients using hyperlinks]
Did you ever experience that the “back”
button broke a hypermedia application?
e-banking, e-commerce, flights booking, etc.
Why is that?
“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!
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
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??
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
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
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
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”
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?
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
http://bookstore.org/carts/simon
http://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
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
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
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
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)
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
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
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, Switzerland
ethz.ch
É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 126|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Example Scenario
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
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…
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!
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!
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>(…)
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
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!
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.
?
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!
Alright… from the beginning :-)
We’ll see four service integration techniques, an
example for each, and discuss their suitability for
our considered applications
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
morefunctionality……morecomplexity
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
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
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
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
Service Integration in the Web of Things 142|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Hypermedia Crawling
The Friends and Things Project
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
Service Integration in the Web of Things 144|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Hypermedia Crawling
The Friends and Things Project
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
Service Integration in the Web of Things 146|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Hypermedia Crawling
Discussion
Rating Comments
Interface
Discovery
Partial Requires APIs to be connected via hyperlinks
Automatic
Service Usage
No
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
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
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?
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
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 Embedding
both: HTML!
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
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
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!
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
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
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…
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
Service Integration in the Web of Things 158|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Microformats
The InfraWoT Project: Registration
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, UUID
None. 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 Description
Label, URL Template, Input,
Output
hRESTS
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/thermostat
Method: HTTP PUT
Rating: 4.3 (0..5)
hProduct Category
GEO
hRESTS Input
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
Service Integration in the Web of Things 162|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Microformats
Discussion
Rating Comments
Interface
Discovery
None Requires to fall back on crawling or indexing
Automatic
Service Usage
Partial
hRESTS allows definition of API, but no format to
describe it for machine clients
Level of
Semantic
Integration
Partial
Microformats define the semantics of objects, but
are only partially linked to ontologies
Simplicity Medium
Cumbersome annotation of HTML
representations required
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
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
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>
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
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
GUI / Touch Screen
Haptic / Gyro
Example: Interaction with a Web-enabled LED
Speech
Haptic / Accelerometer
Example: Interaction with a Web-enabled Power Plug
Haptic / Gyroscope
Example: Interaction with a Web-enabled Toy Robot
GUI / Gyroscope
Composite UI
set intensity,
switch, get data,
goto, move
Example: Interaction with iTunes
Faster than the iPhone-App!
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
Service Integration in the Web of Things 173|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Microdata
Discussion
Rating Comments
Interface
Discovery
None Requires to fall back on crawling or indexing
Automatic
Service Usage
No No standard format to annotate Web APIs
Level of
Semantic
Integration
Partial
Allows to define an object’s class/type, if
ontologies like schema.org are used
Simplicity Easy
Annotation of HTML representations required.
Better usability than Microformats
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
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
 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
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…
...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”}
...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
Does every smart device have to be
capable of parsing every single
format...?
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”}
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...
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?
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!
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
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
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)
Service Integration in the Web of Things 188|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Object Recognition + Embedded UI Metadata
Example: Web-enabled Toy Robot
GUI / Gyroscope
Service Integration in the Web of Things 189|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Object Recognition + Embedded UI Metadata
Example: Volume Controller
GUI / Gyroscope
Service Integration in the Web of Things 190|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Object Recognition + Embedded UI Metadata
Soon for cars?
Service Integration in the Web of Things 191|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Object Recognition + Embedded UI Metadata
Soon for cars?
Service Integration in the Web of Things 192|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Object Recognition + Embedded UI Metadata
Current status…
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 Recognition
Conclusion
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
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
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
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
However…
These are constrained to
operating within hypermedia
applications!
They require HATEOAS-style hypermedia controls to be already present!
[example coming right up…]
 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?
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”
Example from REST Introduction
/book/cart
/checkout
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!
…
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 !
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!
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.
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
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!
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
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
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
GET wot_marketplace.org/nodes/A
{
“service” : “www.songsearch.org”
“forward_paths” : {
# None
}
}
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!
POST wot_marketplace.org/nodes/A?link=nodes/F&name=play_song
202 Created
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
GET wot_marketplace.org/nodes/A
{
“service” : “www.songsearch.org”
“forward_paths” : {
“play_song” : “nodes/F”
}
}
GET wot_marketplace.org/nodes/A
{
“service” : “www.songsearch.org”
“forward_paths” : {
“play_song” : “nodes/F”
}
}
I can do that
now, too!
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
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
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”
}
}
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
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
Service Integration in the Web of Things 221|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Globalization of HATEOAS
Crowd-sourced Linkbases: Service Traversal
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…
Task: Implement a client such that it follows
the emergency link when the probability for
arrhythmia is higher than 50%
Service Integration in the Web of Things 224|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Globalization of HATEOAS
Crowd-sourced Linkbases: Service Traversal
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
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”
}
}
}
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
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
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
Task: Implement a client that
always uses the arrhythmia
detector with the lowest delay
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
Result: Automatic load balancing!
That’s why we call it “marketplace”
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
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
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!
Service Integration in the Web of Things 236|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Crowd-sourced Linkbases
Discussion
Rating Comments
Interface
Discovery
Yes Requires developers or users to publish links
Automatic
Service Usage
Partial Only on syntactic level (data types and formats)
Level of
Semantic
Integration
None No annotations
Simplicity Tricky
Relies on enough participants! And on them
being reliable enough!
Again, this didn’t enable automatic service usage!
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
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
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
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
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!
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
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
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>
StandardRDF/XML
@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/".
Notation3
Brief N3 Primer: Statements
Remember Catherine’s talk?
Turtle Syntax
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”)
Notation3
Brief 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”)
Notation3
Brief 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)
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
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
Notation3
The 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.
If we know a song title, we also know the URL of a song with that title.
Notation3
The 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
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
Who is not convinced?
Me!!
Why is that?
After reading ssm_rule.n3, I know
that I can get a song URL.
But I don’t know how!
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!
Notation3
The 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.
Notation3
The 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.
“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
But how do I say that
I want a song URL?
“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
Why does this solve the
missing links Problem?
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
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
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.
“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
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!
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
I don’t believe this!
Let’s see it!
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)
Oh, it actually works…
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?
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
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
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
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
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
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
Hm. So I should
just state my goals.
And I can find and
use services, too!
Crowd-sourced Linkbases
Discussion
Rating Comments
Interface
Discovery
Yes Only requires service entry endpoints
Automatic
Service Usage
Yes 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
Service Integration in the Web of Things 281|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Globalization of HATEOAS
Semantics-based Linkbases: Possibilities
Service Integration in the Web of Things 282|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Globalization of HATEOAS
Semantics-based Linkbases: Possibilities
Service Integration in the Web of Things 283|
Simon Mayer
http://people.inf.ethz.ch/mayersi
Globalization of HATEOAS
Semantics-based Linkbases: Possibilities
Semantic Service Integration Technologies: Overview
Crawling Microformats Microdata Crowd
Linkbases
Semantic
Linkbases
Interface
Discovery
Partial None None Yes Yes
Automatic
Service Usage
No Partial No Partial Yes
Level of
Semantic
Integration
None Partial Partial None Partial
Simplicity Very Easy Medium Easy Tricky ?
Introductory Stroll
WS-* Forest
REST Beacon of Hope
HATEOAS Cliffs
Structured
Data Lake
Crowded Village
Semantic Mountains
Unexplored State of Usability
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, Austria
presse.kaernten.at
Study techniques and technologies that
enable machines to discover smart
devices, to select appropriate services,
and to use them automatically!
Goal
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
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
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
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
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
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!
 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

Contenu connexe

Tendances

Phare Conference - Steve Clayton, NUI
Phare Conference - Steve Clayton, NUIPhare Conference - Steve Clayton, NUI
Phare Conference - Steve Clayton, NUISteve Clayton
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud ComputingDr Ganesh Iyer
 
Situation Normal - UKUUG Mar'10
Situation Normal - UKUUG Mar'10Situation Normal - UKUUG Mar'10
Situation Normal - UKUUG Mar'10Simon Wardley
 
Situation Normal - Presentation at NottTuesday
Situation Normal - Presentation at NottTuesdaySituation Normal - Presentation at NottTuesday
Situation Normal - Presentation at NottTuesdaySimon Wardley
 
The ethics of cloud and mobile computing for lawyers
The ethics of cloud and mobile computing for lawyersThe ethics of cloud and mobile computing for lawyers
The ethics of cloud and mobile computing for lawyersNicole Black
 
Demystify Edge Computing Vs. Cloud Computing
Demystify Edge Computing Vs. Cloud ComputingDemystify Edge Computing Vs. Cloud Computing
Demystify Edge Computing Vs. Cloud ComputingCygnet Infotech
 
State of the Internet Operating System
State of the Internet Operating SystemState of the Internet Operating System
State of the Internet Operating SystemTim O'Reilly
 
The IoT Suitcase - Pitch Deck
The IoT Suitcase - Pitch DeckThe IoT Suitcase - Pitch Deck
The IoT Suitcase - Pitch DeckThe IoT Suitcase
 
PoV on Latest technology Trends impact on Insurance Industry
PoV on Latest technology Trends impact on Insurance Industry PoV on Latest technology Trends impact on Insurance Industry
PoV on Latest technology Trends impact on Insurance Industry Jishnu Mithre
 
What is Edge Computing and Why does it matter in IoT?
What is Edge Computing and Why does it matter in IoT?What is Edge Computing and Why does it matter in IoT?
What is Edge Computing and Why does it matter in IoT?Sameer Ahmed
 
Autonomous Agents for Flexible Hypermedia Systems
Autonomous Agents for Flexible Hypermedia Systems Autonomous Agents for Flexible Hypermedia Systems
Autonomous Agents for Flexible Hypermedia Systems Simon Mayer
 

Tendances (20)

Edge Computing
Edge ComputingEdge Computing
Edge Computing
 
Edge computing
Edge computingEdge computing
Edge computing
 
Phare Conference - Steve Clayton, NUI
Phare Conference - Steve Clayton, NUIPhare Conference - Steve Clayton, NUI
Phare Conference - Steve Clayton, NUI
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud Computing
 
Cloud Computing and Edge Computing(CTO Kieun Park) - Edge Computing Seminar
Cloud Computing and Edge Computing(CTO Kieun Park) - Edge Computing SeminarCloud Computing and Edge Computing(CTO Kieun Park) - Edge Computing Seminar
Cloud Computing and Edge Computing(CTO Kieun Park) - Edge Computing Seminar
 
Situation Normal - UKUUG Mar'10
Situation Normal - UKUUG Mar'10Situation Normal - UKUUG Mar'10
Situation Normal - UKUUG Mar'10
 
Situation Normal - Presentation at NottTuesday
Situation Normal - Presentation at NottTuesdaySituation Normal - Presentation at NottTuesday
Situation Normal - Presentation at NottTuesday
 
Edge Computing: Drivers and Trends
Edge Computing: Drivers and TrendsEdge Computing: Drivers and Trends
Edge Computing: Drivers and Trends
 
Simon Wardley
Simon WardleySimon Wardley
Simon Wardley
 
The ethics of cloud and mobile computing for lawyers
The ethics of cloud and mobile computing for lawyersThe ethics of cloud and mobile computing for lawyers
The ethics of cloud and mobile computing for lawyers
 
Above The Clouds
Above The CloudsAbove The Clouds
Above The Clouds
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Demystify Edge Computing Vs. Cloud Computing
Demystify Edge Computing Vs. Cloud ComputingDemystify Edge Computing Vs. Cloud Computing
Demystify Edge Computing Vs. Cloud Computing
 
Edge computing
Edge computingEdge computing
Edge computing
 
State of the Internet Operating System
State of the Internet Operating SystemState of the Internet Operating System
State of the Internet Operating System
 
The IoT Suitcase - Pitch Deck
The IoT Suitcase - Pitch DeckThe IoT Suitcase - Pitch Deck
The IoT Suitcase - Pitch Deck
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
PoV on Latest technology Trends impact on Insurance Industry
PoV on Latest technology Trends impact on Insurance Industry PoV on Latest technology Trends impact on Insurance Industry
PoV on Latest technology Trends impact on Insurance Industry
 
What is Edge Computing and Why does it matter in IoT?
What is Edge Computing and Why does it matter in IoT?What is Edge Computing and Why does it matter in IoT?
What is Edge Computing and Why does it matter in IoT?
 
Autonomous Agents for Flexible Hypermedia Systems
Autonomous Agents for Flexible Hypermedia Systems Autonomous Agents for Flexible Hypermedia Systems
Autonomous Agents for Flexible Hypermedia Systems
 

En vedette

Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009
Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009
Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009Dominique Guinard
 
Hypermedia-driven Socio-technical Networks for Goal-driven Discovery in the W...
Hypermedia-driven Socio-technical Networks for Goal-driven Discovery in the W...Hypermedia-driven Socio-technical Networks for Goal-driven Discovery in the W...
Hypermedia-driven Socio-technical Networks for Goal-driven Discovery in the W...Andrei Ciortea
 
WoT 2016 - Seventh International Workshop on the Web of Things
WoT 2016 - Seventh International Workshop on the Web of ThingsWoT 2016 - Seventh International Workshop on the Web of Things
WoT 2016 - Seventh International Workshop on the Web of ThingsSimon Mayer
 
WOTS2E: A Search Engine for a Semantic Web of Things
WOTS2E: A Search Engine for a Semantic Web of ThingsWOTS2E: A Search Engine for a Semantic Web of Things
WOTS2E: A Search Engine for a Semantic Web of ThingsAndreas Kamilaris
 
04_ETH Zurich Pavilion booklet_sm
04_ETH Zurich Pavilion booklet_sm04_ETH Zurich Pavilion booklet_sm
04_ETH Zurich Pavilion booklet_smLukas Fitze
 
Social Sharing In a Web of Things
Social Sharing In a Web of ThingsSocial Sharing In a Web of Things
Social Sharing In a Web of ThingsDominique Guinard
 
From Watson to Ontology Repositories - Ontolog OOR panel
From Watson to Ontology Repositories - Ontolog OOR panelFrom Watson to Ontology Repositories - Ontolog OOR panel
From Watson to Ontology Repositories - Ontolog OOR panelMathieu d'Aquin
 
Service Integration - A Web of Things Perspective
Service Integration - A Web of Things PerspectiveService Integration - A Web of Things Perspective
Service Integration - A Web of Things PerspectiveSimon Mayer
 
Towards constrained semantic web
Towards constrained semantic webTowards constrained semantic web
Towards constrained semantic web☕ Remy Rojas
 
Always-On Web of Things Infrastructure Dynamic Software Updating
Always-On Web of Things Infrastructure Dynamic Software UpdatingAlways-On Web of Things Infrastructure Dynamic Software Updating
Always-On Web of Things Infrastructure Dynamic Software UpdatingTECO Research Group
 
Towards an industrial Web of Things
Towards an industrial Web of ThingsTowards an industrial Web of Things
Towards an industrial Web of ThingsOlivier Liechti
 
A component based architecture for the Web of Things
A component based architecture for the Web of ThingsA component based architecture for the Web of Things
A component based architecture for the Web of ThingsAndreas Ruppen
 
Web of Things presentation - Document Generation
Web of Things presentation - Document GenerationWeb of Things presentation - Document Generation
Web of Things presentation - Document GenerationKIT
 
The Web of Things: Enabling the Physical World to the Web
The Web of Things: Enabling the Physical World to the WebThe Web of Things: Enabling the Physical World to the Web
The Web of Things: Enabling the Physical World to the WebAndreas Kamilaris
 
WoTSF: A Framework for Searching in the Web of Things (WoT)
WoTSF: A Framework for Searching in the Web of Things (WoT)WoTSF: A Framework for Searching in the Web of Things (WoT)
WoTSF: A Framework for Searching in the Web of Things (WoT)Mina Younan
 
IoT and WoT (Internet of Things and Web of Things)
IoT and WoT (Internet of Things and Web of Things)IoT and WoT (Internet of Things and Web of Things)
IoT and WoT (Internet of Things and Web of Things)Jonathan Jeon
 
Thesis defence of Dall'Olio Giovanni Marco. Applications of network theory to...
Thesis defence of Dall'Olio Giovanni Marco. Applications of network theory to...Thesis defence of Dall'Olio Giovanni Marco. Applications of network theory to...
Thesis defence of Dall'Olio Giovanni Marco. Applications of network theory to...Giovanni Marco Dall'Olio
 
Web of Things Platforms Tutorial
Web of Things Platforms TutorialWeb of Things Platforms Tutorial
Web of Things Platforms TutorialEVRYTHNG
 
Distributed Data Flow for the Web of Things: Distributed Node-RED
Distributed Data Flow for the Web of Things: Distributed Node-REDDistributed Data Flow for the Web of Things: Distributed Node-RED
Distributed Data Flow for the Web of Things: Distributed Node-REDMichael Blackstock
 
5 Years of Web of Things Workshops
5 Years of Web of Things Workshops5 Years of Web of Things Workshops
5 Years of Web of Things WorkshopsDominique Guinard
 

En vedette (20)

Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009
Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009
Towards the Web of Things: Web Mashups for the Real-World @ MEM 2009
 
Hypermedia-driven Socio-technical Networks for Goal-driven Discovery in the W...
Hypermedia-driven Socio-technical Networks for Goal-driven Discovery in the W...Hypermedia-driven Socio-technical Networks for Goal-driven Discovery in the W...
Hypermedia-driven Socio-technical Networks for Goal-driven Discovery in the W...
 
WoT 2016 - Seventh International Workshop on the Web of Things
WoT 2016 - Seventh International Workshop on the Web of ThingsWoT 2016 - Seventh International Workshop on the Web of Things
WoT 2016 - Seventh International Workshop on the Web of Things
 
WOTS2E: A Search Engine for a Semantic Web of Things
WOTS2E: A Search Engine for a Semantic Web of ThingsWOTS2E: A Search Engine for a Semantic Web of Things
WOTS2E: A Search Engine for a Semantic Web of Things
 
04_ETH Zurich Pavilion booklet_sm
04_ETH Zurich Pavilion booklet_sm04_ETH Zurich Pavilion booklet_sm
04_ETH Zurich Pavilion booklet_sm
 
Social Sharing In a Web of Things
Social Sharing In a Web of ThingsSocial Sharing In a Web of Things
Social Sharing In a Web of Things
 
From Watson to Ontology Repositories - Ontolog OOR panel
From Watson to Ontology Repositories - Ontolog OOR panelFrom Watson to Ontology Repositories - Ontolog OOR panel
From Watson to Ontology Repositories - Ontolog OOR panel
 
Service Integration - A Web of Things Perspective
Service Integration - A Web of Things PerspectiveService Integration - A Web of Things Perspective
Service Integration - A Web of Things Perspective
 
Towards constrained semantic web
Towards constrained semantic webTowards constrained semantic web
Towards constrained semantic web
 
Always-On Web of Things Infrastructure Dynamic Software Updating
Always-On Web of Things Infrastructure Dynamic Software UpdatingAlways-On Web of Things Infrastructure Dynamic Software Updating
Always-On Web of Things Infrastructure Dynamic Software Updating
 
Towards an industrial Web of Things
Towards an industrial Web of ThingsTowards an industrial Web of Things
Towards an industrial Web of Things
 
A component based architecture for the Web of Things
A component based architecture for the Web of ThingsA component based architecture for the Web of Things
A component based architecture for the Web of Things
 
Web of Things presentation - Document Generation
Web of Things presentation - Document GenerationWeb of Things presentation - Document Generation
Web of Things presentation - Document Generation
 
The Web of Things: Enabling the Physical World to the Web
The Web of Things: Enabling the Physical World to the WebThe Web of Things: Enabling the Physical World to the Web
The Web of Things: Enabling the Physical World to the Web
 
WoTSF: A Framework for Searching in the Web of Things (WoT)
WoTSF: A Framework for Searching in the Web of Things (WoT)WoTSF: A Framework for Searching in the Web of Things (WoT)
WoTSF: A Framework for Searching in the Web of Things (WoT)
 
IoT and WoT (Internet of Things and Web of Things)
IoT and WoT (Internet of Things and Web of Things)IoT and WoT (Internet of Things and Web of Things)
IoT and WoT (Internet of Things and Web of Things)
 
Thesis defence of Dall'Olio Giovanni Marco. Applications of network theory to...
Thesis defence of Dall'Olio Giovanni Marco. Applications of network theory to...Thesis defence of Dall'Olio Giovanni Marco. Applications of network theory to...
Thesis defence of Dall'Olio Giovanni Marco. Applications of network theory to...
 
Web of Things Platforms Tutorial
Web of Things Platforms TutorialWeb of Things Platforms Tutorial
Web of Things Platforms Tutorial
 
Distributed Data Flow for the Web of Things: Distributed Node-RED
Distributed Data Flow for the Web of Things: Distributed Node-REDDistributed Data Flow for the Web of Things: Distributed Node-RED
Distributed Data Flow for the Web of Things: Distributed Node-RED
 
5 Years of Web of Things Workshops
5 Years of Web of Things Workshops5 Years of Web of Things Workshops
5 Years of Web of Things Workshops
 

Similaire à Service Integration in the Web of Things

When Things will Speak "Web" (Lecture)
When Things will Speak "Web" (Lecture)When Things will Speak "Web" (Lecture)
When Things will Speak "Web" (Lecture)Dominique Guinard
 
Cloud computing
Cloud computingCloud computing
Cloud computingAjit Yadav
 
Internet of Things (IoT) and Big Data
Internet of Things (IoT) and Big DataInternet of Things (IoT) and Big Data
Internet of Things (IoT) and Big DataGuido Schmutz
 
Linked services for the Web of Data
Linked services for the Web of DataLinked services for the Web of Data
Linked services for the Web of DataJohn Domingue
 
Closing the gap in your cloud ecosystem capgemini mark skilton v1
Closing the gap in your cloud ecosystem capgemini mark skilton v1Closing the gap in your cloud ecosystem capgemini mark skilton v1
Closing the gap in your cloud ecosystem capgemini mark skilton v1Mark Skilton
 
ABD322_Implementing a Flight Simulator Interface Using AI, Virtual Reality, a...
ABD322_Implementing a Flight Simulator Interface Using AI, Virtual Reality, a...ABD322_Implementing a Flight Simulator Interface Using AI, Virtual Reality, a...
ABD322_Implementing a Flight Simulator Interface Using AI, Virtual Reality, a...Amazon Web Services
 
GeoAdmin API & Open*, 2012
GeoAdmin API & Open*, 2012GeoAdmin API & Open*, 2012
GeoAdmin API & Open*, 2012Moullet
 
Information Technology for Facilities Management
Information Technology for Facilities ManagementInformation Technology for Facilities Management
Information Technology for Facilities ManagementOmer Dawelbeit
 
MobiCloud Transport Webinar series June 2013 - English
MobiCloud Transport Webinar series June 2013 - English MobiCloud Transport Webinar series June 2013 - English
MobiCloud Transport Webinar series June 2013 - English Appear
 
A Full End-to-End Platform as a Service for Smart City Applications
A Full End-to-End Platform as a Service for SmartCity ApplicationsA Full End-to-End Platform as a Service for SmartCity Applications
A Full End-to-End Platform as a Service for Smart City ApplicationsCharalampos Doukas
 
Smart Manufacturing Presentation
Smart Manufacturing PresentationSmart Manufacturing Presentation
Smart Manufacturing PresentationMerve Nur Taş
 
Cloud-Con: Informatica Vibe and Cloud Integration for the Hybrid Enterprise
Cloud-Con: Informatica Vibe and Cloud Integration for the Hybrid EnterpriseCloud-Con: Informatica Vibe and Cloud Integration for the Hybrid Enterprise
Cloud-Con: Informatica Vibe and Cloud Integration for the Hybrid EnterpriseDarren Cunningham
 
Little.story.it.architecture
Little.story.it.architectureLittle.story.it.architecture
Little.story.it.architectureÉric Grall
 
Prometheus: From technical metrics to business observability
Prometheus: From technical metrics to business observabilityPrometheus: From technical metrics to business observability
Prometheus: From technical metrics to business observabilityJulien Pivotto
 
Internet of Things - Benefits for the Ummah
Internet of Things - Benefits for the UmmahInternet of Things - Benefits for the Ummah
Internet of Things - Benefits for the UmmahDr. Mazlan Abbas
 
OI in the Public Sector by Esteve Almirall
OI in the Public Sector by Esteve AlmirallOI in the Public Sector by Esteve Almirall
OI in the Public Sector by Esteve Almirallcitycamptunisia
 

Similaire à Service Integration in the Web of Things (20)

When Things will Speak "Web" (Lecture)
When Things will Speak "Web" (Lecture)When Things will Speak "Web" (Lecture)
When Things will Speak "Web" (Lecture)
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Internet of Things (IoT) and Big Data
Internet of Things (IoT) and Big DataInternet of Things (IoT) and Big Data
Internet of Things (IoT) and Big Data
 
Linked services for the Web of Data
Linked services for the Web of DataLinked services for the Web of Data
Linked services for the Web of Data
 
Closing the gap in your cloud ecosystem capgemini mark skilton v1
Closing the gap in your cloud ecosystem capgemini mark skilton v1Closing the gap in your cloud ecosystem capgemini mark skilton v1
Closing the gap in your cloud ecosystem capgemini mark skilton v1
 
ABD322_Implementing a Flight Simulator Interface Using AI, Virtual Reality, a...
ABD322_Implementing a Flight Simulator Interface Using AI, Virtual Reality, a...ABD322_Implementing a Flight Simulator Interface Using AI, Virtual Reality, a...
ABD322_Implementing a Flight Simulator Interface Using AI, Virtual Reality, a...
 
GeoAdmin API & Open*, 2012
GeoAdmin API & Open*, 2012GeoAdmin API & Open*, 2012
GeoAdmin API & Open*, 2012
 
Information Technology for Facilities Management
Information Technology for Facilities ManagementInformation Technology for Facilities Management
Information Technology for Facilities Management
 
MobiCloud Transport Webinar series June 2013 - English
MobiCloud Transport Webinar series June 2013 - English MobiCloud Transport Webinar series June 2013 - English
MobiCloud Transport Webinar series June 2013 - English
 
A Full End-to-End Platform as a Service for Smart City Applications
A Full End-to-End Platform as a Service for SmartCity ApplicationsA Full End-to-End Platform as a Service for SmartCity Applications
A Full End-to-End Platform as a Service for Smart City Applications
 
Smart Manufacturing Presentation
Smart Manufacturing PresentationSmart Manufacturing Presentation
Smart Manufacturing Presentation
 
Cloud-Con: Informatica Vibe and Cloud Integration for the Hybrid Enterprise
Cloud-Con: Informatica Vibe and Cloud Integration for the Hybrid EnterpriseCloud-Con: Informatica Vibe and Cloud Integration for the Hybrid Enterprise
Cloud-Con: Informatica Vibe and Cloud Integration for the Hybrid Enterprise
 
Little.story.it.architecture
Little.story.it.architectureLittle.story.it.architecture
Little.story.it.architecture
 
Prometheus: From technical metrics to business observability
Prometheus: From technical metrics to business observabilityPrometheus: From technical metrics to business observability
Prometheus: From technical metrics to business observability
 
Internet of Things - Benefits for the Ummah
Internet of Things - Benefits for the UmmahInternet of Things - Benefits for the Ummah
Internet of Things - Benefits for the Ummah
 
Smac
SmacSmac
Smac
 
SMAC
SMACSMAC
SMAC
 
OI in the Public Sector by Esteve Almirall
OI in the Public Sector by Esteve AlmirallOI in the Public Sector by Esteve Almirall
OI in the Public Sector by Esteve Almirall
 
The Roles and Challenges of Cloud Computing to Accounting System of Vietnames...
The Roles and Challenges of Cloud Computing to Accounting System of Vietnames...The Roles and Challenges of Cloud Computing to Accounting System of Vietnames...
The Roles and Challenges of Cloud Computing to Accounting System of Vietnames...
 

Dernier

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Dernier (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Service Integration in the Web of Things

  • 1. 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
  • 2. Service Integration in the Web of Things 2| Simon Mayer http://people.inf.ethz.ch/mayersi Myself Simon Mayer, PhD Student at ETH Zurich, WoT since 2009
  • 3.
  • 4.
  • 5.
  • 7.
  • 8. Example: Sensor Platforms Sensors: Temperature, Ambient Light, Accelerometer Actuators: 8 LEDs, Analog Outputs (e.g., motor controller)
  • 9. Example: Smart Cars Sensors: Speed, GPS, Fuel Consumption, Total KM Actuators: Unlock, Start, Accelerate, Brake
  • 10.
  • 11. 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
  • 12. 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
  • 13.  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
  • 14. 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
  • 15. 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
  • 16. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains Unexplored State of Usability
  • 17. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains Unexplored State of Usability
  • 18. 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, France saintgermainaumontdor.fr École d’Été Web Intelligence 2013 - Web des Objets September 4th 2013, St. Germain au Mont d’Or Simon Mayer, ETH Zurich
  • 19. 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 Things Services Service Integration Service Mashups Arrive-and- Operate Mashup Management Automatic Service Composition
  • 20. 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)
  • 21. 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}
  • 22. 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
  • 23. 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
  • 24. 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
  • 25. 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.”
  • 26. 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
  • 27. 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
  • 28. 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
  • 29. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains Unexplored State of Usability
  • 30. 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
  • 31. 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
  • 32. 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 :-)
  • 33. 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
  • 34. 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
  • 35. 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
  • 36. 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”]
  • 37. 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.
  • 38. 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
  • 39.
  • 40. 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
  • 41. 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!
  • 42. Service Integration in the Web of Things 42| Simon Mayer http://people.inf.ethz.ch/mayersi Smart Service Composition Possibilities
  • 43. Service Integration in the Web of Things 43| Simon Mayer http://people.inf.ethz.ch/mayersi Smart Service Composition Possibilities
  • 44. Service Integration in the Web of Things 44| Simon Mayer http://people.inf.ethz.ch/mayersi Smart Service Composition Possibilities
  • 45. Service Integration in the Web of Things 45| Simon Mayer http://people.inf.ethz.ch/mayersi Smart Service Composition Possibilities
  • 46. 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
  • 47. Introductory Stroll REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains Unexplored State of Usability WS-* Forest
  • 48. 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, USA ahmadladhani.wordpress.com École d’Été Web Intelligence 2013 - Web des Objets September 4th 2013, St. Germain au Mont d’Or Simon Mayer, ETH Zurich
  • 49. 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, Microsoft ahmadladhani.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
  • 50. Introductory Stroll REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains Unexplored State of Usability WS-* Forest
  • 51. 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
  • 52. 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
  • 53. 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
  • 54. 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
  • 55. 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
  • 56. 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
  • 57. 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
  • 58. 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
  • 59. 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
  • 60. 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
  • 61. 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
  • 62. 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:binding transport="http://schemas.xml- soap.org/soap/http" style="document"/> </binding> WSDL description types, messages portType binding service The Service-Oriented Architecture Main Technologies: WSDL
  • 63. 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
  • 64. Service Integration in the Web of Things 64| 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 Application-Server Server Logic Server Stub Client Client Stub Client Logic
  • 65. 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 Application-Server Server Logic Server Stub
  • 66. 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
  • 67. 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 Application-Server Server Logic Server Stub Client Client Stub Client Logic
  • 68. 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 Client Client Stub Client Logic
  • 69. 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)
  • 70. 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…
  • 71. Introductory Stroll WS-* Forest HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains REST Beacon of Hope
  • 72. 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/France home.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
  • 73. 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]
  • 74. Introductory Stroll WS-* Forest HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains REST Beacon of Hope
  • 75. 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
  • 76. 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… ;-)
  • 77. Web-based Interaction with Smart Environments 77| Simon Mayer http://people.inf.ethz.ch/mayersi REST and WS-* Google Trends, 2004-2013 “SOAP Java”
  • 78. Web-based Interaction with Smart Environments 78| Simon Mayer http://people.inf.ethz.ch/mayersi REST and WS-* Google Trends, 2004-2013 WSDL
  • 79. Web-based Interaction with Smart Environments 79| Simon Mayer http://people.inf.ethz.ch/mayersi REST and WS-* Google Trends, 2004-2013 UDDI
  • 80. 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… ;-)
  • 81. Web-based Interaction with Smart Environments 81| Simon Mayer http://people.inf.ethz.ch/mayersi REST and WS-* Google Trends, 2004-2013 RESTful
  • 82. Web-based Interaction with Smart Environments 82| Simon Mayer http://people.inf.ethz.ch/mayersi REST and WS-* Google Trends, 2004-2013 UDDI RESTful “SOAP Java”
  • 83. 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…
  • 84. 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
  • 85. 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
  • 86. 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!
  • 87. 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
  • 88. 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
  • 89. Web-based Interaction with Smart Environments 89| Simon Mayer http://people.inf.ethz.ch/mayersi REST and WS-* Developers’ Perspective: Study Setup
  • 90. 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
  • 91. 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
  • 92. 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
  • 93. 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
  • 94. 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
  • 95. 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
  • 97. 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?
  • 98. 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
  • 99. 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
  • 100. 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
  • 101. 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
  • 102. 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
  • 103. 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
  • 104. 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]
  • 105. 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
  • 106. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains
  • 107. Now for the cool stuff: HATEOAS [or, Hypermedia as the Engine of Application State] [or, the server guides clients using hyperlinks]
  • 108. Did you ever experience that the “back” button broke a hypermedia application? e-banking, e-commerce, flights booking, etc. Why is that?
  • 109. “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!
  • 110. 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
  • 111. 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??
  • 112. 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
  • 113. 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
  • 114. 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
  • 115. 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”
  • 117. 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
  • 118. http://bookstore.org/carts/simon http://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
  • 119. 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
  • 120. 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
  • 121. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains
  • 122. 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)
  • 123. 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
  • 124. 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
  • 125. 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, Switzerland ethz.ch École d’Été Web Intelligence 2013 - Web des Objets September 4th 2013, St. Germain au Mont d’Or Simon Mayer, ETH Zurich
  • 126. Service Integration in the Web of Things 126| Simon Mayer http://people.inf.ethz.ch/mayersi Example Scenario
  • 127. 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
  • 128. 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…
  • 129. 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!
  • 130. 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!
  • 131. 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>(…)
  • 132. 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
  • 133. 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!
  • 134. 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. ?
  • 135. 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!
  • 136. Alright… from the beginning :-) We’ll see four service integration techniques, an example for each, and discuss their suitability for our considered applications
  • 137. 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 morefunctionality……morecomplexity
  • 138. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains
  • 139. 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
  • 140. 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
  • 141. 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
  • 142. Service Integration in the Web of Things 142| Simon Mayer http://people.inf.ethz.ch/mayersi Hypermedia Crawling The Friends and Things Project
  • 143. 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
  • 144. Service Integration in the Web of Things 144| Simon Mayer http://people.inf.ethz.ch/mayersi Hypermedia Crawling The Friends and Things Project
  • 145. 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
  • 146. Service Integration in the Web of Things 146| Simon Mayer http://people.inf.ethz.ch/mayersi Hypermedia Crawling Discussion Rating Comments Interface Discovery Partial Requires APIs to be connected via hyperlinks Automatic Service Usage No 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
  • 147. 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
  • 148. 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?
  • 149. 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
  • 150. 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 Embedding both: HTML!
  • 151. 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
  • 152. 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
  • 153. 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!
  • 154. 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
  • 155. 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
  • 156. 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…
  • 157. 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
  • 158. Service Integration in the Web of Things 158| Simon Mayer http://people.inf.ethz.ch/mayersi Microformats The InfraWoT Project: Registration
  • 159. 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, UUID None. 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 Description Label, URL Template, Input, Output hRESTS
  • 160. 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/thermostat Method: HTTP PUT Rating: 4.3 (0..5) hProduct Category GEO hRESTS Input
  • 161. 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
  • 162. Service Integration in the Web of Things 162| Simon Mayer http://people.inf.ethz.ch/mayersi Microformats Discussion Rating Comments Interface Discovery None Requires to fall back on crawling or indexing Automatic Service Usage Partial hRESTS allows definition of API, but no format to describe it for machine clients Level of Semantic Integration Partial Microformats define the semantics of objects, but are only partially linked to ontologies Simplicity Medium Cumbersome annotation of HTML representations required
  • 163. 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
  • 164. 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
  • 165. 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>
  • 166. 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
  • 167. 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
  • 168. GUI / Touch Screen Haptic / Gyro Example: Interaction with a Web-enabled LED
  • 169. Speech Haptic / Accelerometer Example: Interaction with a Web-enabled Power Plug
  • 170. Haptic / Gyroscope Example: Interaction with a Web-enabled Toy Robot
  • 171. GUI / Gyroscope Composite UI set intensity, switch, get data, goto, move Example: Interaction with iTunes Faster than the iPhone-App!
  • 172. 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
  • 173. Service Integration in the Web of Things 173| Simon Mayer http://people.inf.ethz.ch/mayersi Microdata Discussion Rating Comments Interface Discovery None Requires to fall back on crawling or indexing Automatic Service Usage No No standard format to annotate Web APIs Level of Semantic Integration Partial Allows to define an object’s class/type, if ontologies like schema.org are used Simplicity Easy Annotation of HTML representations required. Better usability than Microformats
  • 174. 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
  • 175. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains
  • 176.  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
  • 177. 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…
  • 178. ...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”}
  • 179. ...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
  • 180. Does every smart device have to be capable of parsing every single format...?
  • 181. 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”}
  • 182. 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...
  • 183. 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?
  • 184. 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!
  • 185. 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
  • 186. 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
  • 187. 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)
  • 188. Service Integration in the Web of Things 188| Simon Mayer http://people.inf.ethz.ch/mayersi Object Recognition + Embedded UI Metadata Example: Web-enabled Toy Robot GUI / Gyroscope
  • 189. Service Integration in the Web of Things 189| Simon Mayer http://people.inf.ethz.ch/mayersi Object Recognition + Embedded UI Metadata Example: Volume Controller GUI / Gyroscope
  • 190. Service Integration in the Web of Things 190| Simon Mayer http://people.inf.ethz.ch/mayersi Object Recognition + Embedded UI Metadata Soon for cars?
  • 191. Service Integration in the Web of Things 191| Simon Mayer http://people.inf.ethz.ch/mayersi Object Recognition + Embedded UI Metadata Soon for cars?
  • 192. Service Integration in the Web of Things 192| Simon Mayer http://people.inf.ethz.ch/mayersi Object Recognition + Embedded UI Metadata Current status…
  • 193. 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 Recognition Conclusion 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
  • 194. 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
  • 195. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains
  • 196. 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
  • 197. However… These are constrained to operating within hypermedia applications! They require HATEOAS-style hypermedia controls to be already present! [example coming right up…]
  • 198.  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?
  • 199. 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”
  • 200. Example from REST Introduction /book/cart /checkout
  • 201. 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! …
  • 202. 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 !
  • 203. 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!
  • 204. 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.
  • 205. 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
  • 206. 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!
  • 207. 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
  • 208. 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
  • 209. 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
  • 210. GET wot_marketplace.org/nodes/A { “service” : “www.songsearch.org” “forward_paths” : { # None } }
  • 211. 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!
  • 213. 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
  • 214. GET wot_marketplace.org/nodes/A { “service” : “www.songsearch.org” “forward_paths” : { “play_song” : “nodes/F” } }
  • 215. GET wot_marketplace.org/nodes/A { “service” : “www.songsearch.org” “forward_paths” : { “play_song” : “nodes/F” } } I can do that now, too!
  • 216. 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
  • 217. 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
  • 218. 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” } }
  • 219. 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
  • 220. 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
  • 221. Service Integration in the Web of Things 221| Simon Mayer http://people.inf.ethz.ch/mayersi Globalization of HATEOAS Crowd-sourced Linkbases: Service Traversal
  • 222. 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…
  • 223. Task: Implement a client such that it follows the emergency link when the probability for arrhythmia is higher than 50%
  • 224. Service Integration in the Web of Things 224| Simon Mayer http://people.inf.ethz.ch/mayersi Globalization of HATEOAS Crowd-sourced Linkbases: Service Traversal
  • 225. 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
  • 226. 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” } } }
  • 227. 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
  • 228. 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
  • 229. 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
  • 230. Task: Implement a client that always uses the arrhythmia detector with the lowest delay
  • 231. 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
  • 232. Result: Automatic load balancing! That’s why we call it “marketplace”
  • 233. 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
  • 234. 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
  • 235. 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!
  • 236. Service Integration in the Web of Things 236| Simon Mayer http://people.inf.ethz.ch/mayersi Crowd-sourced Linkbases Discussion Rating Comments Interface Discovery Yes Requires developers or users to publish links Automatic Service Usage Partial Only on syntactic level (data types and formats) Level of Semantic Integration None No annotations Simplicity Tricky Relies on enough participants! And on them being reliable enough!
  • 237. Again, this didn’t enable automatic service usage!
  • 238. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains
  • 239. 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
  • 240. 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
  • 241. 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
  • 242. 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!
  • 243. 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
  • 244. 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
  • 245. 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> StandardRDF/XML @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/". Notation3 Brief N3 Primer: Statements Remember Catherine’s talk? Turtle Syntax
  • 246. 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”)
  • 247. Notation3 Brief 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”)
  • 248. Notation3 Brief 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)
  • 249. 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
  • 250. 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
  • 251. Notation3 The 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.
  • 252. If we know a song title, we also know the URL of a song with that title. Notation3 The 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
  • 253. 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
  • 254. Who is not convinced? Me!!
  • 255. Why is that? After reading ssm_rule.n3, I know that I can get a song URL. But I don’t know how!
  • 256. 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!
  • 257. Notation3 The 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.
  • 258. Notation3 The 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.
  • 259. “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
  • 260. But how do I say that I want a song URL?
  • 261. “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
  • 262. Why does this solve the missing links Problem?
  • 263. 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
  • 264. 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
  • 265. 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.
  • 266. “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
  • 267. 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!
  • 268. 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
  • 269. I don’t believe this! Let’s see it!
  • 270. 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)
  • 271. Oh, it actually works…
  • 272. 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?
  • 273. 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
  • 274. 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
  • 275. 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
  • 276. 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
  • 277. 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
  • 278. 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
  • 279. Hm. So I should just state my goals. And I can find and use services, too!
  • 280. Crowd-sourced Linkbases Discussion Rating Comments Interface Discovery Yes Only requires service entry endpoints Automatic Service Usage Yes 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
  • 281. Service Integration in the Web of Things 281| Simon Mayer http://people.inf.ethz.ch/mayersi Globalization of HATEOAS Semantics-based Linkbases: Possibilities
  • 282. Service Integration in the Web of Things 282| Simon Mayer http://people.inf.ethz.ch/mayersi Globalization of HATEOAS Semantics-based Linkbases: Possibilities
  • 283. Service Integration in the Web of Things 283| Simon Mayer http://people.inf.ethz.ch/mayersi Globalization of HATEOAS Semantics-based Linkbases: Possibilities
  • 284. Semantic Service Integration Technologies: Overview Crawling Microformats Microdata Crowd Linkbases Semantic Linkbases Interface Discovery Partial None None Yes Yes Automatic Service Usage No Partial No Partial Yes Level of Semantic Integration None Partial Partial None Partial Simplicity Very Easy Medium Easy Tricky ?
  • 285. Introductory Stroll WS-* Forest REST Beacon of Hope HATEOAS Cliffs Structured Data Lake Crowded Village Semantic Mountains Unexplored State of Usability
  • 286. 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, Austria presse.kaernten.at
  • 287. Study techniques and technologies that enable machines to discover smart devices, to select appropriate services, and to use them automatically! Goal
  • 288. 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
  • 289. 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
  • 290. 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
  • 291. 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
  • 292. 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
  • 293. 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!
  • 294.  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