restful triple spaces of things
DESCRIPTION
Presentation on the Web of Things 2012 workshop.TRANSCRIPT
RESTful Triple Spaces of ThingsWoT 2012
Aitor Gomez-Goiri, Pablo Orduna, Diego Lopez-de-Ipina
DeustoTech - Deusto Institute of Technology, University of Deustohttp://www.morelab.deusto.es
June 19, 2012
Outline
Introduction
Otsopack
Evaluation
Conclusions
RESTful Triple Spaces of Things 2 / 42
Outline
Introduction
Otsopack
Evaluation
Conclusions
RESTful Triple Spaces of Things Introduction 3 / 42
The Web of Things
I Growing connectivity of everyday objects.I How to integrate them? What about using a web compliant
manner?I Scalable interaction, integration with the web world...I But also inherits problems from the web world!
I Lack of expressiveness and human orientation ⇒ TheSemantic Web
I The SW enables sharing knowledge across differentapplications
RESTful Triple Spaces of Things Introduction 4 / 42
The Semantic Web
The vision of the Semantic Web is to extend principles ofthe Web from documents to data. Data should beaccessed using the general Web architecture using, e.g.,URI-s; data should be related to one another just asdocuments (or portions of documents) are already. Thisalso means creation of a common framework that allowsdata to be shared and reused across application,enterprise, and community boundaries, to be processedautomatically by tools as well as manually, includingrevealing possible new relationships among pieces ofdata. [Con11]
RESTful Triple Spaces of Things Introduction 5 / 42
Triple Space Computing
I Space-based computingI time autonomyI space autonomyI reference autonomy
I Uses semantic web to describe knowledge shared betweenall the participant nodes
I 2 applications using standard ontologies can interact amongthem automatically enriching one each other.
I Requirements: they use the same space and standard andlinked ontologies.
RESTful Triple Spaces of Things Introduction 6 / 42
Goal
I Adapt TSC to IoTI Fully distributed
I The objects or devices manage their own information.I Direct/Route their queries to others.I The participants form a “virtual space”.
I Through an HTTP API (a wide range of devices can be partof TS)
RESTful Triple Spaces of Things Introduction 7 / 42
Outline
Introduction
OtsopackLayersTS HTTP API
Evaluation
Conclusions
RESTful Triple Spaces of Things Otsopack 8 / 42
Our realization of the ideas towards this adaptation areincarnated on Otsopack Open source project
Otsopack Layers
Each Otsopack instance.
RESTful Triple Spaces of Things Otsopack 10 / 42
Otsopack TS API
The developers using ourmiddleware use writing andreading primitives.
RESTful Triple Spaces of Things Otsopack 11 / 42
Data access
To store knowledge and toreason over it.
RESTful Triple Spaces of Things Otsopack 12 / 42
Network layer
I Discover new nodesI Consume other nodes’
HTTP API
RESTful Triple Spaces of Things Otsopack 13 / 42
About HTTP and TSC
The HTTP verbs retrieve, create, modify or delete web resources
The TS primitives retrieve, create, modify or delete RDF graphson a space
(right, to be honest TS also offers a query, which works at space level)
RESTful Triple Spaces of Things Otsopack 15 / 42
A RESTful HTTP API
I To expose TS querying primitivesI HTTP status codesI Using content negotiation
RESTful Triple Spaces of Things Otsopack 16 / 42
Outline
Introduction
Otsopack
EvaluationCase of study 1: XBeeCase of study 2: FoxG20Case of study 3: Tablet computerCase of study 4: regular computer
Conclusions
RESTful Triple Spaces of Things Evaluation 17 / 42
Goal
Prove the easy adoption of the proposed middleware by differentplatforms and its feasibility
⇓
3 different resource-constrained platforms(and a regular computer is also provided as a baseline for the comparison)
RESTful Triple Spaces of Things Evaluation 18 / 42
Reasoning
Which platforms could be able of reasoning over their data?⇓
RDFS reasoning evaluation⇓
we used real examples from the SSN ontology⇓
1. Data structure (TBox)2. Different measures (ABox)
RESTful Triple Spaces of Things Evaluation 19 / 42
XBee gateway platform
I ConnectPort R© X2 (XBee to IP gateway)I RAM: 8MBI Platform version: Python 2.4I REST libraries: Python Std LibI Semantic libraries: None
RESTful Triple Spaces of Things Evaluation 20 / 42
Case of study 1: XBee
I We developed a restricted middleware version using PythonI With more than 15 concurrent requests problems were
experienced
RESTful Triple Spaces of Things Evaluation 21 / 42
FoxG20 platform
I Processor: 400Mhz Atmel ARM9I RAM: 64MBI Platform version: Python 2.5I REST libraries: Python Std LibI Semantic libraries: Fuxi
RESTful Triple Spaces of Things Evaluation 22 / 42
Case of study 2: FoxG20
I Python implementation usedI Because is lighterI Does not implement all the modules definedI This may be desirable for less powerful devices
I Reasoning took a long timeI TBox: x17 regular computer, x2 galaxy tabI ABox: x32 - x6 galaxy tab
⇓should be limited to special occasions
RESTful Triple Spaces of Things Evaluation 23 / 42
Samsung Galaxy Tab
I Processor: 1 GHz Cortex-A8I RAM: 512MBI Platform version: Android 2.2I REST libraries: Python Std LibI Semantic libraries: Sesame 2.4.2
RESTful Triple Spaces of Things Evaluation 24 / 42
Case of study 3: Tablet computer
I Android implementation usedI HTTP request are handled worse than FoxG20
(remember it was a reduced version)I Reasoning was halfway between the FoxG20, but yet far
enough from the regular computerI x6 TBox and x5 ABox
RESTful Triple Spaces of Things Evaluation 25 / 42
My Toshiba laptop
I Processor: 2.26 GHz Intel Core 2 DuoI RAM: 4GBI Platform version: Java SE 6.0I REST libraries: RestletI Semantic libraries: Sesame 2.6.4
RESTful Triple Spaces of Things Evaluation 26 / 42
Case of study 4: regular computer
The time needed by any reasoning engine to reason requiresmuch less time than with any other device
⇓
This stresses the open challenge it represents to reason inresource constrained devices
RESTful Triple Spaces of Things Evaluation 27 / 42
Outline
Introduction
Otsopack
Evaluation
Conclusions
RESTful Triple Spaces of Things Conclusions 28 / 42
Conclusions
I We use RESTful interface in our middleware as the key forbuilding a fully distributed space
I Doing so, we ease the adoption of this API in heterogeneousand constrained devices
I Lessons learnt:I For small scenarios using semantic may seem complex
I The richer descriptions are beneficial in the long term whenmore and more applications share and exploit their knowledgein spaces
I The developer does not have to worry about accessing todifferent devices, instead he cares about the data shared inthe conceptual space
I Still, each device can be seen as a browsable WoT devicewhich serves semantic content
RESTful Triple Spaces of Things Conclusions 29 / 42
RESTful Triple Spaces of Things Conclusions 30 / 42
Bibliography
World Wide Web Consortium.W3c semantic web faq, August 2011.
RESTful Triple Spaces of Things Bibliography 31 / 42
RESTful Triple Spaces of Things Backup slides 32 / 42
Semantic Web example
RESTful Triple Spaces of Things Backup slides 33 / 42
Write
public String write(String spaceURI, Graph ITriples)
throws TSException;
RESTful Triple Spaces of Things Backup slides 34 / 42
Read
public Graph read
(String spaceURI, String graphURI, long timeout)
throws TSException;
public Graph read
(String spaceURI, Template template, long timeout)
throws TSException;
RESTful Triple Spaces of Things Backup slides 35 / 42
Take
public Graph take
(String spaceURI, String graphURI, long timeout)
throws TSException;
public Graph take
(String spaceURI, Template template, long timeout)
throws TSException;
RESTful Triple Spaces of Things Backup slides 36 / 42
Query
public Graph query(String spaceURI, Template template)
throws TSException;
RESTful Triple Spaces of Things Backup slides 37 / 42
Dissemination strategies
The technique known as negative broadcasting is implementedI all write operations are executed locallyI all read and query operations are propagated to the rest of
the nodes belonging to the same space(but we are working on other strategies)
RESTful Triple Spaces of Things Backup slides 38 / 42
Discovery
I Registry based discoveryI Multicast based implementedI Easy to adopt new ones: DNS, mDNS, etc.
RESTful Triple Spaces of Things Backup slides 39 / 42
TSC API in depth
HTTP request URLGET /{sp}/query/wildcards/{s}/{p}/{o-uri}
/{sp}/query/wildcards/{s}/{p}/{o-type}/{o-value}GET /{sp}/graphs/{g}GET /{sp}/graphs/wildcards/{s}/{p}/{o-uri}
/{sp}/graphs/wildcards/{s}/{p}/{o-type}/{o-value}DELETE /{sp}/graphs/{g}DELETE /{sp}/graphs/wildcards/{s}/{p}/{o-uri}
/{sp}/graphs/wildcards/{s}/{p}/{o-type}/{o-value}
RESTful Triple Spaces of Things Backup slides 40 / 42
Reasoning
Device TBox ABoxRegular computer
2.787 0.045(Sesame 2.6.4)
Samsung Galaxy Tab17.342 0.225
(Sesame 2.4.2)FoxG20
48.939 1.443(Fuxi)
RESTful Triple Spaces of Things Backup slides 41 / 42
All rights of images are reserved by theoriginal owners*, the rest of the content is licensed
under a Creative Commons by-sa 3.0 license.
* Michelle Tribe, Oberazzi and Marco Crupi.