The Mercure Protocol
draft-dunglas-mercure-00

The information below is for an old version of the document
Document Type Active Internet-Draft (individual)
Last updated 2018-10-11
Stream (None)
Intended RFC status (None)
Formats pdf htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                         K. Dunglas
Internet-Draft                                         Les-Tilleuls.coop
Intended status: Informational                          October 11, 2018
Expires: April 14, 2019

                          The Mercure Protocol
                        draft-dunglas-mercure-00

Abstract

   Mercure is a protocol allowing to push data updates to web browsers
   and other HTTP clients in a fast, reliable and battery-efficient way.
   It is especially useful to publish real-time updates of resources
   served through web APIs, to reactive web and mobile apps.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on April 14, 2019.

Copyright Notice

   Copyright (c) 2018 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Dunglas                  Expires April 14, 2019                 [Page 1]
Internet-Draft            The Mercure Protocol              October 2018

1.

   The keywords

   ,

   ,

   ,

   ,

   ,

   ,

   ,

   ,

   , and

   , when they appear in this document, are to be interpreted as
   described in [RFC2119].

2.

   The publisher

   advertises the URL of one or more hubs to the subscriber, allowing it
   to receive live updates when topics are updated.  If more than one
   hub URL is specified, it is expected that the publisher notifies each
   hub, so the subscriber

   subscribe to one or more of them.

   The publisher

   include at least one Link Header [RFC5988] with

   (a hub link header).  The target URL of these links

   be a hub implementing the Mercure protocol.

   Note: this relation type has not been registered yet [RFC5988].
   During the meantime, the relation type

   can be used instead.

Dunglas                  Expires April 14, 2019                 [Page 2]
Internet-Draft            The Mercure Protocol              October 2018

   The publisher

   provide the following target attributes in the Link headers:

   All these attributes are optional.

   The publisher

   also include one Link Header [RFC5988] with

   (the self link header).  It

   contain the canonical URL for the topic to which subscribers are
   expected to use for subscriptions.  If the Link with

   is ommitted, the current URL of the resource

   be used as fallback.

   Minimal example:

   Links embedded in HTML or XML documents (as defined in the WebSub
   recommendation)

   also be supported by subscribers.

   Note: the discovery mechanism described in this section is strongly
   inspired from the one specified in the WebSub recommendation [1].

3.

   The subscriber subscribes to an URL exposed by a hub to receive
   updates of one or many topics.  To subscribe to updates, the client
   opens an HTTPS connection following the Server-Sent Events
   specification [2] to the hub's subscription URL advertised by the
   Publisher.  The connection

   use HTTP/2 to leverage mutliplexing and other advanced features of
   this protocol.

   The subscriber specifies the list of topics to get updates for by
   using one or several query parameters named

   .  The value of these query parameters

   be URI templates [RFC6570].

   Note: an URL is also a valid URI template.

Dunglas                  Expires April 14, 2019                 [Page 3]
Internet-Draft            The Mercure Protocol              October 2018

   The protocol doesn't specify the maximum number of

   parameters that can be sent, but the hub

   apply an arbitrary limit.

   The EventSource JavaScript interface [3]

   be used to establish the connection.  Any other appropriate mechanism
   including but not limited to readable streams [4] and XMLHttpRequest
   [5] (used by popular polyfills)

   also be used.
Show full document text