Re: [dispatch] Potential incoming work: web push for IMAP, CalDAV and CardDAV

Michael Toomim <toomim@gmail.com> Thu, 24 October 2019 19:40 UTC

Return-Path: <toomim@gmail.com>
X-Original-To: dispatch@ietfa.amsl.com
Delivered-To: dispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 16E77120071 for <dispatch@ietfa.amsl.com>; Thu, 24 Oct 2019 12:40:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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, 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 u22gR2Q5uJ2q for <dispatch@ietfa.amsl.com>; Thu, 24 Oct 2019 12:40:04 -0700 (PDT)
Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BD047120020 for <dispatch@ietf.org>; Thu, 24 Oct 2019 12:40:04 -0700 (PDT)
Received: by mail-pf1-x42e.google.com with SMTP id x28so2301848pfi.12 for <dispatch@ietf.org>; Thu, 24 Oct 2019 12:40:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=M3JtA+E816R1ct92aXoxxMc0D+VnvO+HKNFuMFgzsYc=; b=Fv4Xi6iFn6pB9KxtahuhwyO5A49oqlQXPUyR/2cPFtNp5BoLBhuz6Vwwf+CoD8HtyU VMk+aJev1V47NL9KjXN8LEgPMaFQdM9a7SFcsLN4RhDpMTXmVy0zKqAtZNm53P9VyWzV FPh7dYetzDAtysEDYP4+m1kVFQizf+NFYHTh+rd5RmD0Ttw9hY2UewSLLL6Aa95ebQzL nMmLwlUanAB0WgrTFIsJDugQHbuRfh5HRsFvSm0F2+L9m2m70aQVhOxi/4PSHdUy5oaV 1jc0/8Tplqo5gdkoOYuf1ysBhqGHNzat8yyQXZVj4gjOYqb3xzzOvd4sjStb1o7AOHni vDNA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=M3JtA+E816R1ct92aXoxxMc0D+VnvO+HKNFuMFgzsYc=; b=J3AaJiGiXiAP9mGKXPNfiKN5wI0LicgT758fnywJZ8cDRZ7x1zHVciCDuxs6COv5o/ cTmuExAx+W9sr8lNgipCqCJjSOYvRN/L/u/sjVK8VJnyeSyK1P0QtJ2VpIQ0Lq8iDIbg GiW6KGBXEm7oBcJZCL1edBinuYeZPcTgFA9jQxBwqmXy3gfRBebXzKLNs6/1Y3ApcmFw KduPv2AXb7yjzBXhfCQMILTQwOAfwrFOIDmu9P9eJF4a4+we9LsrS6Lkw6RzTNw8U0H6 qxjA9M2nzYThY317AlGars/Qb6GRmhZr3oOa7+fE9Y7B01lcFLwoNssZEm0YSYq1BJpS Gh4Q==
X-Gm-Message-State: APjAAAX5jqqlDef/37K4IOpcf/g/9F7Ztz7/FQN0tkph+VyCzJYQlEFp mKr7reGMf3FNPeHpRFYBYPw=
X-Google-Smtp-Source: APXvYqxS5ZyDt5OY0H4Ubm3pWwkqxlhzf/AMiYrRpa92OG193DwPNgF/li6chnevAzXuWqX+CYVFaw==
X-Received: by 2002:a62:1951:: with SMTP id 78mr4021576pfz.257.1571946004140; Thu, 24 Oct 2019 12:40:04 -0700 (PDT)
Received: from [192.168.42.3] (135-180-2-130.static.sonic.net. [135.180.2.130]) by smtp.gmail.com with ESMTPSA id a24sm10496304pgd.93.2019.10.24.12.40.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Oct 2019 12:40:03 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail=_2F1C2286-1437-49B8-AD29-FD3C535A2531"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Michael Toomim <toomim@gmail.com>
In-Reply-To: <CAFXT-puGJHftEujXPVKT0XyHFY+W-EjydbJ1Gz40nU90EFPc8Q@mail.gmail.com>
Date: Thu, 24 Oct 2019 12:40:03 -0700
Cc: Julian Reschke <julian.reschke@gmx.de>, dispatch@ietf.org, greg little <glittle@gmail.com>, Braid <braid-http@googlegroups.com>, Rafie Walker <slickytail.mc@gmail.com>, Seph Gentle <me@josephg.com>, Bryn Bellomy <bryn.bellomy@gmail.com>
Message-Id: <F65EA44F-9777-45F2-A088-863734DA606B@gmail.com>
References: <290514e7-79ce-4852-bf05-a684e2e8d045@beta.fastmail.com> <DFC3797D-DA12-4470-9CBE-D7BD981DB6CE@gmail.com> <839ea4e5-db2d-8220-6058-93869a29c185@gmx.de> <82F33D05-D8BC-4F69-A198-677773F3427C@gmail.com> <11cabf2e-1550-53e5-60dd-7d1bdf65805a@gmx.de> <B1A18B63-B78A-4AE5-A164-A9CE0B13D326@gmail.com> <450f4113-7cdb-f65e-761d-9023e3d625bd@gmx.de> <CEECFFAD-ECAA-41FF-8817-4090DF694B27@gmail.com> <a89ee52b-306b-60ca-35a6-e912c2a2eb82@gmx.de> <34B388A2-50A7-4344-98B6-0D8B08E1277F@gmail.com> <cb2a76b8-90ae-ada1-5a9a-835bb812ccff@gmx.de> <086C29B2-00BC-403B-8080-1AAE3A99D382@gmail.com> <CAFXT-puGJHftEujXPVKT0XyHFY+W-EjydbJ1Gz40nU90EFPc8Q@mail.gmail.com>
To: Ranjit Avasarala <ranjitkav12@gmail.com>
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/Iui8GQdtbqDZe9fSdlupPTewegQ>
Subject: Re: [dispatch] Potential incoming work: web push for IMAP, CalDAV and CardDAV
X-BeenThere: dispatch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DISPATCH Working Group Mail List <dispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dispatch>, <mailto:dispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dispatch/>
List-Post: <mailto:dispatch@ietf.org>
List-Help: <mailto:dispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dispatch>, <mailto:dispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Oct 2019 19:40:08 -0000

