Re: Mnot's Pub/Sub for the Web

Kevin Marks <kevinmarks@gmail.com> Tue, 22 February 2022 22:52 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 158883A0997 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 22 Feb 2022 14:52:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.747
X-Spam-Level:
X-Spam-Status: No, score=-2.747 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.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 951W-E2AOlbo for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 22 Feb 2022 14:52:28 -0800 (PST)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2A9EA3A0994 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 22 Feb 2022 14:52:27 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1nMdyr-0006hH-HM for ietf-http-wg-dist@listhub.w3.org; Tue, 22 Feb 2022 22:50:01 +0000
Resent-Date: Tue, 22 Feb 2022 22:50:01 +0000
Resent-Message-Id: <E1nMdyr-0006hH-HM@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <kevinmarks@gmail.com>) id 1nMdyp-0006gH-Lf for ietf-http-wg@listhub.w3.org; Tue, 22 Feb 2022 22:49:59 +0000
Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <kevinmarks@gmail.com>) id 1nMdym-0002yu-Im for ietf-http-wg@w3.org; Tue, 22 Feb 2022 22:49:59 +0000
Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-2d07ae0b1c4so191849187b3.11 for <ietf-http-wg@w3.org>; Tue, 22 Feb 2022 14:49:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AORaJXzoQad6HHlpzJXBGQrv/mLLYR5Ex/YePGwMbpk=; b=iZTgK8HLkCK3gHvZ6f3G0v5rNo+gvB9rhrjb1l7wlNGvySPUwcNSoHQyYtIN8jBbVr oUVLc4FKVb897OmnuCwUQsv1sT7Hnz56nrL2oa1T+2gbsgW3HQ1TE9Ym8y7mnlhvEvzf UoaTL9TABT5VQZXLXGDhI9aBA18lZAbRbX3sWe8JTmBfu6KxwZnbmrk8dIf00Oc3dgKU +oLEKHJklYhevyMPoE4SE0SXmtZyYNTEkJsOVHc0vhmKtFbkL7IohfE7UwsgULmq/ULR GztKB68kU3jDYhXCZMD7+Sso4JYETLoU/zD5000CFtj2y6K+5LMQ+UgJyXpcGO2MQTvS +71Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AORaJXzoQad6HHlpzJXBGQrv/mLLYR5Ex/YePGwMbpk=; b=S1YS+FwGZTNbgT+650jLlyV1Nl7m2Fo6ii5F7zMpB1YSG7GiEjA5vrh6XkaW93TkRq JS5jy7WM5kESaUA/Jf2wk8LNFSwPLSxL6VnoH+RPi8piaehLh01YiCK30Bv1/6bNwGSq Ck+72d1UpywAaSYIN/J0bDA/QnXZvGBMC8dxYJrBhG9BSR2dezaoIOlGXbFBtTeVET0f rVtbkV25AMjZOxUVh7AW8Fxft6N1zKK5j5NvkwRpsiJJuVBX0+dFWwIgcxFt4vY5Yd36 wIKbNoLLU0vbVW9yPtQ2iPG1Zory+cED9RLqmhvOwhd13VJ9/JAWk060nJJmWMi0nR+5 dGAA==
X-Gm-Message-State: AOAM530Clin69AR2sWmeDg2jywx+KdZ+Kq0TIfiidaEJ4/Cl/cl+/3Mp +2ABisSQ4LIek1cwfu83iiO3TBkq1z3QaaI1h7U=
X-Google-Smtp-Source: ABdhPJxXhzLBXfu3pVplfxmoUu2lJ5DQss1Ja6vRYBB/FuSdHqTJs7Z94a7yAp6zhrh17ckK/8IvubBLPApOvqzD88s=
X-Received: by 2002:a81:7094:0:b0:2d1:9e5:1288 with SMTP id l142-20020a817094000000b002d109e51288mr26023899ywc.283.1645570185542; Tue, 22 Feb 2022 14:49:45 -0800 (PST)
MIME-Version: 1.0
References: <8a75a96a-286d-9260-498f-0b7dd8260156@gmail.com> <CADU7aos5T=hhPvtDz1aUAQ8PrZtFYwGVPp40se+yP=i2hFbZ0Q@mail.gmail.com> <PH0PR22MB3102FCEEB29C1084899DBC6DDA3B9@PH0PR22MB3102.namprd22.prod.outlook.com>
In-Reply-To: <PH0PR22MB3102FCEEB29C1084899DBC6DDA3B9@PH0PR22MB3102.namprd22.prod.outlook.com>
From: Kevin Marks <kevinmarks@gmail.com>
Date: Tue, 22 Feb 2022 22:49:34 +0000
Message-ID: <CAD6ztsoEG4G6G5OBrJYZDZoJezckO_du0Ai=Q9Pxe3imEaDW+Q@mail.gmail.com>
To: Mike Bishop <mbishop@evequefou.be>
Cc: Kévin Dunglas <kevin@dunglas.fr>, Michael Toomim <toomim@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>, Mark Nottingham <mnot@mnot.net>
Content-Type: multipart/alternative; boundary="0000000000005cc10405d8a32a41"
Received-SPF: pass client-ip=2607:f8b0:4864:20::112e; envelope-from=kevinmarks@gmail.com; helo=mail-yw1-x112e.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=kevinmarks@gmail.com domain=gmail.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-6.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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1nMdym-0002yu-Im dd327dd007a5aa8988afb7932be95f2d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Mnot's Pub/Sub for the Web
Archived-At: <https://www.w3.org/mid/CAD6ztsoEG4G6G5OBrJYZDZoJezckO_du0Ai=Q9Pxe3imEaDW+Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/39850
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/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Does WebSub (formerly PubSubHubbub) fit this case?

