Miel Vander Sande!
@miel_vds!
Publish Data as !
Time consistent !
Web API!
Cultural Heritage – Open Data!
ARCHIVE & DESSIMINATE
metadata or data!
Web
API
R
R
API
R
R
API
R
R
Resource-oriented scalable & easily combined!
Linked Data, Mashups, Web applicationS
HTTP!
API
R
R
API
R
R
Resources’ value (state) change over time !
APIs only publish most recent state!
Resource state changes lead to
inconsistenties in mashup results!
http://example.com/...
Memento
DateTime negotiation over HTTP!
Constant state over resources!
Van de Sompel et al.!
http://mementoweb.org!
R TG
M
Original Resource! TimeGate! Memento(s)!
MMM
Memento
R TG
GET! 200 OK!
Link: URI-TG;!
type=timegate!
MMMM
Memento
MMMMR TG
GET!
Accept-Datetime:!
2014-05-14T00:00:00!
302 Found!
Location: URI-M!
Memento
M1 M3 M4M2
Mementos: encapsulated prior states with timestamp!
Memento
M1 M3 M4M2
Select last valid Memento at given Datetime!
GET URI-TG!
Accept-Datetime: 2014-05-15T00:00:00!
Memento
MMMMR
GET!
TG
200 OK!
Link: URI-R;type=original!
Link: URI-Mn;type=next!
Link: URI-Mp;type=previous!
Memento
Each API works with!
Own Archiving System!
Own Storage Access!
Own File Formats!
Custom implementation required !
Memento
Publish data as!
TIME CONSISTENT API
Storage! API! Memento!
Data management!
Versioning!
Publishing Resources!
HTTP intera...
PROVENANCE!
Who, WHEN & WHAT
happened to my resources?!
M1 M3 M4M2
Provenance !
describes when resource values change!
Was revision of Was revision of Was revision of
A2 A4A3A1
g...
PROV-O!
provenance in RDF!
<Resource> prov:wasRevisionOf <Resource/M3>;
prov:wasGeneratedBy :rev4.
:rev4 prov:endedAtTime
...
Publish data as!
TIME CONSISTENT API
Storage! API! Memento!
Data management!
Versioning!
Publishing Resources!
HTTP intera...
Provenance!
Provenance*!
File versions!
Version Resources!
File!
File Resource!
1. Versioning & MANAGING FILES!
PROVCSV
CSV-CxCSV-CxCSV-CxCSV-Cx
http://git2prov.org
Data Commits Provenance
2. CREATING THE API!
POST!
/api/definitions!
{
“uri”: file-url,
“type”: “text/csv”,
“Delimiter”: “,”
}
The DataTank: insta...
2. CREATING THE API!
200 OK!
Location: URI-L!
The DataTank: instant REST API for heteregeneous data!
PROV
L
GIT!
2. CREATING THE API!
API! L
MMMV
Link: provenance! describes!
CSV
CSV-CxCSV-CxCSV-CxCSV-Cx
PROV
API!
GMP!
R TG
MMMM
L PROV
MMMV
GET!
Link: provenance! describes!
GET! GET!
3. GENERIC Memento PROXY
Decision Engine
GENERIC Memento PROXY
TG
PROV
GET!
Accept-Datetime:!
2014-05-14T00:00:00!
N3
rules
EYE
Reasoner
M
+
V
302 ...
DeCISION LOGIC WITH SEMANTIC REASONING!
EYE reasoner and N3 rules select memento!
prov:wasRevisionOf rdfs:subPropertyOf :m...
DeCISION LOGIC WITH REASONING!
EYE reasoner and N3 rules select the memento!
{
:request :datetime ?req_datetime.
[] e:find...
DeCISION LOGIC WITH REASONING!
EYE reasoner and N3 rules select the memento!
:response :memento <Resource/M1> .
:response ...
Publish data as!
TIME CONSISTENT API
Storage! API! Memento!
Data management!
Versioning!
Publishing Resources!
HTTP intera...
Publish data as!
TIME CONSISTENT API
Storage! API! Memento!
Data management!
Versioning!
Publishing Resources!
HTTP intera...
Miel Vander Sande!
@miel_vds!
Upcoming SlideShare
Loading in...5
×

Publish data as Time Consistent Web API based on Provenance (WS-REST 2014)

1,417
-1

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,417
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Publish data as Time Consistent Web API based on Provenance (WS-REST 2014)

  1. 1. Miel Vander Sande! @miel_vds! Publish Data as ! Time consistent ! Web API!
  2. 2. Cultural Heritage – Open Data! ARCHIVE & DESSIMINATE metadata or data!
  3. 3. Web API R R API R R API R R Resource-oriented scalable & easily combined! Linked Data, Mashups, Web applicationS HTTP!
  4. 4. API R R API R R Resources’ value (state) change over time !
  5. 5. APIs only publish most recent state! Resource state changes lead to inconsistenties in mashup results! http://example.com/average-income! http://example.com/unemployment-rate! 2004 2012 InaccuRate MASHUP!
  6. 6. Memento DateTime negotiation over HTTP! Constant state over resources! Van de Sompel et al.! http://mementoweb.org!
  7. 7. R TG M Original Resource! TimeGate! Memento(s)! MMM Memento
  8. 8. R TG GET! 200 OK! Link: URI-TG;! type=timegate! MMMM Memento
  9. 9. MMMMR TG GET! Accept-Datetime:! 2014-05-14T00:00:00! 302 Found! Location: URI-M! Memento
  10. 10. M1 M3 M4M2 Mementos: encapsulated prior states with timestamp! Memento
  11. 11. M1 M3 M4M2 Select last valid Memento at given Datetime! GET URI-TG! Accept-Datetime: 2014-05-15T00:00:00! Memento
  12. 12. MMMMR GET! TG 200 OK! Link: URI-R;type=original! Link: URI-Mn;type=next! Link: URI-Mp;type=previous! Memento
  13. 13. Each API works with! Own Archiving System! Own Storage Access! Own File Formats! Custom implementation required ! Memento
  14. 14. Publish data as! TIME CONSISTENT API Storage! API! Memento! Data management! Versioning! Publishing Resources! HTTP interaction! Datetime negotiation! DYNAMIC + GENERIC ??
  15. 15. PROVENANCE! Who, WHEN & WHAT happened to my resources?!
  16. 16. M1 M3 M4M2 Provenance ! describes when resource values change! Was revision of Was revision of Was revision of A2 A4A3A1 generated generated generated generated
  17. 17. PROV-O! provenance in RDF! <Resource> prov:wasRevisionOf <Resource/M3>; prov:wasGeneratedBy :rev4. :rev4 prov:endedAtTime "2014-06-10T14:30:00Z"^^xsd:dateTime. <Resource/M3> prov:wasRevisionOf <Resource/M2>; prov:wasGeneratedBy :rev3. :rev3 prov:endedAtTime "2014-05-14T14:30:00Z"^^xsd:dateTime.
  18. 18. Publish data as! TIME CONSISTENT API Storage! API! Memento! Data management! Versioning! Publishing Resources! HTTP interaction! Datetime negotiation! PROVENANCE
  19. 19. Provenance! Provenance*! File versions! Version Resources! File! File Resource!
  20. 20. 1. Versioning & MANAGING FILES! PROVCSV CSV-CxCSV-CxCSV-CxCSV-Cx http://git2prov.org Data Commits Provenance
  21. 21. 2. CREATING THE API! POST! /api/definitions! { “uri”: file-url, “type”: “text/csv”, “Delimiter”: “,” } The DataTank: instant REST API for heteregeneous data! file-url commit-url PROV
  22. 22. 2. CREATING THE API! 200 OK! Location: URI-L! The DataTank: instant REST API for heteregeneous data! PROV L
  23. 23. GIT! 2. CREATING THE API! API! L MMMV Link: provenance! describes! CSV CSV-CxCSV-CxCSV-CxCSV-Cx PROV
  24. 24. API! GMP! R TG MMMM L PROV MMMV GET! Link: provenance! describes! GET! GET! 3. GENERIC Memento PROXY
  25. 25. Decision Engine GENERIC Memento PROXY TG PROV GET! Accept-Datetime:! 2014-05-14T00:00:00! N3 rules EYE Reasoner M + V 302 Found! Location: URI - M!
  26. 26. DeCISION LOGIC WITH SEMANTIC REASONING! EYE reasoner and N3 rules select memento! prov:wasRevisionOf rdfs:subPropertyOf :memento. :memento a owl:TransitiveProperty. :request :datetime "2014-05-15T00:00:00Z"^^xsd:dateTime
  27. 27. DeCISION LOGIC WITH REASONING! EYE reasoner and N3 rules select the memento! { :request :datetime ?req_datetime. [] e:findall (?datetime { ?rev prov:endedAtTime ?datetime . (?datetime ?req_datetime) pred:dateTime- less-than-or-equal true. } ?datetime_list) . ?datetime_list e:max ?current_datetime. ?current prov:endedAtTime ?current_datetime. } => { :response :memento ?current. }. IF prov:endedAtTime is largest prior to given ?req_datetime THEN! Selected memento is the ! ?current one
  28. 28. DeCISION LOGIC WITH REASONING! EYE reasoner and N3 rules select the memento! :response :memento <Resource/M1> . :response :next-memento <Resource/M2> . :response :last-memento <Resource> .
  29. 29. Publish data as! TIME CONSISTENT API Storage! API! Memento! Data management! Versioning! Publishing Resources! HTTP interaction! Datetime negotiation! DYNAMIC + GENERIC ??
  30. 30. Publish data as! TIME CONSISTENT API Storage! API! Memento! Data management! Versioning! Publishing Resources! HTTP interaction! Datetime negotiation! PROVENANCE
  31. 31. Miel Vander Sande! @miel_vds!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×