Successfully reported this slideshow.

RESTful Triple Spaces of Things

940 views

Published on

Presentation on the Web of Things 2012 workshop.

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

RESTful Triple Spaces of Things

  1. 1. RESTful Triple Spaces of Things WoT 2012 ´ ˜ ´ ˜ Aitor Gomez-Goiri, Pablo Orduna, Diego Lopez-de-Ipina DeustoTech - Deusto Institute of Technology, University of Deusto http://www.morelab.deusto.es June 19, 2012
  2. 2. Outline Introduction Otsopack Evaluation ConclusionsRESTful Triple Spaces of Things 2 / 42
  3. 3. Outline Introduction Otsopack Evaluation ConclusionsRESTful Triple Spaces of Things Introduction 3 / 42
  4. 4. The Web of Things Growing connectivity of everyday objects. How to integrate them? What about using a web compliant manner? Scalable interaction, integration with the web world... But also inherits problems from the web world! Lack of expressiveness and human orientation ⇒ The Semantic Web The SW enables sharing knowledge across different applicationsRESTful Triple Spaces of Things Introduction 4 / 42
  5. 5. The Semantic Web The vision of the Semantic Web is to extend principles of the Web from documents to data. Data should be accessed using the general Web architecture using, e.g., URI-s; data should be related to one another just as documents (or portions of documents) are already. This also means creation of a common framework that allows data to be shared and reused across application, enterprise, and community boundaries, to be processed automatically by tools as well as manually, including revealing possible new relationships among pieces of data. [Con11]RESTful Triple Spaces of Things Introduction 5 / 42
  6. 6. Triple Space Computing Space-based computing time autonomy space autonomy reference autonomy Uses semantic web to describe knowledge shared between all the participant nodes 2 applications using standard ontologies can interact among them automatically enriching one each other. Requirements: they use the same space and standard and linked ontologies.RESTful Triple Spaces of Things Introduction 6 / 42
  7. 7. Goal Adapt TSC to IoT Fully distributed The objects or devices manage their own information. Direct/Route their queries to others. The participants form a “virtual space”. Through an HTTP API (a wide range of devices can be part of TS)RESTful Triple Spaces of Things Introduction 7 / 42
  8. 8. Outline Introduction Otsopack Layers TS HTTP API Evaluation ConclusionsRESTful Triple Spaces of Things Otsopack 8 / 42
  9. 9. Our realization of the ideas towards this adaptation are incarnated on Otsopack Open source project
  10. 10. Otsopack Layers Each Otsopack instance.RESTful Triple Spaces of Things Otsopack 10 / 42
  11. 11. Otsopack TS API The developers using our middleware use writing and reading primitives.RESTful Triple Spaces of Things Otsopack 11 / 42
  12. 12. Data access To store knowledge and to reason over it.RESTful Triple Spaces of Things Otsopack 12 / 42
  13. 13. Network layer Discover new nodes Consume other nodes’ HTTP APIRESTful Triple Spaces of Things Otsopack 13 / 42
  14. 14. About HTTP and TSC The HTTP verbs retrieve, create, modify or delete web resources The TS primitives retrieve, create, modify or delete RDF graphs on a space (right, to be honest TS also offers a query, which works at space level)RESTful Triple Spaces of Things Otsopack 15 / 42
  15. 15. A RESTful HTTP API To expose TS querying primitives HTTP status codes Using content negotiationRESTful Triple Spaces of Things Otsopack 16 / 42
  16. 16. Outline Introduction Otsopack Evaluation Case of study 1: XBee Case of study 2: FoxG20 Case of study 3: Tablet computer Case of study 4: regular computer ConclusionsRESTful Triple Spaces of Things Evaluation 17 / 42
  17. 17. Goal Prove the easy adoption of the proposed middleware by different platforms 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
  18. 18. 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
  19. 19. XBee gateway platform ConnectPort R X2 (XBee to IP gateway) RAM: 8MB Platform version: Python 2.4 REST libraries: Python Std Lib Semantic libraries: NoneRESTful Triple Spaces of Things Evaluation 20 / 42
  20. 20. Case of study 1: XBee We developed a restricted middleware version using Python With more than 15 concurrent requests problems were experiencedRESTful Triple Spaces of Things Evaluation 21 / 42
  21. 21. FoxG20 platform Processor: 400Mhz Atmel ARM9 RAM: 64MB Platform version: Python 2.5 REST libraries: Python Std Lib Semantic libraries: FuxiRESTful Triple Spaces of Things Evaluation 22 / 42
  22. 22. Case of study 2: FoxG20 Python implementation used Because is lighter Does not implement all the modules defined This may be desirable for less powerful devices Reasoning took a long time TBox: x17 regular computer, x2 galaxy tab ABox: x32 - x6 galaxy tab ⇓ should be limited to special occasionsRESTful Triple Spaces of Things Evaluation 23 / 42
  23. 23. Samsung Galaxy Tab Processor: 1 GHz Cortex-A8 RAM: 512MB Platform version: Android 2.2 REST libraries: Python Std Lib Semantic libraries: Sesame 2.4.2RESTful Triple Spaces of Things Evaluation 24 / 42
  24. 24. Case of study 3: Tablet computer Android implementation used HTTP request are handled worse than FoxG20 (remember it was a reduced version) Reasoning was halfway between the FoxG20, but yet far enough from the regular computer x6 TBox and x5 ABoxRESTful Triple Spaces of Things Evaluation 25 / 42
  25. 25. My Toshiba laptop Processor: 2.26 GHz Intel Core 2 Duo RAM: 4GB Platform version: Java SE 6.0 REST libraries: Restlet Semantic libraries: Sesame 2.6.4RESTful Triple Spaces of Things Evaluation 26 / 42
  26. 26. Case of study 4: regular computer The time needed by any reasoning engine to reason requires much less time than with any other device ⇓ This stresses the open challenge it represents to reason in resource constrained devicesRESTful Triple Spaces of Things Evaluation 27 / 42
  27. 27. Outline Introduction Otsopack Evaluation ConclusionsRESTful Triple Spaces of Things Conclusions 28 / 42
  28. 28. Conclusions We use RESTful interface in our middleware as the key for building a fully distributed space Doing so, we ease the adoption of this API in heterogeneous and constrained devices Lessons learnt: For small scenarios using semantic may seem complex The richer descriptions are beneficial in the long term when more and more applications share and exploit their knowledge in spaces The developer does not have to worry about accessing to different devices, instead he cares about the data shared in the conceptual space Still, each device can be seen as a browsable WoT device which serves semantic contentRESTful Triple Spaces of Things Conclusions 29 / 42
  29. 29. RESTful Triple Spaces of Things Conclusions 30 / 42
  30. 30. Bibliography World Wide Web Consortium. W3c semantic web faq, August 2011.RESTful Triple Spaces of Things Bibliography 31 / 42
  31. 31. RESTful Triple Spaces of Things Backup slides 32 / 42
  32. 32. Semantic Web exampleRESTful Triple Spaces of Things Backup slides 33 / 42
  33. 33. Write public String write(String spaceURI, Graph ITriples) throws TSException;RESTful Triple Spaces of Things Backup slides 34 / 42
  34. 34. 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
  35. 35. 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
  36. 36. Query public Graph query(String spaceURI, Template template) throws TSException;RESTful Triple Spaces of Things Backup slides 37 / 42
  37. 37. Dissemination strategies The technique known as negative broadcasting is implemented all write operations are executed locally 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
  38. 38. Discovery Registry based discovery Multicast based implemented Easy to adopt new ones: DNS, mDNS, etc.RESTful Triple Spaces of Things Backup slides 39 / 42
  39. 39. TSC API in depth HTTP request URL GET /{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
  40. 40. Reasoning Device TBox ABox Regular computer 2.787 0.045 (Sesame 2.6.4) Samsung Galaxy Tab 17.342 0.225 (Sesame 2.4.2) FoxG20 48.939 1.443 (Fuxi)RESTful Triple Spaces of Things Backup slides 41 / 42
  41. 41. 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.

×