On Tue, 22 Feb 2022, 9:25 pm Mike Bishop, <mbishop@evequefou.be> wrote:

> This is a very interesting space, and I’m glad we have two such solid
> contenders.  I’m not convinced this fits squarely within HTTP’s mandate, as
> this seems more like a protocol on top of HTTP than a pure extension to
> HTTP.  Perhaps like OHAI, there might be enough interest to warrant a
> dedicated working group?
>
>
>
> *From:* Kévin Dunglas <kevin@dunglas.fr>
> *Sent:* Tuesday, February 22, 2022 12:56 PM
> *To:* Michael Toomim <toomim@gmail.com>
> *Cc:* HTTP Working Group <ietf-http-wg@w3.org>; Mark Nottingham <
> mnot@mnot.net>
> *Subject:* Re: Mnot's Pub/Sub for the Web
>
>
>
> Thanks for bringing this topic to the list again!
>
>
>
> On the Mercure side, the spec has stabilized. Several open-source and
> proprietary implementations are available (
> https://mercure.rocks/spec#implementation-status), and adoption is
> growing: 2.7K stars on GitHub, dozens of open source projects using it,
> large companies publicly declaring use...
>
>
>
> Many new use cases have been reported on the bug tracker over the years,
> and we improved the spec to cover most of them. Some minor issues still
> need to be handled (https://github.com/dunglas/mercure/labels/spec), but
> we're very soon to publish the final version of the specification.
>
>
>
> As demonstrated by the discussions on Hacker News, Mark's great article,
> and by the adoption of Mercure, the community is in demand of a pub/sub
> standard for web resources.
>
>
>
> Even if most discussions occurred on GitHub, Slack, Twitter, and other
> channels instead of on IETF mailing lists, the Mercure spec is now
> implemented by production-grade "running code" and has reached "rough
> consensus".
>
>
>
> Mercure is less ambitious than Braid. Its scope is more limited. It is
> focusing on providing a simple pub/sub protocol for web content proved
> working with the current web infrastructure (web browsers, proxies,,
> firewalls, etc). In its current state, it doesn't require any JS library or
> polyfill client-side.
>
>
>
> The spec is very similar to the WebSub specification from the W3C, but
> mainly targets web browsers instead of servers. As WebSub, Mercure uses a
> hub to distribute web resources, which allows implementing the protocol
> easily even in legacy applications, with languages not designed to handle
> long-living connections (e.g. PHP), and when using modern infrastructure
> such as serverless and edge computing platforms (
> https://dunglas.fr/2019/07/mercure-real-time-apis-for-serverless-and-beyond/).
> Unlike WebSub, Mercure natively supports authorization, end-to-end
> encryption, and state reconciliation. Both clients and servers can be
> publishers.
>
>
>
> Currently, Mercure only allows using SSE as transport, but we'll maybe
> allow using other transports such as WebSockets and Web Transports,
> probably as extensions to the current spec, to cover use case such as
> transmitting non-base64-encoded binary data (
> https://github.com/dunglas/mercure/issues/616).
>
>
>
> Braid is very interesting and has a much broader scope (state
> synchronization, P2P, etc). It also requires more changes to the current
> software stack to be natively supported by the web platform. Mercure
> overlaps only with the "subscribe" feature of Braid, and I've the feeling
> than Braid could use Mercure (and probably WebSub too) for its subscribe
> feature, at least in a first iteration.
>
>
>
> I wonder how we can move forward regarding the standardization of a
> pub/sub protocol for web content and web browsers. Even if Mercure gained
> traction outside of the IETF, it hasn't on this group. I was thinking about
> proposing the final version of the spec as an independent-track RFC, or to
> the W3C as it is very close to WebSub, and is also related to the other
> specs published by the Social Web Working Group (ActivityPub, and even
> Solid). But as the this topic is discussed again, maybe could we work on a
> pub/sub protocol here?
>
>
>
>
>
>
>
> On Sun, Feb 20, 2022 at 10:39 AM Michael Toomim <toomim@gmail.com> wrote:
>
> Hello, HTTP!
>
> Today Mark Nottingham posted a great articulation of the issues
> programmers face when choosing between using SSE, WebSockets, and
> WebTransports:
>
> https://www.mnot.net/blog/2022/02/20/websockets
>
> I'll attempt to summarize Mark's beautiful insight as: in almost all
> cases, what the programmer *really* wants is a Pub/Sub protocol, not an
> arbitrary socket. And we could standardize a Pub/Sub protocol, and that
> would have great benefits.
>
> These benefits are real and I think could improve performance
> dramatically. CDNs could cache realtime updates, not just static data.
>
> However, I'll take Mnot one further, and propose that when a programmer is
> choosing a Pub/Sub protocol, what he *really* wants is a State
> Synchronization protocol, not an arbitrary Pub/Sub protocol.
>
> He wants to Subscribe specifically to *state updates*. He wants to Publish
> specifically *updates to state*.
>
> What we need is not a general Pub/Sub standard, but specifically a State
> Synchronization standard. State Synchronization is a constrained type of
> general Pub/Sub. And we'll need to constrain Pub/Sub in this way to address
> some of the issues Mark brings up, such as:
>
> > There are also some architectural/philosophical concerns about how
> non-final responses **relate to the state of the resource**.
>
> The relationship between a server's "responses" and the "state of the
> resource" is what a State Synchronization protocol defines. And, in fact,
> we have two proposed solutions to State Synchronization in the IETF!
>
> Braid:
> https://datatracker.ietf.org/doc/html/draft-toomim-httpbis-braid-http
> Mercure:    https://datatracker.ietf.org/doc/draft-dunglas-mercure/
>
> I am seeing a growing awareness that HTTP needs to add State
> Synchronization abilities, as well as excitement about the new fundamental
> power it gives programmers on the web.
>
> These protocols transform HTTP from a State *Transfer* into a State
> *Synchronization* protocol. Whereas a transfer protocol can move a resource
> from server to client in a single request/response, it requires an
> application programmer to take over if the resource ever changes after the
> response completes. That sucks for programmers. A synchronization protocol
> provides a much better programming abstraction. The programmer just says "I
> want state X", and can assume it will be kept up-to-date by the protocol.
>
> If we standardize this, we also get CDNs that automatically cache dynamic
> content (the stuff currently hidden within websockets), just as easily as
> they cache static content today. We get collaborative editing and offline
> modes available in web apps for free. We also take an important step
> towards decentralizing the web, by creating an open standard for the
> trickiest part of decentralized app development — data synchronization —
> that is compatible with P2P CRDT and OT algorithms.
>
> Since this all seems to be coming together, I would like to know what
> HTTPbis as a group thinks. Is there interest in this topic?
>
> If so, what aspects might we want to work on?
>
>