Fw: Proposal for Per Resource Events Protocol

Rahul Gupta <cxres@protonmail.com> Tue, 29 August 2023 21:49 UTC

Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <cxres@protonmail.com>) id 1qb6WH-00Cp1u-B2 for ietf-http-wg@listhub.w3.org; Tue, 29 Aug 2023 21:49:51 +0000
Received: from mail-40141.protonmail.ch ([185.70.40.141]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <cxres@protonmail.com>) id 1qb6ap-008O8K-QY for ietf-http-wg@w3.org; Tue, 29 Aug 2023 21:49:50 +0000
Date: Tue, 29 Aug 2023 21:49:31 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1693345781; x=1693604981; bh=8/6iEgLe7y2WyEYwz4wjuhZwnQZB72yPWwXOMQpUI5Q=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=NJFthVDhPovgbnslxXvMU1s2zLcm4W5w3s3iD5coChe3tGux/HdL7ORrr74NRi+m+ OuJq3Rwtu7Hhj1/pS7J42Fwwl5ooEgxUFvdPZjK5DB6qR3+tiaT2ZE662EYHeh86Sn +jsUla3Iad3wm8aZf27P8TbfFIVguo4e+9o3na2LzRuF6QQaLqkZRieKjCvk/rPF9+ hLPuHhmTUBYPDFQuHwWZZDXKn1PhUi8lV9JnmUd3jIAPlzZGZNryeH0PdaBjT0UTrt FWfbUsxBjiE0d3d7OrZUDDqk+HW8WL518MyGjASMKaL3svOtsbeQdkyrf0RkQMprTm 3rZdkL3qJl74Q==
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
From: Rahul Gupta <cxres@protonmail.com>
Message-ID: <f7EDWIT_xjtAhz4ewmkJa5DzoGViPAPbsgbzIDUt_byUTnNDh-pXzvTTlTJmm9b2_pde-e9Iv2QyqxhZ7Dhz2i0P5mi_iirBu3AGVTUpHhw=@protonmail.com>
In-Reply-To: <XtZDvT7rzZOaluCfsSU0Zi0wA6cu_bmORZds9PMYOdE8Z9MRq7ViNpQzgyaOsQkjPd5nOOEvtWHlkG9wv3n4rjXcTX9BKqRHtTCqTUB_nO4=@protonmail.com>
References: <XtZDvT7rzZOaluCfsSU0Zi0wA6cu_bmORZds9PMYOdE8Z9MRq7ViNpQzgyaOsQkjPd5nOOEvtWHlkG9wv3n4rjXcTX9BKqRHtTCqTUB_nO4=@protonmail.com>
Feedback-ID: 919445:user:proton
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha256"; boundary="------84bce197aca385d264eb5829fe6159f16e19ed8922bcce33214200fa717f5131"; charset="utf-8"
Received-SPF: pass client-ip=185.70.40.141; envelope-from=cxres@protonmail.com; helo=mail-40141.protonmail.ch
X-W3C-Hub-DKIM-Status: validation passed: (address=cxres@protonmail.com domain=protonmail.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-5.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1qb6ap-008O8K-QY e6831c575f16157dd44f117ae5dd48b9
X-Original-To: ietf-http-wg@w3.org
Subject: Fw: Proposal for Per Resource Events Protocol
Archived-At: <https://www.w3.org/mid/f7EDWIT_xjtAhz4ewmkJa5DzoGViPAPbsgbzIDUt_byUTnNDh-pXzvTTlTJmm9b2_pde-e9Iv2QyqxhZ7Dhz2i0P5mi_iirBu3AGVTUpHhw=@protonmail.com>

To the IETF HTTP WG,


I am forwarding my proposal for the Per Resource Events Protocol <https://cxres.github.io/per-resource-events/protocol> made to the Dispatch WG in early August on the advice of Francesca Palombini.


In the time since I have published this proposal, I was contacted by Michael Toomim on the Dispatch mailing list, who has made a very similar proposal as part of the Braid Protocol (which is already in the consideration of HTTP WG). The primary difference between our proposals is that PREP (which is concerned only with notifications) is more general, in that it supports any message format for notifications, whereas Braid is more specific to communicating merge patches for state synchronization (which is the larger concern of the Braid Protocol). This gives me confidence that the proposal here is a step in the right direction.

I look forward to your feedback and seek your help in carrying this work forward.

Best Regards,
Rahul

------- Forwarded Message -------
From: Rahul Gupta <cxres@protonmail.com>
Date: On Monday, August 7th, 2023 at 8:03 AM
Subject: Proposal for Per Resource Events Protocol
To: dispatch@ietf.org <dispatch@ietf.org>


> To the IETF Dispatch WG,
> I would like to propose Per Resource Events <https://cxres.github.io/per-resource-events/protocol> as a protocol for standardization at IETF. The Per Resource Events Protocol (PREP), as the names suggests, allows a server to add notification capability to any resource to provide updates about its own representation changes.
> 

> Caveats
> 

> + Since this work arose from my work at a W3C Community Group, the specification currently is a W3C format. I shall convert it to an RFC format if IETF will consider this proposal.
> 

> + While I have motivated the design of the protocol in the specification document, I shall repeat some of it here to keep this message self-contained.
> 

> + Also, this is my first proposal at IETF and first time I am officially proposing a specification to any standards body, so I apologize in advance if I have not addressed the expected considerations.
> 

> 

> Background
> 

> This specification has come about as an offshoot of my contribution as a co-author on the Solid Notification Protocol (SNP) <https:/github.com/solid/notifications> which is part of the Solid Project.
> 

> The Solid (Social Linked Data) is a web decentralization project led by Tim Berners-Lee which aims to allow users to keep control over their own data by (amongst other things) storing data in Personal Online Data Store (PODS). Solid Notification Protocol (SNP) is intended to add notification capabilities to Solid PODS over multiple messaging protocols (WebSockets, WebHooks, HTTP Streaming etc), though SNP is universal in that it can be used by any HTTP server to provide notifications.
> 

> Per Resource Events, similarly, is intended to add Notification capabilities to Solid PODS though again can be used by any HTTP server. PREP is a much simpler protocol built only using HTTP intended to make notifications significantly easier to implement and scale in most common scenarios.
> 

> 

> Motivation
> 

> The Per Resource Event Protocol is predicated on a HTTP resource being the most intuitive source for notifications about its own updates.
> 

> This is unlike other notification protocols (e.g. WebSockets, WebSub, HTTP Push, SSE etc) that require additional resources to be specifically dedicated as endpoints for delivering notifications. Servers that provide updates are forced to maintain these additional endpoints and process changes to subject resources to dispatch as events. Clients that consume these updates have to discover these end points and then co-ordinate changes between the endpoint and (typically multiple) resources of interest.
> 

> By instead giving every resource the ability to send notifications when it updates, the Per Resource Event Protocol aims to reduce the complexity of both servers and clients implementing notifications; thus, making it easier for developers to build and maintain real-time applications.
> 

> 

> 

> How it works
> 

> When using PREP, a user agent desiring notification simply sends a GET request with an additional "Accept-Events" header.
> If the resource is capable of and allowed to send notifications, the user agent receives these notifications as a multipart (RFC2046) response on an open-ended HTTP stream (for a fixed period or until the resource is deleted).
> 

> 

> 

> Interest
> 

> While there are no implementations of PREP yet, there has already been a publicly expressed interest in implementing it by a commercial Solid PODS vendor (I have uploaded the first draft on GitHub only in late June). There have also been a couple of private queries for implementing for client applications, including one by a Solid “Creator”.
> 

> 

> 

> Limitations
> 

> Mark Nottingham correctly points out on his blog <https://www.mnot.net/blog/2022/02/20/websockets> that HTTP based pub/sub protocols have not fulfilled their potential due to connections limits in HTTP/1.1 and head-of-line blocking in HTTP/2. The current proposal is intended to establish backwards compatibility for notifications sent per resource. It is my intention to subsequently introduce PREP-2 (maybe PREP-3) that that advantage of HTTP/2 and HTTP/3 (but are not backwards compatible with HTTP/1.1) to provide more efficient notifications sans the aforementioned limitations. This consideration is already reflected in the current proposal; for example, the "Accept-Events" header is designed to be generic and can be used to negotiate the protocol used for notifications.
> 

> 

> 

> 

> Thank you for your kind consideration,
> 

> 

> Yours truly,
> Rahul
>