restful triple spaces of things

42
RESTful Triple Spaces of Things WoT 2012 Aitor G ´ omez-Goiri , Pablo Ordu˜ na, Diego L ´ opez-de-Ipi ˜ na DeustoTech - Deusto Institute of Technology, University of Deusto http://www.morelab.deusto.es June 19, 2012

Upload: university-of-deusto-deustotech

Post on 18-Dec-2014

502 views

Category:

Technology


0 download

DESCRIPTION

Presentation on the Web of Things 2012 workshop.

TRANSCRIPT

Page 1: RESTful Triple Spaces of Things

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

Page 2: RESTful Triple Spaces of Things

Outline

Introduction

Otsopack

Evaluation

Conclusions

RESTful Triple Spaces of Things 2 / 42

Page 3: RESTful Triple Spaces of Things

Outline

Introduction

Otsopack

Evaluation

Conclusions

RESTful Triple Spaces of Things Introduction 3 / 42

Page 4: RESTful Triple Spaces of Things

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

Page 5: RESTful Triple Spaces of Things

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

Page 6: RESTful Triple Spaces of Things

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

Page 7: RESTful Triple Spaces of Things

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

Page 8: RESTful Triple Spaces of Things

Outline

Introduction

OtsopackLayersTS HTTP API

Evaluation

Conclusions

RESTful Triple Spaces of Things Otsopack 8 / 42

Page 9: RESTful Triple Spaces of Things

Our realization of the ideas towards this adaptation areincarnated on Otsopack Open source project

Page 10: RESTful Triple Spaces of Things

Otsopack Layers

Each Otsopack instance.

RESTful Triple Spaces of Things Otsopack 10 / 42

Page 11: RESTful Triple Spaces of Things

Otsopack TS API

The developers using ourmiddleware use writing andreading primitives.

RESTful Triple Spaces of Things Otsopack 11 / 42

Page 12: RESTful Triple Spaces of Things

Data access

To store knowledge and toreason over it.

RESTful Triple Spaces of Things Otsopack 12 / 42

Page 13: RESTful Triple Spaces of Things

Network layer

I Discover new nodesI Consume other nodes’

HTTP API

RESTful Triple Spaces of Things Otsopack 13 / 42

Page 14: RESTful Triple Spaces of Things
Page 15: RESTful Triple Spaces of Things

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

Page 16: RESTful Triple Spaces of Things

A RESTful HTTP API

I To expose TS querying primitivesI HTTP status codesI Using content negotiation

RESTful Triple Spaces of Things Otsopack 16 / 42

Page 17: RESTful Triple Spaces of Things

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

Page 18: RESTful Triple Spaces of Things

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

Page 19: RESTful Triple Spaces of Things

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

Page 20: RESTful Triple Spaces of Things

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

Page 21: RESTful Triple Spaces of Things

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

Page 22: RESTful Triple Spaces of Things

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

Page 23: RESTful Triple Spaces of Things

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

Page 24: RESTful Triple Spaces of Things

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

Page 25: RESTful Triple Spaces of Things

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

Page 26: RESTful Triple Spaces of Things

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

Page 27: RESTful Triple Spaces of Things

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

Page 28: RESTful Triple Spaces of Things

Outline

Introduction

Otsopack

Evaluation

Conclusions

RESTful Triple Spaces of Things Conclusions 28 / 42

Page 29: RESTful Triple Spaces of Things

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

Page 30: RESTful Triple Spaces of Things

RESTful Triple Spaces of Things Conclusions 30 / 42

Page 31: RESTful Triple Spaces of Things

Bibliography

World Wide Web Consortium.W3c semantic web faq, August 2011.

RESTful Triple Spaces of Things Bibliography 31 / 42

Page 32: RESTful Triple Spaces of Things

RESTful Triple Spaces of Things Backup slides 32 / 42

Page 33: RESTful Triple Spaces of Things

Semantic Web example

RESTful Triple Spaces of Things Backup slides 33 / 42

Page 34: RESTful Triple Spaces of Things

Write

public String write(String spaceURI, Graph ITriples)

throws TSException;

RESTful Triple Spaces of Things Backup slides 34 / 42

Page 35: RESTful Triple Spaces of Things

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

Page 36: RESTful Triple Spaces of Things

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

Page 37: RESTful Triple Spaces of Things

Query

public Graph query(String spaceURI, Template template)

throws TSException;

RESTful Triple Spaces of Things Backup slides 37 / 42

Page 38: RESTful Triple Spaces of Things

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

Page 39: RESTful Triple Spaces of Things

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

Page 40: RESTful Triple Spaces of Things

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

Page 41: RESTful Triple Spaces of Things

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

Page 42: RESTful Triple Spaces of Things

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.