Linked Data Notifications

Sarven Capadisli

Linked Data Notifications

SCTA, Basel, 2018-06-29, #LinkedResearch #SocialWeb #LinkedData

Sarven's avatar Sarven Capadisli http://csarven.ca/#i @csarven
Organisations
TIB Leibniz Information Centre for Science and Technology

Principles

Data on the Web should not be locked in to particular systems or be only readable by the applications which created it. Users should be free to switch between applications and share data between them.

W3C Linked Data Notifications design principles

Applications generate notifications about activities, interactions, and new information, which may be presented to the user or processed further.

W3C Linked Data Notifications overview

Linked Data NotificationsTargetSenderConsumerReceiverGETHEADGETHEADPOSTGETldp:inboxldp:containsInboxNotificationLinked Data Notificationshttps://www.w3.org/TR/ldn/

Summary

A target resource advertises its inbox in the HTTP header or the body in RDF.

All must at least speak JSON-LD, but can optionally negotiate for alternative RDF serializations.

HEAD /article HTTP/1.1
Host: example.org
Accept: application/ld+json
 
HTTP/1.1 200 OK
Link: <http://example.org/inbox/>;
       rel="http://www.w3.org/ns/ldp#inbox"
Request and response when discovering an Inbox with a HEAD request, and receiving a Link header
GET /article HTTP/1.1
Host: example.org
Accept: text/html, application/ld+json
HTTP/1.1 200 OK
Content-Type: text/html;charset=utf-8

<section about="#results" id="results"
  property="http://www.w3.org/ns/ldp#inbox" resource="/inbox/">
  <p>The results of this study are as follows..</p>
</section>
Discovering an Inbox with a GET request to retrieve HTML.
POST /inbox/ HTTP/1.1
Host: example.org
Content-Type: application/ld+json;
              profile="https://www.w3.org/ns/activitystreams"
Content-Language: en
Sending example request (headers)

...

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "@id": "",
  "@type": "Announce",
  "actor": "https://rhiaro.co.uk/#me",
  "object": "http://example.net/note",
  "target": "http://example.org/article",
  "updated": "2016-06-28T19:56:20.114Z"
}
Sending example request (payload)
HTTP/1.1 201 Created
Location: http://example.org/inbox/92d72f00
Response for created resource
GET /inbox/ HTTP/1.1
Host: example.org
Accept: application/ld+json
HTTP/1.1 200 OK
Content-Type: application/ld+json
{ "@context": "http://www.w3.org/ns/ldp",
  "@id": "http://example.org/inbox/",
  "contains": [ "http://example.org/inbox/5c6ca040",
    "http://example.org/inbox/92d72f00" ] }
Receiver responds to request on Inbox.
GET /inbox/92d72f00 HTTP/1.1
Consumer example: getting a notification

W3C Linked Data Notifications implementations


dokieli

a clientside editor for decentralised article publishing, annotations and social interactions.

dokieli share + notification

dokieli annotation + personal storage + notification

dokieli citation

Linked Open Research Cloud

Notifications about scholarly activities (articles, annotations, citations..)

Make it so!

#LinkedResearch #SocialWeb #LinkedData

Sarven's avatar Sarven Capadisli http://csarven.ca/#i @csarven

Credits