Ranjit:
> why can't we use WebSockets which is based on HTTP and helps keep session active? 

Thank you for the question. We certainly could use a WebSocket, and in fact, the previous version of the spec <https://tools.ietf.org/html/draft-toomim-braid-00> did use a WebSocket as transport! The question is why you'd prefer to use a WebSocket as the underlying transport, rather than a multipart-body GET request. Since we still want all the great things from HTTP— caching, URLs, idempotency, content-types, etc. —we'd either have to implement all the existing HTTP methods on top of a WebSocket, or add these new subscription features on top of HTTP. In the end, it seems to be simpler and more elegant to do the latter.

Also, the introduction mentions WebSockets—did it address your question adequately? Or is there something we should add to this:

1.  Introduction

  When a client GETs a resource over HTTP, the server provides the
  latest version, but does *not* provide updates when the resource
  changes.  This means that programmers have to implement workarounds
  whenever they need to synchronize with data that changes.

  The web originally required users to click reload when a page changed.
  In the year 2000, XMLHTTPRequest made it possible to update just part
  of a page, running a GET request behind the scenes.  But the GET
  request still could not push updates.  To work around this, web
  programmers would poll the resource, which was inefficient.
  Long-polling was invented to overcome the inefficiencies, which was
  standardized as SSE.  But SSE provides semantics of an *event-stream*,
  and although a programmer can encode a protocol within the event
  stream for updating a resource, there is still no standard way to
  update a resource.  In practice, programmers today often give up on
  using a standard semantic for "data that changes", and instead write
  their own idiosyncratic update protocol over a WebSocket, or adopt a
  web framework that does this for them.

  However, we can add support for "state that changes" into HTTP with a
  few small extensions.  Doing so transforms HTTP from a *state
  transfer* protocol into a *state synchronization* protocol, and
  extends the REST architecture into RESS: REpresentational State
  Synchronization.
https://raw.githubusercontent.com/braid-work/braid-spec/master/draft-xx-httpbis-braid-00.txt <https://raw.githubusercontent.com/braid-work/braid-spec/master/draft-xx-httpbis-braid-00.txt>
But let me say that some things actually are more elegant to implement with a WebSocket. Specifically, we are finding the request/response model of HTTP to be getting in the way. After this spec is complete, I expect us to propose a generalization of request/response that can run peer-to-peer over a QUIC channel, in which either peer can initiate or respond to GET and PUT requests, and both peers will ACK changes in state symmetrically. We sketched this in Section 4.2 of the the previous spec <https://tools.ietf.org/html/draft-toomim-braid-00#section-4.2>. It makes the protocol both simpler and more capable.

Thank you, Ranjit!