linked data and rest
DESCRIPTION
Meeting the requirements of REST with Linked Data Text: https://github.com/ericmoritz/linked-data-and-rest/blob/master/linked-data-outline.orgTRANSCRIPT
Linked Data and RESTHow can we finally get some REST?
A Journey through time and space...
4.1 WWW Application Domain Requirements
● Low Entry-barrier● Extensibility● Distributed Hypermedia● Internet-scale
○ Anarchic Scalability○ Independent Deployment
Low barrier to entry
Extensibility
Free of user-perceived latency
5ms 150ms<95ms
5ms 150ms<95ms
Cached:
TTLs kinda suck; use client-side Conditional GETs
“The Web is intended to be an Internet-scale distributed hypermedia system”
○ Anarchic Scalability○ Independent Deployment
Internet Scale
LINKS
4.1 WWW Application Domain RequirementsRequirements of a Web Application
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
A true web application: HTML
Life Section
OMG Katy Perry
<a href=”....”>
“Computer says no.”
<a href=”....”>
Browsing Homepage
id=</>url=</>name=”USA Today”section=</news/>section=</sports/>section=</life/>section=</money/>…
id=</life/>label=”Life”type=”Section”type=”Link”
<section>
Browsing a Section
id=</life/>url=</life/>name=”Life”story=</story/5868609/>type=”Section”
id=</story/5868609/>url=</story/life/people/2014/02/27/katy-perry-helps-deliver-baby-in-living-room/5868609/>title=”Katy Perry helps deliver baby in living room”type=”Story”
id=</story/life/people/2014/02/27/katy-perry-helps-deliver-baby-in-living-room/5868609/>type=”Link”
View Source...
<story>
Reading Story
id=</story/5868609/>url=</story/life/people/2014/02/27/katy-perry-helps-deliver-baby-in-living-room/5868609/>title=”Katy Perry helps deliver baby in living room”body=”...”
id=</story/life/people/2014/02/27/katy-perry-helps-deliver-baby-in-living-room/5868609/>type=”Link”
4.1 WWW Application Domain RequirementsIf these are the requirements?
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
Browsing Homepage
id=</>url=</>name=”USA Today”section=</news/>section=</sports/>section=</life/>section=</money/>…
id=</life/>label=”Life”type=”Section”type=”Link”
<section>
Browsing a Section
id=</life/>url=</life/>name=”Life”story=</story/5868609/>type=”Section”
id=</story/5868609/>url=</story/life/people/2014/02/27/katy-perry-helps-deliver-baby-in-living-room/5868609/>title=”Katy Perry helps deliver baby in living room”type=”Story”
id=</story/life/people/2014/02/27/katy-perry-helps-deliver-baby-in-living-room/5868609/>type=”Link”
What is state?
<story>
Reading Story
id=</story/5868609/>url=</story/life/people/2014/02/27/katy-perry-helps-deliver-baby-in-living-room/5868609/>title=”Katy Perry helps deliver baby in living room”body=”...”
id=</story/life/people/2014/02/27/katy-perry-helps-deliver-baby-in-living-room/5868609/>type=”Link”
Wrong Data Model for Raw Data
4.1 WWW Application Domain RequirementsWhat can let us REST?
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
Can JSON let us REST?4.1 WWW Application Domain Requirements
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
Can CSV let us REST?4.1 WWW Application Domain Requirements
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
Can Plain ol’ XML let us REST?
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
Can HTML5 let us REST?4.1 WWW Application Domain Requirements4.1 WWW Application Domain Requirements
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
Can RDFa+HTML5 let us REST?4.1 WWW Application Domain Requirements4.1 WWW Application Domain Requirements
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
Can RDF let us REST?4.1 WWW Application Domain Requirements4.1 WWW Application Domain Requirements
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
RDF as Distributed Hypermedia
@prefix hydra: <http://www.w3.org/ns/hydra/core#> .
Hydra +1 stars
Not XML; please God no!
Triples?
</story/43> gannett:author </author/54> .
subject predicate object
Eric has a bike.
subject predicate object
English:
RDF:
</author/54> gannett:firstName “Eric” .
subject predicate object
RDF is a graph
gannett:author
/story/43
/people/54
Eric
Moritz
gannett:firstName
gannett:lastName
RDF is a graph
/story/43
/people/54
Ericgannett:author
Moritz
gannett:firstName
gannett:lastName
/state/va
gannett:name
Virginia
gannett:state
Can we finally get some REST?4.1 WWW Application Domain Requirements4.1 WWW Application Domain Requirements
Can we drive the state transitions of multiple user-agents? Is it easy to author?
Can the service evolve?
Is the UI responsive?
Is it web scale?Can we share data effortlessly and deploy the client and server independently?
JSON-LD
Linked Data (2006) constraints
http://www.w3.org/DesignIssues/LinkedData.html
http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html
Shared Vocabulary
<http://memegenerator.net/topText>
<http://memegenerator.net/bottomText>
<http://schema.org/url>
<http://memegenerator.net/Meme>
<http://schema.org/image>
<http://schema.org/Thing>
Shared Vocabulary
<http://memegenerator.net/topText>
<http://memegenerator.net/bottomText>
<http://schema.org/url>
<http://memegenerator.net/Meme>
<http://schema.org/image>
<http://schema.org/Thing>
Shared Vocabulary
schema:image
schema:CreativeWork
schema:url
schema:title
schema:video
gannett:Asset
schema:VideoObject
schema:embedUrl
schema:encodingFormat
gannett:ssts
schema:video
schema:VideoObject
schema:embedUrl
schema:encodingFormat
gannett:SSTS
gannett:sstsSection
gannett:sstsSubSection
● Clarity of meaning● Flexibility of data modeling● Generality of user interfaces
With Linked Data
We can finally get some REST