SlideShare a Scribd company logo
1 of 29
Aligning
Web Services
with the
Semantic Web
to Create a
Global Read-Write
Graph of Data

Markus Lanthaler
Graz University of Technology
Web services are increasingly popular
Twitter      Facebook     Google
15 billion    5 billion   5 billion
 per day      per day     per day
Semantic Web is still in its infancy
Semaphobia!?
Lightweight semantic annotations
     start to gain acceptance
Increasing interest in the relationship of
   RESTful services and Linked Data
Increasing interest in the relationship of
   RESTful services and Linked Data
© Nesster




            Most previous efforts assume
            RPC-style. REST is different.
simplicity


         son
{
    "id": 556410,
    "first_name": "Markus",
    "last_name": "Lanthaler",
    "gender": "male",
    "knows": [
      { "id": 586807, "name": "Christian Gütl" },
      { "id": 790980, "name": "John Doe" } ]
}
{
    "id": 556410,
    "first_name": "Markus",
    "last_name": "Lanthaler",
    "gender": "male",
    "knows": [
      { "id": 586807, "name": "Christian Gütl" },
      { "id": 790980, "name": "John Doe" } ]
}




    "type": "object",
    "model": "[foaf:Person]",
    "properties": {
      "id": {
        "type": "number", "model": "[ex:id]" },
      "first_name": {
        "type": "string", "model": "[foaf:firstName]" },
      "last_name": {
        "type": "string", "model": "[foaf:surname]" },
      ...
{
    "id": 556410,
    "first_name": "Markus",
    "last_name": "Lanthaler",
    "gender": "male",
    "knows": [
      { "id": 586807, "name": "Christian Gütl" },
      { "id": 790980, "name": "John Doe" } ]
}




    "type": "object",
    "model": "[foaf:Person]",
    "properties": {
      "id": {
        "type": "number", "model": "[ex:id]" },
      "first_name": {
        "type": "string", "model": "[foaf:firstName]" },
      "last_name": {
        "type": "string", "model": "[foaf:surname]" },
      ...
{
    "id": 556410,
    "first_name": "Markus",
    "last_name": "Lanthaler",
    "gender": "male",
    "knows": [
      { "id": 586807, "name": "Christian Gütl" },
      { "id": 790980, "name": "John Doe" } ]
}




    "type": "object",
    "model": "[foaf:Person]",
    "properties": {
      "id": {
        "type": "number", "model": "[ex:id]" },
      "first_name": {
        "type": "string", "model": "[foaf:firstName]" },
      "last_name": {
        "type": "string", "model": "[foaf:surname]" },
      ...
{
    "id": 556410,
    "first_name": "Markus",
    "last_name": "Lanthaler",
    "gender": "male",
    "knows": [
      { "id": 586807, "name": "Christian Gütl" },
      { "id": 790980, "name": "John Doe" } ]
}




          "/user/{id}": {
            "mediaType": "application/json",
            "seredasjDescription": "#",
            "variables": {
              "id": {
                 "binding": "#properties/knows/id"
            } },
            "requestDescription": "#"
          }
      }
{
    "id": 556410,
    "first_name": "Markus",
    "last_name": "Lanthaler",
    "gender": "male",
    "knows": [
      { "id": 586807, "name": "Christian Gütl" },
      { "id": 790980, "name": "John Doe" } ]
}




      "links": {
        "/user/search{?query}": {
           "mediaType": "application/json",
           "seredasjDescription": "personlist.json",
           "semantics": {
             "[iana:relation]": "[iana:search]" },
           "variables": {
             "query": { "model": "[foaf:name]" }
           }
        },
{
    "id": 556410,
    "first_name": "Markus",
    "last_name": "Lanthaler",
    "gender": "male",
    "knows": [
      { "id": 586807, "name": "Christian Gütl" },
      { "id": 790980, "name": "John Doe" } ]
}
Two Algorithms
1   select ← createSelect(query)
 2   bindings ← tripleStore.execute(select)
 3
 4   for each binding in bindings do
 5     deleteData ← createDeleteData(query, binding)
 6     operations.add(deleteData)
 7     insertData ← insertDeleteData(query, binding)
 8     operations.add(insertData)
 9   end for
10
11   operations.sort()
12   translateDataOperations(operations)
1   do
 2     requests ← retrievePotentialRequests(triples)
 3     progress ← false
 4     while requests.hasNext() = true do
 5       request ← requests.next()
 6       request.setData(triples)
 7       request.setData(tripleStore)
 8       if isValid(request) = true then
 9         if request.submit() = success then
10           resp ← request.parseResponse()
11           triples.update(resp.getTriples())
12           tripleStore.update(resp.getTriples())
13           requests.remove(request)
14           progress ← true
15         end if
16       end if
17     end while
18   while progress = true
19   if triples.empty() = true then
20     success()
21   else
22     error(triples)
23   end if
Publication Management Service
/author/{id}                   /publication/{id}
            foaf:Person                     foaf:Document
id           ex:persId             id            ex:pubId
name         foaf:givenName    X   title         dc:title      X
lastname     foaf:familyName   X   authors[] dc:creator        X
address      v:adr                      id       ex:persId     X
     city    v:locality                 name foaf:name
     country v:country-name
1   INSERT DATA {
 2     _:public1 a foaf:Document ;
 3               dc:title "My first paper" ;
 4               dc:creator _:author1 ;
 5               dc:creator auth:cg789 .
 6     _:author1 a foaf:Person ;
 7               foaf:givenName "Markus" ;
 8               foaf:familyName "Lanthaler" ;
 9               v:adr _:addr1 .
10     _:addr1 v:country-name "Italy" .
11   }



POST /publication/               POST /author/
  { "title": "My first paper",
    "authors": [
      { "id": "cg789" }
    ]
  }

201 Created
Location: /publication/p489/
1   INSERT DATA {
 2     _:public1 a foaf:Document ;
 3     pub:p489 dc:title "My first paper" ;
 4               dc:creator _:author1 ;
 5               dc:creator auth:cg789 .
 6     _:author1 a foaf:Person ;
 7     auth:ml98 foaf:givenName "Markus" ;
 8               foaf:familyName "Lanthaler" ;
 9               v:adr _:addr1 .
10     _:addr1 v:country-name "Italy" .
11   }



POST /publication/               POST /author/
  { "title": "My first paper",     { "name": "Markus",
    "authors": [                     "lastname": "Lanthaler",
      { "id": "cg789" }              "address": {
    ]                                  "country": "Italy"
  }                                } }

201 Created                      201 Created
Location: /publication/p489/     Location: /author/ml98
1   INSERT DATA {
 2     _:public1 a foaf:Document ;
 3     pub:p489 dc:title "My first paper" ;
 4               dc:creator auth:ml98 ;
 5               dc:creator auth:cg789 .
 6     _:author1 a foaf:Person ;
 7     auth:ml98 foaf:givenName "Markus" ;
 8               foaf:familyName "Lanthaler" ;
 9               v:adr _:addr1 .
10     _:addr1 v:country-name "Italy" .
11   }



PUT /publication/p489
  { "title": "My first paper",
    "authors": [
      { "id": "cg789" },
      { "id“: "ml98" }
    ]
  }

200 OK
do it on-the-fly
Thank You



© 2011, Markus Lanthaler. Some Rights Reserved.
http://creativecommons.org/licenses/by-nc-sa/3.0/
Questions?




Markus Lanthaler                     @MarkusLanthaler
Markus.Lanthaler@student.TUGraz.at   http://www.slideshare.net/lanthaler
Image Credits
(1) http://galleries.www.frut.lv/en/5432/959
(3) Adapted from “Two Billion is Cool,” M. Thomson. Available:
    http://corp.klout.com/blog/2011/07/two-billion-is-cool/
(5) http://en.wikipedia.org/wiki/The_Scream
(9) http://www.flickr.com/photos/nesster/3168425434/

More Related Content

What's hot

Missing kids on you
Missing kids on youMissing kids on you
Missing kids on you
guest3fa681
 
Citing Internet Sources
Citing Internet SourcesCiting Internet Sources
Citing Internet Sources
librarylady90
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDB
MongoDB
 

What's hot (20)

JSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked DataJSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked Data
 
JSON-LD Update
JSON-LD UpdateJSON-LD Update
JSON-LD Update
 
JSON-LD and MongoDB
JSON-LD and MongoDBJSON-LD and MongoDB
JSON-LD and MongoDB
 
Creating 3rd Generation Web APIs with Hydra
Creating 3rd Generation Web APIs with HydraCreating 3rd Generation Web APIs with Hydra
Creating 3rd Generation Web APIs with Hydra
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Advanced MongoDB Aggregation PipelinesMongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
 
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
 
JSON Schema in Web Frontend #insideFE
JSON Schema in Web Frontend #insideFEJSON Schema in Web Frontend #insideFE
JSON Schema in Web Frontend #insideFE
 
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, GermanyHarnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
 
The Internet Is Your New Database: An Introduction To The Semantic Web
The Internet Is Your New Database: An Introduction To The Semantic WebThe Internet Is Your New Database: An Introduction To The Semantic Web
The Internet Is Your New Database: An Introduction To The Semantic Web
 
HBase Lightning Talk
HBase Lightning TalkHBase Lightning Talk
HBase Lightning Talk
 
Missing kids on you
Missing kids on youMissing kids on you
Missing kids on you
 
Native json in the Cache' ObjectScript 2016.*
Native json in the Cache' ObjectScript 2016.*Native json in the Cache' ObjectScript 2016.*
Native json in the Cache' ObjectScript 2016.*
 
New approaches to hypertext and REST in a mobile-first world
New approaches to hypertext and REST in a mobile-first worldNew approaches to hypertext and REST in a mobile-first world
New approaches to hypertext and REST in a mobile-first world
 
Citing Internet Sources
Citing Internet SourcesCiting Internet Sources
Citing Internet Sources
 
Back to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1 - Introduction to NoSQLBack to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1 - Introduction to NoSQL
 
Linked Data and Tools
Linked Data and ToolsLinked Data and Tools
Linked Data and Tools
 
SF ElasticSearch Meetup - How HipChat Scaled to 1B Messages
SF ElasticSearch Meetup - How HipChat Scaled to 1B MessagesSF ElasticSearch Meetup - How HipChat Scaled to 1B Messages
SF ElasticSearch Meetup - How HipChat Scaled to 1B Messages
 
MongoDB San Francisco 2013: Schema design presented by Jason Zucchetto, Consu...
MongoDB San Francisco 2013: Schema design presented by Jason Zucchetto, Consu...MongoDB San Francisco 2013: Schema design presented by Jason Zucchetto, Consu...
MongoDB San Francisco 2013: Schema design presented by Jason Zucchetto, Consu...
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDB
 

Similar to Aligning Web Services with the Semantic Web to Create a Global Read-Write Graph of Data

(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf
Guido Schmutz
 

Similar to Aligning Web Services with the Semantic Web to Create a Global Read-Write Graph of Data (20)

Building Next-Generation Web APIs with JSON-LD and Hydra
Building Next-Generation Web APIs with JSON-LD and HydraBuilding Next-Generation Web APIs with JSON-LD and Hydra
Building Next-Generation Web APIs with JSON-LD and Hydra
 
HackMIT Lightning Talk
HackMIT Lightning TalkHackMIT Lightning Talk
HackMIT Lightning Talk
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
 
Abusing text/template for data transformation
Abusing text/template for data transformationAbusing text/template for data transformation
Abusing text/template for data transformation
 
Max Neunhöffer – Joins and aggregations in a distributed NoSQL DB - NoSQL mat...
Max Neunhöffer – Joins and aggregations in a distributed NoSQL DB - NoSQL mat...Max Neunhöffer – Joins and aggregations in a distributed NoSQL DB - NoSQL mat...
Max Neunhöffer – Joins and aggregations in a distributed NoSQL DB - NoSQL mat...
 
Handle complex POST/PATCH requests in RESTful API
Handle complex POST/PATCH requests in RESTful APIHandle complex POST/PATCH requests in RESTful API
Handle complex POST/PATCH requests in RESTful API
 
Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018
 
Introduction to MongoDB and Hadoop
Introduction to MongoDB and HadoopIntroduction to MongoDB and Hadoop
Introduction to MongoDB and Hadoop
 
FIWARE Global Summit - Hands-On NGSI-LD
FIWARE Global Summit - Hands-On NGSI-LDFIWARE Global Summit - Hands-On NGSI-LD
FIWARE Global Summit - Hands-On NGSI-LD
 
Data liberty in an age post sql - with pizazz - as presented at cloudburst
Data liberty in an age post sql - with pizazz - as presented at cloudburstData liberty in an age post sql - with pizazz - as presented at cloudburst
Data liberty in an age post sql - with pizazz - as presented at cloudburst
 
Data Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LDData Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LD
 
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
 
(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf
 
Api vortrag
Api vortragApi vortrag
Api vortrag
 
GraphQL Subscriptions
GraphQL SubscriptionsGraphQL Subscriptions
GraphQL Subscriptions
 
Elasticsearch for SQL Users
Elasticsearch for SQL UsersElasticsearch for SQL Users
Elasticsearch for SQL Users
 
xAPI Camp-Four Lines of Code
xAPI Camp-Four Lines of CodexAPI Camp-Four Lines of Code
xAPI Camp-Four Lines of Code
 
Elasticsearch for SQL Users
Elasticsearch for SQL UsersElasticsearch for SQL Users
Elasticsearch for SQL Users
 
API Design - 3rd Edition
API Design - 3rd EditionAPI Design - 3rd Edition
API Design - 3rd Edition
 

More from Markus Lanthaler

More from Markus Lanthaler (13)

From Strings to Things to a Web of Services
From Strings to Things to a Web of ServicesFrom Strings to Things to a Web of Services
From Strings to Things to a Web of Services
 
The Web Is Changing — From Strings to Things
The Web Is Changing — From Strings to ThingsThe Web Is Changing — From Strings to Things
The Web Is Changing — From Strings to Things
 
Why and How to Optimize Your Data Architecture for an Integrated Future
Why and How to Optimize Your Data Architecture for an Integrated FutureWhy and How to Optimize Your Data Architecture for an Integrated Future
Why and How to Optimize Your Data Architecture for an Integrated Future
 
Creating Awesome Web APIs is a Breeze
Creating Awesome Web APIs is a BreezeCreating Awesome Web APIs is a Breeze
Creating Awesome Web APIs is a Breeze
 
A Deep Dive into JSON-LD and Hydra
A Deep Dive into JSON-LD and HydraA Deep Dive into JSON-LD and Hydra
A Deep Dive into JSON-LD and Hydra
 
Stop Reinventing the Wheel! Use Linked Data to Build Better APIs
Stop Reinventing the Wheel! Use Linked Data to Build Better APIsStop Reinventing the Wheel! Use Linked Data to Build Better APIs
Stop Reinventing the Wheel! Use Linked Data to Build Better APIs
 
The Web 3.0 is just around the corner. Be prepared!
The Web 3.0 is just around the corner. Be prepared!The Web 3.0 is just around the corner. Be prepared!
The Web 3.0 is just around the corner. Be prepared!
 
Full-on Hypermedia APIs with Hydra
Full-on Hypermedia APIs with HydraFull-on Hypermedia APIs with Hydra
Full-on Hypermedia APIs with Hydra
 
Model Your Application Domain, Not Your JSON Structures
Model Your Application Domain, Not Your JSON StructuresModel Your Application Domain, Not Your JSON Structures
Model Your Application Domain, Not Your JSON Structures
 
A Web of Things to Reduce Energy Wastage
A Web of Things to Reduce Energy WastageA Web of Things to Reduce Energy Wastage
A Web of Things to Reduce Energy Wastage
 
SAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based ServicesSAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based Services
 
Semantic Web Services: State of the Art
Semantic Web Services: State of the ArtSemantic Web Services: State of the Art
Semantic Web Services: State of the Art
 
Towards a RESTful Service Ecosystem
Towards a RESTful Service EcosystemTowards a RESTful Service Ecosystem
Towards a RESTful Service Ecosystem
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Aligning Web Services with the Semantic Web to Create a Global Read-Write Graph of Data

  • 1. Aligning Web Services with the Semantic Web to Create a Global Read-Write Graph of Data Markus Lanthaler Graz University of Technology
  • 2. Web services are increasingly popular
  • 3. Twitter Facebook Google 15 billion 5 billion 5 billion per day per day per day
  • 4. Semantic Web is still in its infancy
  • 6. Lightweight semantic annotations start to gain acceptance
  • 7. Increasing interest in the relationship of RESTful services and Linked Data
  • 8. Increasing interest in the relationship of RESTful services and Linked Data
  • 9. © Nesster Most previous efforts assume RPC-style. REST is different.
  • 10. simplicity son
  • 11. { "id": 556410, "first_name": "Markus", "last_name": "Lanthaler", "gender": "male", "knows": [ { "id": 586807, "name": "Christian Gütl" }, { "id": 790980, "name": "John Doe" } ] }
  • 12. { "id": 556410, "first_name": "Markus", "last_name": "Lanthaler", "gender": "male", "knows": [ { "id": 586807, "name": "Christian Gütl" }, { "id": 790980, "name": "John Doe" } ] } "type": "object", "model": "[foaf:Person]", "properties": { "id": { "type": "number", "model": "[ex:id]" }, "first_name": { "type": "string", "model": "[foaf:firstName]" }, "last_name": { "type": "string", "model": "[foaf:surname]" }, ...
  • 13. { "id": 556410, "first_name": "Markus", "last_name": "Lanthaler", "gender": "male", "knows": [ { "id": 586807, "name": "Christian Gütl" }, { "id": 790980, "name": "John Doe" } ] } "type": "object", "model": "[foaf:Person]", "properties": { "id": { "type": "number", "model": "[ex:id]" }, "first_name": { "type": "string", "model": "[foaf:firstName]" }, "last_name": { "type": "string", "model": "[foaf:surname]" }, ...
  • 14. { "id": 556410, "first_name": "Markus", "last_name": "Lanthaler", "gender": "male", "knows": [ { "id": 586807, "name": "Christian Gütl" }, { "id": 790980, "name": "John Doe" } ] } "type": "object", "model": "[foaf:Person]", "properties": { "id": { "type": "number", "model": "[ex:id]" }, "first_name": { "type": "string", "model": "[foaf:firstName]" }, "last_name": { "type": "string", "model": "[foaf:surname]" }, ...
  • 15. { "id": 556410, "first_name": "Markus", "last_name": "Lanthaler", "gender": "male", "knows": [ { "id": 586807, "name": "Christian Gütl" }, { "id": 790980, "name": "John Doe" } ] } "/user/{id}": { "mediaType": "application/json", "seredasjDescription": "#", "variables": { "id": { "binding": "#properties/knows/id" } }, "requestDescription": "#" } }
  • 16. { "id": 556410, "first_name": "Markus", "last_name": "Lanthaler", "gender": "male", "knows": [ { "id": 586807, "name": "Christian Gütl" }, { "id": 790980, "name": "John Doe" } ] } "links": { "/user/search{?query}": { "mediaType": "application/json", "seredasjDescription": "personlist.json", "semantics": { "[iana:relation]": "[iana:search]" }, "variables": { "query": { "model": "[foaf:name]" } } },
  • 17. { "id": 556410, "first_name": "Markus", "last_name": "Lanthaler", "gender": "male", "knows": [ { "id": 586807, "name": "Christian Gütl" }, { "id": 790980, "name": "John Doe" } ] }
  • 19. 1 select ← createSelect(query) 2 bindings ← tripleStore.execute(select) 3 4 for each binding in bindings do 5 deleteData ← createDeleteData(query, binding) 6 operations.add(deleteData) 7 insertData ← insertDeleteData(query, binding) 8 operations.add(insertData) 9 end for 10 11 operations.sort() 12 translateDataOperations(operations)
  • 20. 1 do 2 requests ← retrievePotentialRequests(triples) 3 progress ← false 4 while requests.hasNext() = true do 5 request ← requests.next() 6 request.setData(triples) 7 request.setData(tripleStore) 8 if isValid(request) = true then 9 if request.submit() = success then 10 resp ← request.parseResponse() 11 triples.update(resp.getTriples()) 12 tripleStore.update(resp.getTriples()) 13 requests.remove(request) 14 progress ← true 15 end if 16 end if 17 end while 18 while progress = true 19 if triples.empty() = true then 20 success() 21 else 22 error(triples) 23 end if
  • 22. /author/{id} /publication/{id} foaf:Person foaf:Document id ex:persId id ex:pubId name foaf:givenName X title dc:title X lastname foaf:familyName X authors[] dc:creator X address v:adr id ex:persId X city v:locality name foaf:name country v:country-name
  • 23. 1 INSERT DATA { 2 _:public1 a foaf:Document ; 3 dc:title "My first paper" ; 4 dc:creator _:author1 ; 5 dc:creator auth:cg789 . 6 _:author1 a foaf:Person ; 7 foaf:givenName "Markus" ; 8 foaf:familyName "Lanthaler" ; 9 v:adr _:addr1 . 10 _:addr1 v:country-name "Italy" . 11 } POST /publication/ POST /author/ { "title": "My first paper", "authors": [ { "id": "cg789" } ] } 201 Created Location: /publication/p489/
  • 24. 1 INSERT DATA { 2 _:public1 a foaf:Document ; 3 pub:p489 dc:title "My first paper" ; 4 dc:creator _:author1 ; 5 dc:creator auth:cg789 . 6 _:author1 a foaf:Person ; 7 auth:ml98 foaf:givenName "Markus" ; 8 foaf:familyName "Lanthaler" ; 9 v:adr _:addr1 . 10 _:addr1 v:country-name "Italy" . 11 } POST /publication/ POST /author/ { "title": "My first paper", { "name": "Markus", "authors": [ "lastname": "Lanthaler", { "id": "cg789" } "address": { ] "country": "Italy" } } } 201 Created 201 Created Location: /publication/p489/ Location: /author/ml98
  • 25. 1 INSERT DATA { 2 _:public1 a foaf:Document ; 3 pub:p489 dc:title "My first paper" ; 4 dc:creator auth:ml98 ; 5 dc:creator auth:cg789 . 6 _:author1 a foaf:Person ; 7 auth:ml98 foaf:givenName "Markus" ; 8 foaf:familyName "Lanthaler" ; 9 v:adr _:addr1 . 10 _:addr1 v:country-name "Italy" . 11 } PUT /publication/p489 { "title": "My first paper", "authors": [ { "id": "cg789" }, { "id“: "ml98" } ] } 200 OK
  • 27. Thank You © 2011, Markus Lanthaler. Some Rights Reserved. http://creativecommons.org/licenses/by-nc-sa/3.0/
  • 28. Questions? Markus Lanthaler @MarkusLanthaler Markus.Lanthaler@student.TUGraz.at http://www.slideshare.net/lanthaler
  • 29. Image Credits (1) http://galleries.www.frut.lv/en/5432/959 (3) Adapted from “Two Billion is Cool,” M. Thomson. Available: http://corp.klout.com/blog/2011/07/two-billion-is-cool/ (5) http://en.wikipedia.org/wiki/The_Scream (9) http://www.flickr.com/photos/nesster/3168425434/