Hypermedia Workshop

Hypermedia Workshop
1/200
1 of 200
Hypermedia Workshop
Hypermedia Workshop
Resource Architectural Constraints and the Properties They Induce
Brian Sletten (!@bsletten)
03/17/2015
2 of 200
Hypermedia Workshop
Speaker Qualifications
· Specialize in next-generation technologies
· Author of 'Resource-Oriented Architecture Patterns for Webs of Data'
· Speaks internationally about REST, Semantic Web, Data Science, Security,
Visualization, Architecture
· Worked in Defense, Finance, Retail, Hospitality, Video Game, Health Care,
Telecommunications and Publishing Industries
· International Pop Recording Artist
3/200
3 of 200
Hypermedia Workshop
Agenda
· Introduction
· Identity
· Interaction
· Representation
· Description
· Patterns
· Linked Data
4/200
4 of 200
Hypermedia Workshop
Introduction
5 of 200
Hypermedia Workshop
6/200
6 of 200
Hypermedia Workshop
“ Approximately half of the talks at API
conferences start with a variation of this slide:
'we’re doing great, because there are more
than 12,000 APIs...' ”
Ruben Verborgh
http://ruben.verborgh.org/blog/2015/02/25/fostering-intelligence-by-enabling-it/
7 of 200
Hypermedia Workshop
“ Personally, I never understood how
overgrowth can be a good thing: 12,000 APIs
means 12,000 different ways of engaging in
machine-to-machine interaction. ”
Ruben Verborgh
http://ruben.verborgh.org/blog/2015/02/25/fostering-intelligence-by-enabling-it/
8 of 200
Hypermedia Workshop
“ Software architecture research investigates methods for determining how best
to partition a system, how components identify and communicate with each
other, how information is communicated, how elements of a system can evolve
independently, and how all of the above can be described using formal and
informal notations. ”
Dr. Roy T. Fielding
http://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf
9 of 200
Hypermedia Workshop
“ My work is motivated by the desire to understand and evaluate the architectural
design of network- based application software through principled use of
architectural constraints, thereby obtaining the functional, performance, and
social properties desired of an architecture. ”
Dr. Roy T. Fielding
http://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf
10 of 200
Hypermedia Workshop
“ An architectural style is a named, coordinated
set of architectural constraints. ”
Dr. Roy T. Fielding
http://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf
11 of 200
Hypermedia Workshop
Desired Properties
· Performance
· Scalability
· Generality
· Simplicity
· Modifiability
· Extensibility
12/200
12 of 200
Hypermedia Workshop
Client Server
13/200
13 of 200
Hypermedia Workshop
Stateless Client Server
14/200
14 of 200
Hypermedia Workshop
Stateless Client Server w/ Cache and Uniform
Interface
15/200
15 of 200
Hypermedia Workshop
Layered Stateless Client Server w/ Cache and
Uniform Interface
16/200
16 of 200
Hypermedia Workshop
REST on a Slide
Credit: Architectural Styles and the Design of Network-based Software Architectures
17/200
17 of 200
Hypermedia Workshop
Identity
18 of 200
Hypermedia Workshop
“ The function of a name is to facilitate sharing. ”
Ross J. Anderson
19 of 200
Hypermedia Workshop
“ When systems become large, the scale-up problems are not linear; there is often
a qualitative change in complexity, and some things that are trivial to deal with in
a network of only a few machines and principals (such as naming) suddenly
become a big deal. ”
Ross J. Anderson
20 of 200
Hypermedia Workshop
Naming Scheme Properties
· Identity
· Disambiguation
· Scope
· Resolvability
21/200
21 of 200
Hypermedia Workshop
22/200
22 of 200
Hypermedia Workshop
23/200
23 of 200
Hypermedia Workshop
24/200
24 of 200
Hypermedia Workshop
25/200
25 of 200
Hypermedia Workshop
Uniform Naming Scheme
· http://bosatsu.net/foaf/brian.rdf
· ftp://ftp.funet.fi/pub/standards/RFC/rfc959.txt
· urn:isbn:0913966568
· https://w3id.org/people/bsletten
· TBD
26/200
26 of 200
Hypermedia Workshop
27/200
27 of 200
Hypermedia Workshop
What REST Says About URLs
·
28/200
28 of 200
Hypermedia Workshop
29/200
29 of 200
Hypermedia Workshop
30/200
30 of 200
Hypermedia Workshop
31/200
31 of 200
Hypermedia Workshop
Resource For the Current Time
http://example.com/time/timezone/EDT
http://example.com/time/timezone/PDT
http://example.com/time/state/us/hawaii
http://example.com/time/timezone/HAST
32/200
32 of 200
Hypermedia Workshop
Canonical vs Historical
http://bosatsu.net/talks/topic/rest
http://bosatsu.net/talks/conf/nfjs/2013/rest/minneapolis
33/200
33 of 200
Hypermedia Workshop
Versioning URLs
· Just don't do it
· Seriously, don't do it
· Conflates identity with representation
· Impact on API evolution
34/200
34 of 200
Hypermedia Workshop
“ Global naming leads to global network effects. ”
Architecture of the World Wide Web, Volume I
35 of 200
Hypermedia Workshop
“ Any resource anywhere can be given a URI. ”
Architecture of the World Wide Web, Volume I
36 of 200
Hypermedia Workshop
“ Any resource of significance should be given a
URI. ”
Architecture of the World Wide Web, Volume I
37 of 200
Hypermedia Workshop
“ A URI will repeatedly refer to 'the same' thing. ”
Architecture of the World Wide Web, Volume I
38 of 200
Hypermedia Workshop
“ The significance of identity for a given URI is
determined by the person who owns the URI,
who first determined what it points to. ”
Architecture of the World Wide Web, Volume I
39 of 200
Hypermedia Workshop
“ URI space does not have to be the only
universal space. ”
Architecture of the World Wide Web, Volume I
40 of 200
Hypermedia Workshop
“ What makes a cool URI? A cool URI is one
which does not change. ”
Tim Berners-Lee
Cool URIs Don't Change
41 of 200
Hypermedia Workshop
Things to Avoid
· Author name
· Status
· Access
· File name extension
· Software mechanism
42/200
42 of 200
Hypermedia Workshop
Interaction
43 of 200
Hypermedia Workshop
Application #1
Application #2
Application #3
REST API
Code
44/200
44 of 200
Hypermedia Workshop
Application #1
Application #2
Application #3
REST API
Code
45/200
45 of 200
Hypermedia Workshop
46/200
46 of 200
Hypermedia Workshop
GET
47/200
47 of 200
Hypermedia Workshop
POST
48/200
48 of 200
Hypermedia Workshop
PUT
49/200
49 of 200
Hypermedia Workshop
DELETE
50/200
50 of 200
Hypermedia Workshop
HEAD
51/200
51 of 200
Hypermedia Workshop
OPTIONS
52/200
52 of 200
Hypermedia Workshop
PATCH
53/200
53 of 200
Hypermedia Workshop
OPTIONS /example/buddies.xml HTTP/1.1
Host: www.example.com
HTTP/1.1 200 OK
Allow: GET, PUT, POST, OPTIONS, HEAD, DELETE, PATCH
Accept-Patch: application/example, text/example
GET /example/buddies.xml HTTP/1.1
Host: www.example.com
HTTP/1.1 200 OK
.
.
Etag: "e0023aa4e"
54/200
54 of 200
Hypermedia Workshop
PATCH /example/buddies.xml HTTP/1.1
Host: www.example.com
Content-Type: application/example
If-Match: "e0023aa4e"
Content-Length: 100
[patch changes]
HTTP/1.1 204 No Content
Content-Location: /example/buddies.xml
ETag: "e0023aa4f"
55/200
55 of 200
Hypermedia Workshop
Idempotency
GET
"
POST
#
PUT
"
PATCH
~"
DELETE
"
56/200
56 of 200
Hypermedia Workshop
Response Codes: 2XX
Code
Meaning
200
Ok
201
Created
202
Accepted
204
Success
57/200
57 of 200
Hypermedia Workshop
Response Codes: 3XX
Code
Meaning
301
Moved Permanently
302
Found
303
See Other
304
Not Modified
58/200
58 of 200
Hypermedia Workshop
Response Codes: 4XX
Code
Meaning
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not Found
405
Method Not Allowed
409
Conflict
411
Length Required
413
Entity Too Long
415
Unsupported Media Type
59/200
59 of 200
Hypermedia Workshop
Response Codes: 5XX
Code
Meaning
500
Internal Error
503
Service Unavailable
60/200
60 of 200
Hypermedia Workshop
Representation
61 of 200
Hypermedia Workshop
62/200
62 of 200
Hypermedia Workshop
Hypermedia Factors (HFactors)
Credit: Mike Amundsen
63/200
63 of 200
Hypermedia Workshop
Embedded Links (LE)
Credit: Mike Amundsen
64/200
64 of 200
Hypermedia Workshop
LE Examples
// HTML
<img src="http://bosatsu.net/images/bosatsu-kanji.jpg"/>
// XInclude
<author>
<x:include href="http://bosatsu.net/snippets/bio.xml"/>
</author>
65/200
65 of 200
Hypermedia Workshop
Outbound Links (LO)
Credit: Mike Amundsen
66/200
66 of 200
Hypermedia Workshop
LO Examples
// HTML
<p>
See you at <a href="http://uberconf.com">Überconf</a>.
</p>
67/200
67 of 200
Hypermedia Workshop
Outbound Links (LT)
Credit: Mike Amundsen
68/200
68 of 200
Hypermedia Workshop
LT Examples
// HTML
<form method="get" action="http://bosatsu.net/submit">
<input type="text" name="course" value="REST"/>
<input type="submit"/>
</form>
// HTTP
http://bosatsu.net/submit?course=REST
69/200
69 of 200
Hypermedia Workshop
LT Examples
URI Templates (RFC 6570)
http://example.com/~{username}/
http://example.com/dictionary/{term:1}/{term}
http://example.com/search{?q,lang}
http://example.com/~fred/
http://example.com/~mark/
http://example.com/dictionary/c/cat
http://example.com/dictionary/d/dog
http://example.com/search?q=cat&lang=en
http://example.com/search?q=chien&lang=fr
70/200
70 of 200
Hypermedia Workshop
Non-Idempotent Links (LN)
Credit: Mike Amundsen
71/200
71 of 200
Hypermedia Workshop
LN Examples
// HTML
<form method="post" action="http://bosatsu.net/submit/">
<textarea name="feedback">Hey Buddy, nice jacket</textarea>
<input type="submit"/>
</form>
POST /submit/ HTTP/1.1
Host: bosatsu.net
Content-Type: application/x-www-form-urlencoded
Length:34
feedback=Hey+Buddy%2C+nice+jacket
72/200
72 of 200
Hypermedia Workshop
Idempotent Links (LI)
Credit: Mike Amundsen
73/200
73 of 200
Hypermedia Workshop
LI Examples
// Atom
<link rel="edit" href="http://bosatsu.net/feed/edit/1"/>
// HTML
<script type="text/javascript">
function delete(url) {
var xhr = new XMLHttpRequest();
xhr.open("DELETE", url);
}
</script>
74/200
74 of 200
Hypermedia Workshop
W3C HTML Form HTTP Extensions
http://www.w3.org/TR/form-http-extensions/
<form action="http://www.example.com/cms/hogmanay" method="PUT">
<input name="If-Unmodified-Since"
type="hidden" value="Tue, 1 Jan 2013 12:00:00 GMT"
payload="_header"/>
<textarea name="content">
For auld lang syne, my dear,
For auld lang syne.
We'll tak a cup o' kindness yet,
For auld lang syne.
And there's a hand, my trusty fere!
And gie's a hand o' thine!
And we'll tak a right gude-willie waught,
For auld lang syne.
</textarea>
<button type="submit">Update</button>
</form>
75/200
75 of 200
Hypermedia Workshop
W3C HTML Form HTTP Extensions
http://www.w3.org/TR/form-http-extensions/
<form action="http://www.example.com/logs" method="DELETE">
<label for="since">Since</label>
<input id="since" name="since" type="datetime"/>
<button type="submit">Delete</button>
</form>
76/200
76 of 200
Hypermedia Workshop
Read Context (CR)
Credit: Mike Amundsen
77/200
77 of 200
Hypermedia Workshop
CR Examples
<x:include href="http://bosatsu.net/snippets/bio.xml"
accept-language="en, en-gb; q=0.9, jp;q=0.3"/>
78/200
78 of 200
Hypermedia Workshop
Update Context (CU)
Credit: Mike Amundsen
79/200
79 of 200
Hypermedia Workshop
CU Examples
// HTML
<form method="post" action="http://bosatsu.net/submit/"
enctype="text/plain">
<textarea name="feedback">Hey Buddy, nice jacket</textarea>
<input type="submit"/>
</form>
POST /submit/ HTTP/1.1
Host: bosatsu.net
Content-Type: text/plain
Length:34
Hey+Buddy%2C+nice+jacket
80/200
80 of 200
Hypermedia Workshop
Method Context (CM)
Credit: Mike Amundsen
81/200
81 of 200
Hypermedia Workshop
CM Examples
// HTML
<form method="post" action="/feedback">
<input name="keywords" type="text" value="foo,bar,baz"/>
<input type="submit"/>
</form>
// HTML
<form method="get" action="/feedback">
<input name="keywords" type="text" value="foo,bar,baz"/>
<input type="submit"/>
</form>
82/200
82 of 200
Hypermedia Workshop
Link Context (CL)
Credit: Mike Amundsen
83/200
83 of 200
Hypermedia Workshop
CL Examples
// Atom
<entry>
<title>The Bully</title>
<link rel="edit" href="http://bosatsu.net/feed/1"/>
<id>tag:bosatsu.net,2013:3.2397</id>
<updated>2013-03-01T12:29:29Z</updated>
<published>2013-02-13T08:29:29-04:00</published>
<author>
<name>Brian Sletten</name>
</author>
<content>Hey Buddy, nice car.</content>
</entry>
// HTML
<link rel="stylesheet" href="http://bosatsu.net/css/default.css"/>
84/200
84 of 200
Hypermedia Workshop
text/uri-list
Credit: Mike Amundsen
85/200
85 of 200
Hypermedia Workshop
application/svg+xml
Credit: Mike Amundsen
86/200
86 of 200
Hypermedia Workshop
application/atom+xml
Credit: Mike Amundsen
87/200
87 of 200
Hypermedia Workshop
application/html
Credit: Mike Amundsen
88/200
88 of 200
Hypermedia Workshop
Media Selection Considerations
· Domain-Specific
· Domain-General
· Application Semantics
· Transfer Semantics
89/200
89 of 200
Hypermedia Workshop
application/vnd.amundsen.maze+xml
Credit: Mike Amundsen
90/200
90 of 200
Hypermedia Workshop
application/vnd.amundsen.maze+xml
· Domain-Specific
· Application Semantics
· Meaningful links:
· start
· north
· east
· west
· south
· exit
91/200
91 of 200
Hypermedia Workshop
Maze Starting Point
GET /examples/mazes/2d/ HTTP/1.1
Host: amundsen.com
Accept: application/vnd.amundsen.maze+xml
<maze version="1.0">
<collection>
<link href="http://amundsen.com/examples/mazes/2d/fifty-by-fifty/"
rel="maze"/>
<link href="http://amundsen.com/examples/mazes/2d/five-by-five/"
rel="maze"/>
<link href="http://amundsen.com/examples/mazes/2d/my-new-maze/"
rel="maze"/>
<link href="http://amundsen.com/examples/mazes/2d/ten-by-ten/"
rel="maze"/>
</collection>
</maze>
92/200
92 of 200
Hypermedia Workshop
Requesting a Specific Maze
GET /examples/mazes/2d/five-by-five/ HTTP/1.1
Host: amundsen.com
Accept: application/vnd.amundsen.maze+xml
<maze version="1.0">
<item>
<link href="http://amundsen.com/examples/mazes/2d/five-by-five/0:north"
rel="start" />
<debug>
...
</debug>
</item>
</maze>
93/200
93 of 200
Hypermedia Workshop
Starting a Specific Maze
GET /examples/mazes/2d/five-by-five/0:north HTTP/1.1
Host: amundsen.com
Accept: application/vnd.amundsen.maze+xml
<maze version="1.0">
<cell>
<link
href="http://amundsen.com/examples/mazes/2d/five-by-five/0:north"
rel="current" debug="0:1,1,1,0" total="25" side="5" />
<link
href="http://amundsen.com/examples/mazes/2d/five-by-five/5:east"
rel="east" />
</cell>
</maze>
94/200
94 of 200
Hypermedia Workshop
95/200
95 of 200
Hypermedia Workshop
Maze Clients
· http://amundsen.com/examples/misc/maze-client.html
· https://github.com/caelum/restfulie/tree/master/full-examples/mikemaze
· http://yloiseau.net/hacks/maze/
96/200
96 of 200
Hypermedia Workshop
Credit: http://amundsen.com/media-types/collection/
97/200
97 of 200
Hypermedia Workshop
application/vnd.collections+json
Credit: Mike Amundsen
98/200
98 of 200
Hypermedia Workshop
Collections+JSON
{ "collection" :
{
"version" : "1.0",
"href" : "http://example.org/friends/"
}
}
99/200
99 of 200
Hypermedia Workshop
Collections+JSON
{ "collection" :
{
"version" : "1.0",
"href" : "http://example.org/friends/",
"links" : [],
"items" : [],
"queries" : [],
"template" : [],
"error" : []
}
}
100/200
100 of 200
Hypermedia Workshop
API Starting Point
http://example.org/api
{ "collection":
{
"version": "1.0",
"href": "http://example.org/api",
"links": [{
"rel": "account",
"href": "http://example.org/account"
}, {
"rel": "order",
"href": "http://example.org/order"
}, {
"rel": "product",
"href": "http://example.org/product"
}]
}
}
101/200
101 of 200
Hypermedia Workshop
Request Accounts
http://example.org/account
{ "collection":
{
"version": "1.0",
"href": "http://example.org/account",
"links": [{
"rel": "next",
"href": "http://example.org/account;page=2"
}],
"items": [],
"queries": [],
"template": []
}
}
102/200
102 of 200
Hypermedia Workshop
Request Accounts
http://example.org/account;page=2
{ "collection":
{
"version": "1.0",
"href": "http://example.org/account;page=2",
"links": [{
"rel": "prev",
"href": "http://example.org/account"
},
{
"rel": "next",
"href": "http://example.org/account;page=3"
}],
"items": [],
"queries": [],
"template": []
}
}
103/200
103 of 200
Hypermedia Workshop
Account Items
http://example.org/account
{ "collection":
{
"version": "1.0",
"href": "http://example.org/account",
...
"items": [
],
...
}
}
104/200
104 of 200
Hypermedia Workshop
Account Items
http://example.org/account
{
...
"items": [ {
"href": "/account/id/9468",
"data": [
{
"name": "username",
"value": "bob" },
{
"name": "id",
"value": "9468" }
],
"links": [
{
"name": "open",
"value": "/order/account/id/9468;status=open" },
{
"name": "recent",
"value": "/order/account/id/9468;status=recent" }
]
}]
...
}
105/200
105 of 200
Hypermedia Workshop
Account Queries
http://example.org/account
{
}
"collection":
{
"version": "1.0",
"href": "http://example.org/account",
...
"queries": [
],
...
}
106/200
106 of 200
Hypermedia Workshop
Account Queries
http://example.org/account
{
...
"queries": [ {
"encoding": "uri-template",
"rel" : "search",
"href" : "/account{;status,page,ipp}"
"data": [
{
"name": "status",
"value": "" },
{
"name": "page",
"value": "" },
{
"name": "ipp",
"value" : "" }
]
}]
...
}
107/200
107 of 200
Hypermedia Workshop
Account Queries
http://example.org/account;status=open;page=2
{
...
"queries": [ {
"encoding": "uri-template",
"rel" : "search",
"href" : "/account{;status,page,ipp}"
"data": [
{
"name": "status",
"value": "open" },
{
"name": "page",
"value": "2" },
{
"name": "ipp",
"value" : "" }
]
}]
...
}
108/200
108 of 200
Hypermedia Workshop
Description
109 of 200
Hypermedia Workshop
State of the Art?
· No real support for hypermedia
· Often object wrappers on either side
· Static contract
· Domain-specific
110/200
110 of 200
Hypermedia Workshop
Description Languages
· RAML
· Swagger
· Apiary.io
111/200
111 of 200
Hypermedia Workshop
Hydra + JSON-LD
http://www.hydra-cg.com
· Standard format
· Hypermedia-aware
· Arbitrary domains
· Extensible
· Interoperable w/ RDF and Linked Data
112/200
112 of 200
Hypermedia Workshop
Patterns
113 of 200
Hypermedia Workshop
Named Query Resource
Q3
Q1
Q2
114/200
114 of 200
Hypermedia Workshop
Intent
· Client-driven resource definition
· Reusable queries
· Potentially cacheable
115/200
115 of 200
Hypermedia Workshop
SPARQL Protocol
http://server/sparql?query=<URL-encoded-query>
SELECT ?s ?p ?o
WHERE {
?s ?p ?o
}
LIMIT 100
http://server/sparql?query=select%20%3Fs%20%3Fp%20%3Fo%20where%20%7B
%20%3Fs%20%3Fp%20%3Fo%20%7D%20limit%20100
116/200
116 of 200
Hypermedia Workshop
Most Important Query Ever Run
http://tinyurl.com/n9hhs68
117/200
117 of 200
Hypermedia Workshop
Consequences
· Potentially cacheable
· Client-imposed burdens on your system
· Complicated privilege models
· Linked Data Fragments
118/200
118 of 200
Hypermedia Workshop
Gateway Resource
119/200
119 of 200
Hypermedia Workshop
Intent
· Client-focused resource abstractions over external resources
· Adapter for orchestration, data aggregation and content extraction
120/200
120 of 200
Hypermedia Workshop
ql.io
prodid = select ProductID[0].Value from eBay.FindProducts where
QueryKeywords = 'macbook pro';
details = select * from eBay.ProductDetails where
ProductID in ('{prodid}') and ProductType = 'Reference';
reviews = select * from eBay.ProductReviews where
ProductID in ('{prodid}') and ProductType = 'Reference';
return select d.ProductID[0].Value as id, d.Title as title,
d.ReviewCount as reviewCount, r.ReviewDetails.AverageRating as rating
from details as d, reviews as r
where d.ProductID[0].Value = r.ProductID.Value
via route '/myapi' using method get;
curl http://tinyurl.com/p7zgg9y
121/200
121 of 200
Hypermedia Workshop
[
{ "id": "115174685",
"title": "Apple MacBook Pro A1278 13.3" Laptop - MD101LL/A (June, 2012)",
"reviewCount": 81, "rating": 4.5 },
{ "id": "84755204",
"title": "Apple MacBook Pro 13.3" Laptop - MC374LL/A (April, 2010)",
"reviewCount": 182, "rating": 4.5 },
{ "id": "108850048",
"title": "Apple MacBook Pro 13.3" Laptop (April, 2010) - Customized",
"reviewCount": 42, "rating": 4.5 },
{ "id": "108808476",
"title": "Apple MacBook Pro 15.4" Laptop (April, 2010) - Customized",
"reviewCount": 29, "rating": 4.5 },
{ "id": "78092464",
"title": "Apple MacBook Pro 13.3" Laptop - MB990LL/A (June, 2009)",
"reviewCount": 136, "rating": 4.5 }
]
122/200
122 of 200
Hypermedia Workshop
insert into bitly.shorten (longUrl) values ('http://ql.io/docs')
select long_url from bitly.shorten where shortUrl = 'http://bit.ly/uZIvmY'
insert into flickr.photos.upload with
parts "{req.parts[0]}", "{req.parts[1]}"
select * from bing.soap.search where q = "ql.io";
keyword = "ql.io";
web = select * from bing.search where q = "{keyword}";
tweets = select id as id, from_user_name as user_name, text as text
from twitter.search where q = "ql.io";
return {
"keyword": "{keyword}",
"web": "{web}",
"tweets": "{tweets}"
}
123/200
123 of 200
Hypermedia Workshop
Consequences
· Pipes and Filters vs The Web
· Table Structure vs Graph
· Potential to Lose Fidelity
124/200
124 of 200
Hypermedia Workshop
Transformation Resource
125/200
125 of 200
Hypermedia Workshop
Intent
· New resources to extract or transform content from other resources
· No impact on original resource
126/200
126 of 200
Hypermedia Workshop
RDFa Distiller
http://www.w3.org/2012/pyRdfa/Overview.html
RDFa 1.1 Distiller and Parser
Warning: This version implements RDFa 1.1 Core, including the handling of the Role Attribute. The distiller can also run in
XHTML+RDFa 1.0 mode (if the incoming XHTML content uses the RDFa 1.0 DTD and/or sets the version attribute). The package
available for download, although it may be slightly out of sync with the code running this service.
Distill by URI
Distill by File Upload
Distill by Direct Text Input
Distill by URI
URI:
Output
Format:
Turtle
Returned
content:
Only core triples
127/200
127 of 200
Hypermedia Workshop
Consequences
· Strict adherence to published commitments
· Improved by source adherence to cache controls
· Tangled authentication and authorization models
128/200
128 of 200
Hypermedia Workshop
Callback Resource
2
1
129/200
129 of 200
Hypermedia Workshop
Intent
· Support asynchronous models on the Web
· Leverage existing infrastructure
130/200
130 of 200
Hypermedia Workshop
GitHub WebHooks
http://developer.github.com/webhooks/
GitHub:Developer
API
Developers
Blog
Support
Search
API
Reference
Webhooks
Guides
Libraries
Webhooks
Events
Payloads
Ping Event
Service Hooks
Webhooks allow you to build or set up integrations which subscribe to certain events on GitHub.com. When one of those events is triggered, we’ll send
a HTTP POST payload to the webhook’s configured URL. Webhooks can be used to update an external issue tracker, trigger CI builds, update a backup
mirror, or even deploy to your production server. You’re only limited by your imagination.
Each webhook can be installed on an organization or a specific repository. Once installed, they will be triggered each time one or more subscribed
events occurs on that organization or repository.
Events
When configuring a webhook, you can choose which events you would like to receive payloads for. You can even opt-in to all current and future events.
131/200
131 of 200
Hypermedia Workshop
Consequences
· Security implications of client as 'server'
· Credential management
132/200
132 of 200
Hypermedia Workshop
Curated URI Resource
133/200
133 of 200
Hypermedia Workshop
Intent
· Abandon the baggage of resource location while maintaining its strengths
· 'Types of URLs'
134/200
134 of 200
Hypermedia Workshop
W3ID
https://w3id.org/
Permanent Identifiers for the
Web
Secure, permanent URLs for your Web application that will stand the test of time.
The purpose of this website is to provide a secure, permanent URL (http://en.wikipedia.org/wiki/URL)
re-direction service for Web applications. This service is run by the W3C Permanent Identifier
Community Group (http://www.w3.org/community/perma-id/).
135/200
135 of 200
Hypermedia Workshop
Consequences
· Constant roundtrips
136/200
136 of 200
Hypermedia Workshop
Linked Data
137 of 200
Hypermedia Workshop
Credit: Aldo Bucci
138/200
138 of 200
Hypermedia Workshop
Brian's birthday is May 26th.
139/200
139 of 200
Hypermedia Workshop
Brian's birthday is May 26th.
140/200
140 of 200
Hypermedia Workshop
https://w3id.org/people/bsletten's
http://xmlns.com/foaf/0.1/birthday is "05-26".
141/200
141 of 200
Hypermedia Workshop
A Single Fact
# N-Triple Serialization of the Fact
<https://w3id.org/people/bsletten>
<http://xmlns.com/foaf/0.1/birthday> "05-26" .
142/200
142 of 200
Hypermedia Workshop
143/200
143 of 200
Hypermedia Workshop
https://w3id.org/people/bsletten's name is Brian
Sletten.
144/200
144 of 200
Hypermedia Workshop
https://w3id.org/people/bsletten's
http://xmlns.com/foaf/0.1/name is "Brian
Sletten".
145/200
145 of 200
Hypermedia Workshop
A Single Fact
# N-Triple Serialization of the Fact
<https://w3id.org/people/bsletten>
<http://xmlns.com/foaf/0.1/name> "Brian Sletten" .
146/200
146 of 200
Hypermedia Workshop
147/200
147 of 200
Hypermedia Workshop
Two Facts
# N-Triple Serialization of the Facts
<https://w3id.org/people/bsletten>
<http://xmlns.com/foaf/0.1/birthday> "05-26" .
<https://w3id.org/people/bsletten>
<http://xmlns.com/foaf/0.1/name> "Brian Sletten" .
148/200
148 of 200
Hypermedia Workshop
149/200
149 of 200
Hypermedia Workshop
https://w3id.org/people/bsletten is a person.
150/200
150 of 200
Hypermedia Workshop
https://w3id.org/people/bsletten
http://www.w3.org/1999/02/22-rdf-syntaxns#type http://xmlns.com/foaf/0.1/Person.
151/200
151 of 200
Hypermedia Workshop
A Single Fact
# N-Triple Serialization of the Fact
<https://w3id.org/people/bsletten>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .
152/200
152 of 200
Hypermedia Workshop
153/200
153 of 200
Hypermedia Workshop
Three Facts
# N-Triple Serialization of the Facts
<https://w3id.org/people/bsletten>
<http://xmlns.com/foaf/0.1/birthday> "05-26" .
<https://w3id.org/people/bsletten>
<http://xmlns.com/foaf/0.1/name> "Brian Sletten" .
<https://w3id.org/people/bsletten>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .
154/200
154 of 200
Hypermedia Workshop
155/200
155 of 200
Hypermedia Workshop
RDF/XML
> rdfcat --out xml facts.nt
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/" >
<rdf:Description rdf:about="https://w3id.org/people/bsletten">
<foaf:birthday>05-26</foaf:birthday>
<foaf:name>Brian Sletten</foaf:name>
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
</rdf:Description>
</rdf:RDF>
156/200
156 of 200
Hypermedia Workshop
Turtle
> rdfcat --out ttl facts.nt
<https://w3id.org/people/bsletten>
a
<http://xmlns.com/foaf/0.1/Person> ;
<http://xmlns.com/foaf/0.1/birthday>
"05-26" ;
<http://xmlns.com/foaf/0.1/name>
"Brian Sletten" .
157/200
157 of 200
Hypermedia Workshop
Turtle
> rdfcat --out ttl http://bosatsu.net/turtle/brian.ttl
<https://w3id.org/people/bsletten>
<http://xmlns.com/foaf/0.1/depiction>
<http://bosatsu.net/images/briansletten.jpg> .
158/200
158 of 200
Hypermedia Workshop
Turtle
> rdfcat --out ttl facts.nt http://bosatsu.net/turtle/brian.ttl
<https://w3id.org/people/bsletten>
a
<http://xmlns.com/foaf/0.1/Person> ;
<http://xmlns.com/foaf/0.1/birthday>
"05-26" ;
<http://xmlns.com/foaf/0.1/depiction>
<http://bosatsu.net/images/briansletten.jpg> ;
<http://xmlns.com/foaf/0.1/name>
"Brian Sletten" .
159/200
159 of 200
Hypermedia Workshop
Principles
http://www.w3.org/DesignIssues/LinkedData.html
· Use URIs to name things
· Use HTTP URIs to make them resolvable
· When someone resolves a URI, provide useful information via standards
(SPARQL, RDF, etc.)
· Include links for discoverability
160/200
160 of 200
Hypermedia Workshop
161/200
161 of 200
Hypermedia Workshop
162/200
162 of 200
Hypermedia Workshop
163/200
163 of 200
Hypermedia Workshop
164/200
164 of 200
Hypermedia Workshop
165/200
165 of 200
Hypermedia Workshop
166/200
166 of 200
Hypermedia Workshop
167/200
167 of 200
Hypermedia Workshop
168/200
168 of 200
Hypermedia Workshop
169/200
169 of 200
Hypermedia Workshop
170/200
170 of 200
Hypermedia Workshop
171/200
171 of 200
Hypermedia Workshop
172/200
172 of 200
Hypermedia Workshop
DBPedia
http://dbpedia.org
173/200
173 of 200
Hypermedia Workshop
Artists for St. Patrick's Day
· Find music recommendations related to St. Patrick's Day
· Use DBPedia to find musical artists who are from Ireland
174/200
174 of 200
Hypermedia Workshop
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX : <http://dbpedia.org/resource/>
SELECT DISTINCT ?name ?person ?artist WHERE {
?person foaf:name ?name .
?person rdf:type dbo:MusicalArtist .
?person dbo:associatedMusicalArtist ?artist .
{ ?person dbo:hometown :Republic_of_Ireland . }
UNION
{ ?person dbo:birthPlace :Republic_of_Ireland . }
}
ORDER BY ?name
http://tinyurl.com/jwtt2aj
175/200
175 of 200
Hypermedia Workshop
176/200
176 of 200
Hypermedia Workshop
Linked Data Platform
http://www.w3.org/TR/ldp/
Linked Data Platform 1.0
W3C Recommendation 26 February 2015
This version:
http://www.w3.org/TR/2015/REC-ldp-20150226/
Latest published version:
http://www.w3.org/TR/ldp/
Latest editor's draft:
http://www.w3.org/2012/ldp/hg/ldp.html
Test suite:
https://dvcs.w3.org/hg/ldpwg/raw-file/default/tests/ldp-testsuite.html
Implementation report:
https://dvcs.w3.org/hg/ldpwg/raw-file/default/tests/reports/ldp.html
Previous version:
http://www.w3.org/TR/2014/PR-ldp-20141216/
Editors:
Steve Speicher, IBM Corporation
John Arwe, IBM Corporation
Ashok Malhotra, Oracle Corporation
177/200
177 of 200
Hypermedia Workshop
RelFinder
http://www.visualdataweb.org/relfinder.php
178/200
178 of 200
Hypermedia Workshop
Books
179 of 200
Hypermedia Workshop
180/200
180 of 200
Hypermedia Workshop
181/200
181 of 200
Hypermedia Workshop
182/200
182 of 200
Hypermedia Workshop
183/200
183 of 200
Hypermedia Workshop
184/200
184 of 200
Hypermedia Workshop
185/200
185 of 200
Hypermedia Workshop
186/200
186 of 200
Hypermedia Workshop
187/200
187 of 200
Hypermedia Workshop
188/200
188 of 200
Hypermedia Workshop
189/200
189 of 200
Hypermedia Workshop
190/200
190 of 200
Hypermedia Workshop
191/200
191 of 200
Hypermedia Workshop
192/200
192 of 200
Hypermedia Workshop
193/200
193 of 200
Hypermedia Workshop
194/200
194 of 200
Hypermedia Workshop
195/200
195 of 200
Hypermedia Workshop
196/200
196 of 200
Hypermedia Workshop
197/200
197 of 200
Hypermedia Workshop
198/200
198 of 200
Hypermedia Workshop
199/200
199 of 200
Hypermedia Workshop
Questions?
$ [email protected]
! @bsletten
+ http://tinyurl.com/bjs-gplus
& bsletten
200 of 200