Re: Fw: Proposal for Per Resource Events Protocol

Rahul Gupta <cxres@protonmail.com> Sun, 22 October 2023 06:18 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=ietf.org@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 782F8C13AE26 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 21 Oct 2023 23:18:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.055
X-Spam-Level:
X-Spam-Status: No, score=-5.055 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=protonmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y3oPFu5n8sWi for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 21 Oct 2023 23:18:37 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D0432C1705E9 for <httpbisa-archive-bis2Juki@ietf.org>; Sat, 21 Oct 2023 23:18:36 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1quRk1-00Aesw-94 for ietf-http-wg-dist@listhub.w3.org; Sun, 22 Oct 2023 06:15:13 +0000
Resent-Date: Sun, 22 Oct 2023 06:15:13 +0000
Resent-Message-Id: <E1quRk1-00Aesw-94@lyra.w3.org>
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 1quRjz-00Aeru-7B for ietf-http-wg@listhub.w3.org; Sun, 22 Oct 2023 06:15:11 +0000
Received: from mail-4318.protonmail.ch ([185.70.43.18]) 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 1quRjw-00EDuP-Sn for ietf-http-wg@w3.org; Sun, 22 Oct 2023 06:15:10 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1697955302; x=1698214502; bh=Md185Qxn8ZFHrvG/HK6LyHfxf/eOnHIdbkqAR9nREeU=; 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=M1mM5jjlN6318Oe10PFss+cTL5XGvpI9rWFxjmLHpbOEhYsy09Nd+OacvpctY6AXW JDXj+X+ejrorYGxM5LSoer1pK1ZCOrr17WFudkQrzJWaEdEG9H3s8p6Wna+xk6NOe7 pdofd5BuE4Y6bEurMbCuMSNDrk+H/PhfBMBQTcedrePYTg9Q9vs9Jxjx33If2c2NEk sxL0PglrD6t+mzbtZwdUEetSszoeJHWcOX5ljL4lotptlqLx3E12S4g99zaTArhkUP 9oowsgKe3tQFwzsrPjGx9222wyq2iokiwunv3yyJlufuimczKbIQzW8uBvbeau7jYu XRN8O0QhORYbA==
Date: Sun, 22 Oct 2023 06:14:53 +0000
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
From: Rahul Gupta <cxres@protonmail.com>
Message-ID: <oNpD1w2Wiay1do3wqgQWehgs2cUOTMgCJzjqPHKzX-wGuABKIi8_M8Rbi_xR27OyA_JLFY7HrUpo0qoM3WHx0lnWeBibnNVJM35oZO0iQH8=@protonmail.com>
In-Reply-To: <f7EDWIT_xjtAhz4ewmkJa5DzoGViPAPbsgbzIDUt_byUTnNDh-pXzvTTlTJmm9b2_pde-e9Iv2QyqxhZ7Dhz2i0P5mi_iirBu3AGVTUpHhw=@protonmail.com>
References: <XtZDvT7rzZOaluCfsSU0Zi0wA6cu_bmORZds9PMYOdE8Z9MRq7ViNpQzgyaOsQkjPd5nOOEvtWHlkG9wv3n4rjXcTX9BKqRHtTCqTUB_nO4=@protonmail.com> <f7EDWIT_xjtAhz4ewmkJa5DzoGViPAPbsgbzIDUt_byUTnNDh-pXzvTTlTJmm9b2_pde-e9Iv2QyqxhZ7Dhz2i0P5mi_iirBu3AGVTUpHhw=@protonmail.com>
Feedback-ID: 919445:user:proton
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha256"; boundary="------d9600c89aaf21797d8e3560e9afb32753a0cc4590d5a60f268c53299484d3846"; charset="utf-8"
Received-SPF: pass client-ip=185.70.43.18; envelope-from=cxres@protonmail.com; helo=mail-4318.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=-9.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_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1quRjw-00EDuP-Sn cda7fcfe6f8007cf295b24c666bf3301
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Fw: Proposal for Per Resource Events Protocol
Archived-At: <https://www.w3.org/mid/oNpD1w2Wiay1do3wqgQWehgs2cUOTMgCJzjqPHKzX-wGuABKIi8_M8Rbi_xR27OyA_JLFY7HrUpo0qoM3WHx0lnWeBibnNVJM35oZO0iQH8=@protonmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51508
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

I have submitted my proposal for the Per Resource Events  <https://github.com/CxRes/prep> Protocol as an Internet-Draft https://datatracker.ietf.org/doc/draft-gupta-httpbis-per-resource-events/
(in the nick of time for IETF118).

Feedback welcome...

Kindly include it in the agenda for IETF118. 

Best Regards,
Rahul
------- Original Message -------
On Wednesday, August 30th, 2023 at 03:19, Rahul Gupta <cxres@protonmail.com> wrote:


> 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
> >