Linked Data Notifications (LDN)
is a
W3C
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working t ...
Recommendation that describes a
communications protocol
A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. The protocol defines the rules, syntax, semantics and synchro ...
based on
HTTP
The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
,
URI Uri may refer to:
Places
* Canton of Uri, a canton in Switzerland
* Úri, a village and commune in Hungary
* Uri, Iran, a village in East Azerbaijan Province
* Uri, Jammu and Kashmir, a town in India
* Uri (island), an island off Malakula Isla ...
, 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
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
page) can advertise a receiving endpoint (''inbox'') for notification messages. Messages are expressed in RDF, and can contain arbitrary data.
Motivation
The
web
Web most often refers to:
* Spider web, a silken structure created by the animal
* World Wide Web or the Web, an Internet-based hypertext system
Web, WEB, or the Web may also refer to:
Computing
* WEB, a literate programming system created b ...
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
In computing, linked data (often capitalized as Linked Data) is structured data which is interlinked with other data so it becomes more useful through semantic queries. It builds upon standard Web technologies such as HTTP, RDF and URIs, but ...
, 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
A backlink is a link from some other website (the referrer) to that web resource (the referent). A ''web resource'' may be (for example) a website, web page, or web directory.
A backlink is a reference comparable to a citation. The quantity, ...
without manual intervention. Interactions within
social media
Social media are interactive media technologies that facilitate the creation and sharing of information, ideas, interests, and other forms of expression through virtual communities and networks. While challenges to the definition of ''social me ...
platforms, such as comments on a news article, are currently "locked" within the platform and hard to access across the web.
Several
linkback
A linkback is a method for Web authors to obtain notifications when other authors link to one of their documents. This enables authors to keep track of who is linking to, or referring to, their articles. The four methods ( refback, trackback, pi ...
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 A pingback is one of four types of linkback methods for Web authors to request notification when somebody links to one of their documents. This enables authors to keep track of who is linking to, or referring to their articles. Some weblog softwa ...
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,
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
Control may refer to:
Basic meanings Economics and business
* Control (management), an element of management
* Control, an element of management accounting
* Comptroller (or controller), a senior financial officer in an organization
* Controll ...
- so that any consuming application can select the particular information they understand.
Protocol
* A ''sender'' or ''receiver'' performs a
GET
or
HEAD
to an existing HTTP resource. Its ''inbox'' URI is discovered from either:
** A
Link:
relation in the HTTP response headers of type
http://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 ''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.
* 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.
At each stage, the sender and consumer may perform
content negotiation
Content negotiation refers to mechanisms defined as a part of HTTP that make it possible to serve different versions of a document (or more generally, representations of a resource) at the same URI, so that user agents can specify which version fi ...
to send or receive in any mutually agreed
RDF serialization format, but 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: ; 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
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
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
Turtles are an order of reptiles known as Testudines, characterized by a special shell developed mainly from their ribs. Modern turtles are divided into two major groups, the Pleurodira (side necked turtles) and Cryptodira (hidden necked ...
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: .
a schema:ReviewAction;
schema:agent [
a schema:Person;
schema:name "Alice"
schema:object ;
schema:result [
a schema:Review;
schema:reviewBody "This article is the best I've ever seen!"
]
] .
Implementations
Severa
LDN implementationsexists,
covering senders, consumers and receivers, including:
dokieli(sender, consumer)
errol(sender)
*
Fedora Commons
Fedora (or Flexible Extensible Digital Object Repository Architecture) is a digital asset management (DAM) content repository architecture upon which institutional repositories, digital archives, and digital library systems might be built. Fedo ...
(receiver)
*
Apache Marmotta (receiver)
Carbon LDP(receiver)
Linked Edit Rules(sender)
Solid(sender, receiver, consumer)
*
Virtuoso Universal Server
Virtuoso Universal Server is a middleware and database engine hybrid that combines the functionality of a traditional relational database management system (RDBMS), object–relational database (ORDBMS), virtual database, RDF, XML, free-text, w ...
(receiver, consumer)
Any
Linked Data Platform (LDP) implementations are also conforming Linked Data Notification ''receivers'' as LDN is a strict subset of LDP.
References
{{W3C standards
World Wide Web Consortium standards