Linked Data Notifications: Difference between revisions
→Examples: https |
expand information, reorganize infobox |
||
Line 2: | Line 2: | ||
{{Infobox technology standard |
{{Infobox technology standard |
||
| title = Linked Data Notifications |
| title = Linked Data Notifications |
||
| status = W3C Recommendation |
| status = [[World_Wide_Web_Consortium#W3C_recommendation_(REC)|W3C Recommendation]] |
||
| year_started = {{Start date and age|2016}}<ref name="ldn-spec-history">{{Cite web|url=https://www.w3.org/standards/history/ldn|title=Linked Data Notifications Publication History - W3C|language=en|website=W3C|date=n.d.|access-date=2021-04-21}}</ref><ref name="ldn-spec-20160726">{{Cite web|id=https://www.w3.org/TR/ldn/|url=https://www.w3.org/TR/2016/WD-ldn-20160726/|title=Linked Data Notifications|editor-last=Capadisli|editor-first=Sarven|editor2-last=Guy|editor2-first=Amy|language=en|date=2016-07-26|access-date=2021-04-21|archive-date=2017-05-02|collaboration=Social Web Working Group|publisher=Social Web Working Group|website=W3C}}</ref> |
|||
|first_published=2017-05-02| organization = [[World Wide Web Consortium]] |
|||
| first_published = {{Start date and age|2016|07|26}}<ref name="ldn-spec-history" /><ref name="ldn-spec-20160726" /> |
|||
⚫ | |||
| version = W3C Recommendation |
|||
| base_standards = [[Hypertext Transfer Protocol|HTTP]], [[Uniform Resource Identifier|URI]], [[Resource Description Framework|RDF]], [[JSON-LD]] |
|||
| version_date = {{Start date and age|2017|05|02}}<ref name="ldn-spec" /> |
|||
| related_standards = [[Linked Data Platform]], [[RDFa]], [[Turtle]] |
|||
| preview = Editor's Draft |
|||
| preview_date = {{Start date and age|2017|04|30}} |
|||
| committee = Social Web Working Group |
|||
| organization = {{Plainlist| |
|||
* {{abbr|[[World Wide Web Consortium|W3C]]|World Wide Web Consortium}} |
|||
* [[University of Bonn]] |
|||
* [[University of Edinburgh]] |
|||
}} |
|||
⚫ | |||
* Sarven Capadisli |
|||
* Amy Guy |
|||
}}<ref name="ldn-spec" /> |
|||
| base_standards = {{Plainlist| |
|||
* [[Hypertext Transfer Protocol|HTTP]] |
|||
* [[Uniform Resource Identifier|URI]] |
|||
* [[Resource Description Framework|RDF]] |
|||
* [[JSON-LD]] |
|||
}} |
|||
| related_standards = {{Plainlist| |
|||
* [[Linked Data Platform]] |
|||
* [[RDFa]] |
|||
* [[Turtle]] |
|||
}} |
|||
| domain = [[Semantic Web]], [[Communications protocol]] |
| domain = [[Semantic Web]], [[Communications protocol]] |
||
| abbreviation = LDN |
| abbreviation = LDN |
||
Line 12: | Line 35: | ||
}} |
}} |
||
'''Linked Data Notifications''' ('''LDN''') <ref>{{Cite web|url=https://www.w3.org/TR/2017/REC-ldn-20170502/|title=Linked Data Notifications|editor-last=Capadisli|editor-first=Sarven|editor2-last=Guy|editor2-first=Amy| |
'''Linked Data Notifications''' ('''LDN''') <ref name="ldn-spec">{{Cite web|url=https://www.w3.org/TR/2017/REC-ldn-20170502/|title=Linked Data Notifications|editor-last=Capadisli|editor-first=Sarven|editor2-last=Guy|editor2-first=Amy|website=W3C|publisher=Social Web Working Group|language=en|date=2017-05-02|access-date=2021-04-21|id=https://www.w3.org/TR/ldn/|archive-date=2017-05-02}}</ref> is a [[World Wide Web Consortium|W3C]] [[World Wide Web Consortium#W3C_recommendation_.28REC.29|Recommendation]] that describes a [[communications protocol]] based on [[Hypertext Transfer Protocol|HTTP]], [[Uniform Resource Identifier|URI]], and [[Resource Description Framework|RDF]] on how servers (''receivers'') can receive messages pushed to them by applications (''senders''), as well as how other applications (''consumers'') may retrieve those messages. Any web resource (like a [[HTML]] page) can advertise a receiving endpoint (''inbox'') for notification messages. Messages are expressed in RDF, and can contain arbitrary data. |
||
== Motivation == |
== Motivation == |
Revision as of 17:17, 21 April 2021
Abbreviation | LDN |
---|---|
Status | W3C Recommendation |
Year started | 2016[1][2] |
First published | July 26, 2016[1][2] |
Latest version | W3C Recommendation May 2, 2017[3] |
Preview version | Editor's Draft April 30, 2017 |
Organization | |
Committee | Social Web Working Group |
Editors |
|
Base standards | |
Related standards | |
Domain | Semantic Web, Communications protocol |
Website | www |
Linked Data Notifications (LDN) [3] is a W3C Recommendation that describes a communications protocol based on HTTP, URI, and RDF on how servers (receivers) can receive messages pushed to them by applications (senders), as well as how other applications (consumers) may retrieve those messages. Any web resource (like a HTML page) can advertise a receiving endpoint (inbox) for notification messages. Messages are expressed in RDF, and can contain arbitrary data.
Motivation
The web is a decentralized system of web resources, published by multiple organizations and individuals. Web resources, such as web pages and more formally structured Linked Data, frequently include links to other resources across the web, and may comment or describe them in various ways. The receiving end, however, are not generally notified of such link creation, and thus are unable to provide backlinks without manual intervention. Interactions within social media platforms, such as comments on a news article, are currently "locked" within the platform and hard to access across the web.
Several linkback mechanisms exists, and are commonly used between blog systems, e.g. a "response" post in blog B about a post in blog A causes B's platform to send a pingback to be shown on the original blog A. These mechanisms are however generally limited in which structured information can be sent, and the notifications themselves do not form part of the decentralized web and may be difficult to consume by any third party application.
A key motivation for LDN is to support notifications between decentralized Web applications,[4] including web browsers who - not having their own HTTP server - are unable to generate a HTTP link for their reply messages. Another motivation is to structure notifications as RDF statements using any Controlled vocabulary - so that any consuming application can select the particular information they understand.
Protocol
- A sender or receiver performs a
GET
orHEAD
to an existing HTTP resource. Its inbox URI is discovered from either:- A
Link:
relation in the HTTP response headers of typehttp://www.w3.org/ns/ldp#inbox
- An RDF statement embedded in the HTTP body using the RDF property
http://www.w3.org/ns/ldp#inbox
- A
- A sender creates a new notification (e.g. as JSON-LD), which it
POST
s to the inbox URI.- The receiver creates a new HTTP resource containing the posted notification and responds with
201 Created
and the created URI.
- The receiver creates a new HTTP resource containing the posted notification and responds with
- A consumer retrieves RDF from the discovered inbox URI using
GET
, then:- The consumer parses the response body to find RDF statements with the property
http://www.w3.org/ns/ldp#contains
. The object of these statements give the URIs to the accepted LDN notifications. - The consumer retrieve any of the linked notification using
GET
and process their RDF in an application-specific manner. - Notifications remain accessible, and can therefore be linked to and described in other web resources.
- The consumer parses the response body to find RDF statements with the property
At each stage, the sender and consumer may perform content negotiation to send or receive in any mutually agreed RDF serialization format, however a compliant LDN receiver must support at least JSON-LD.
Examples
A sender or consumer discovers the inbox for a given URI, in this example using the HEAD
method:
HEAD https://example.org/article/5 HTTP/1.1
HTTP/1.1 200 OK
Link: <https://example.org/inbox/7>; rel="http://www.w3.org/ns/ldp#inbox"
A sender sends a notification to the discovered inbox, in this example using the Schema.org vocabulary:
POST https://example.org/inbox/7 HTTP/1.1
Content-Type: application/ld+json
{ "@context": "http://schema.org",
"@type": "ReviewAction",
"object" : {
"@id": "https://example.org/article/5"
},
"agent": {
"@type": "Person",
"name": "Alice"
},
"result": {
"@type": "Review",
"reviewBody": "This article is the best I've ever seen!"
}
}
HTTP/1.1 201 Created
Location: http://example.org/inbox/f44f3f11
A consumer lists the content of the discovered inbox to find 3 notifications:
GET https://example.org/inbox/7 HTTP/1.1
Content-Type: application/ld+json
HTTP/1.1 200 OK
Content-Type: application/ld+json
{
"@context": "http://www.w3.org/ns/ldp",
"@id": "https://example.org/inbox/7",
"contains": [
"https://example.org/inbox/5c6ca040",
"https://cdn.example.org/inbox/92d72f00",
"https://example.org/inbox/f44f3f11",
]
}
Note that the URIs of the original resource, inbox and notifications are not required to be hosted on the same HTTP server (e.g. they may be on a CDN). The consumer follows the links for any notifications they wish to retrieve.
In this example, the consumer retrieves the new f44f3f11
notification, with content negotiation to prefer the Turtle RDF format:
GET https://example.org/inbox/f44f3f11 HTTP/1.1
Accept: application/ld+json;q=0.9, text/turtle;q=1.5
HTTP/1.1 200 OK
Content-Type: text/turtle
@prefix schema: <http://schema.org/> .
[ a schema:ReviewAction;
schema:agent [
a schema:Person;
schema:name "Alice"
];
schema:object <https://example.org/article/5>;
schema:result [
a schema:Review;
schema:reviewBody "This article is the best I've ever seen!"
]
] .
Implementations
Several LDN implementations exists,[4][5] covering senders, consumers and receivers, including:
- dokieli (sender, consumer)
- errol (sender)
- Fedora Commons (receiver)
- Apache Marmotta (receiver)
- Carbon LDP (receiver)
- Linked Edit Rules (sender)
- Solid (sender, receiver, consumer)
- Virtuoso Universal Server (receiver, consumer)
Any Linked Data Platform (LDP) implementations are also conforming Linked Data Notification receivers as LDN is a strict subset of LDP.[4]
References
- ^ a b "Linked Data Notifications Publication History - W3C". W3C. n.d. Retrieved 2021-04-21.
- ^ a b Capadisli, Sarven; Guy, Amy, eds. (2016-07-26). "Linked Data Notifications". W3C. Social Web Working Group. https://www.w3.org/TR/ldn/. Retrieved 2021-04-21.
{{cite web}}
:|archive-date=
requires|archive-url=
(help) - ^ a b c Capadisli, Sarven; Guy, Amy, eds. (2017-05-02). "Linked Data Notifications". W3C. Social Web Working Group. https://www.w3.org/TR/ldn/. Retrieved 2021-04-21.
{{cite web}}
:|archive-date=
requires|archive-url=
(help) - ^ a b c Capadisli, Sarven; Guy, Amy; Lange, Christoph; Auer, Sören; Sambra, Andrei; Berners-Lee, Tim (2017-05-28). Linked Data Notifications: A Resource-Centric Communication Protocol. Lecture Notes in Computer Science. Vol. 10249. pp. 537–553. doi:10.1007/978-3-319-58068-5_33. ISBN 978-3-319-58067-8. http://csarven.ca/linked-data-notifications.
{{cite book}}
:|journal=
ignored (help) - ^ "LDN Test Reports and Summary". linkedresearch.org. Retrieved 2017-05-26.