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

Michael Toomim <toomim@gmail.com> Fri, 25 October 2019 20:14 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 8186212003E for <dispatch@ietfa.amsl.com>; Fri, 25 Oct 2019 13:14:33 -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 2GDU68fevIwp for <dispatch@ietfa.amsl.com>; Fri, 25 Oct 2019 13:14:31 -0700 (PDT)
Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (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 8365712004F for <dispatch@ietf.org>; Fri, 25 Oct 2019 13:14:31 -0700 (PDT)
Received: by mail-pg1-x529.google.com with SMTP id l3so2234190pgr.8 for <dispatch@ietf.org>; Fri, 25 Oct 2019 13:14:31 -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=Fr1GfyDoKzQYIKep43RLR4o8AJWncbR/hf7xlnhUD+4=; b=KNq4YoeeloDzxGOePDiA5v8oSEsnP+wCNpV0Jtwg77x18V6DS5U+H17TcVWcZT4zCt QKaPrYBInegrxHOiqDA1vVWGW/lgXwj8BrI0cVXNin8isk7bR7e6EtYPl1MuQf4VX9g5 TMN1nUDei8f1SJ6/wwVf82hCPuOkox9cGApoEhxkNhgd+HJW5X4JZEdbtiDn9CEPXBkJ UOdIjm7z62DVJ5nwBIP3rLuGQUKjXc7Bj9RNHH6g7IwRMSZd2aavR8qu7C0zIiX+taz8 1GLOJJu6M/hfDbsGQylTg2QZSxrndJirPFNZ98uuWY9PqPU4z3n0MB4ixTfYPMq1APJY s12g==
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=Fr1GfyDoKzQYIKep43RLR4o8AJWncbR/hf7xlnhUD+4=; b=FDZez01xvJwDX5s3FI6nZ2nBVvFxdM3KjXVpapSVpAM0NG3PVXG4yonuYBC83Ow5WK tkFG0JFwcx4uyU9RDXHTiLvpAF/JpINnf9u2zycuo9ySL1cK3SCy9L5asXmROeu2zrNT XQgQAud+DCHr3DdazETS7QGWF0VfpSOOfr+Y+laxIrx+zRU3VPjjiTXBHD2zeYd7131b PKe2a7Q9f8vfoGlzRBwxe8Kv++LGW3ovhTNKaUI03PrR/PrL3pauaoQWGWz6nOzLTnWa bbvX8dG4xWj+dXNnGj0jqb+RfTTb2gcd7nTkX+Uv01DAl3dTqlCjsZFbXwMk69mzPM9Q /GrQ==
X-Gm-Message-State: APjAAAUQt+FvLV5Sz8VdoWbb5z38Q7ufusmwUhWOdEfMox60QUCbqEcw JIu1Q43s+PJnNptPlnCNDdU=
X-Google-Smtp-Source: APXvYqzA7CpTbQAHB8eGbqfKzI9+qAdwoqCrZrT+9CcMVZsgVeuOQSUHVRQv4PdTKPRaYoZOqtNI1g==
X-Received: by 2002:a17:90a:9406:: with SMTP id r6mr6767525pjo.0.1572034470854; Fri, 25 Oct 2019 13:14:30 -0700 (PDT)
Received: from [172.16.103.49] (c-71-202-89-74.hsd1.ca.comcast.net. [71.202.89.74]) by smtp.gmail.com with ESMTPSA id 2sm2971153pfo.91.2019.10.25.13.14.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Oct 2019 13:14:29 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail=_8B5329E3-D79E-42B6-9F1A-CD650A960E06"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Michael Toomim <toomim@gmail.com>
In-Reply-To: <00358631-a34d-45db-bf87-44709972387b@beta.fastmail.com>
Date: Fri, 25 Oct 2019 13:14:21 -0700
Cc: dispatch@ietf.org, Braid <braid-http@googlegroups.com>
Message-Id: <1C9B1121-B20E-479E-B596-C04A416B5EE1@gmail.com>
References: <290514e7-79ce-4852-bf05-a684e2e8d045@beta.fastmail.com> <DFC3797D-DA12-4470-9CBE-D7BD981DB6CE@gmail.com> <00358631-a34d-45db-bf87-44709972387b@beta.fastmail.com>
To: Bron Gondwana <brong@fastmailteam.com>
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/pua-yy3ErwTAYOOQ37ygOYI_HbI>
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: Fri, 25 Oct 2019 20:14:33 -0000

Bron Gondwana:
> It looks like the conversation went a long way down this path, which by my reading is "ask the server to maintain a long running connection and keep pushing updates down it" which is a slightly different use-case from the push proposals I was making, which are:
> 
> Client establishes a relationship with a third party push server (potentially via some platform specific, highly efficient protocol - e.g. APNs <https://en.wikipedia.org/wiki/Apple_Push_Notification_service> or GCM <https://en.wikipedia.org/wiki/Google_Cloud_Messaging>)
> Client requests server inform the third party push server when there are changes.
> Third party push server passes details down to client, which can then request updates from the server without having to hold a connection open or poll.
> 
> This is a general pattern which 1st party clients frequently use (including ours at Fastmail) but which doesn't have a general solution, so my impression of the work required there is defining a standard for how to request the server make that push to a third party, and what gets included in that push.
> 
> This other work of having the server hold a connection open is also interesting and potentially useful, it's just not exactly what I was suggesting!

Hi Bron, thank you for articulating this distinction, it gave me a bunch to chew on!

However, after some thought, I don't think we are actually that far off. Consider that JMAP supports both of these methods: you can subscribe to a stream of updates via a long-running GET request (section 7.3 <https://tools.ietf.org/html/rfc8620#section-7.3>) or via a third-party server (section 7.2 <https://tools.ietf.org/html/rfc8620#section-7.2>). Braid should eventually support both as well.

The choice between whether you want to use a long-running TCP connection vs. a third-party server mostly comes down to whether you're a cell phone— it saves radio power if you don't have to maintain a TCP connection to each data source you care about. But if you're a server, or you're a cell phone that is already online, it's better to connect directly.

Now, we could certainly go about defining separate web push standards for these two cases. But I think there's a good case to be made for putting them together in a single standard, with a single API for programmers to use.

I think we can gain a lot by putting this standard into basic HTTP, rather than building layers on top. By adding Synchronization to HTTP, we get the functionality of Web Push, but it can be implemented automatically, for all resources, without any extra effort from the programmer. The whole web has changed in the last 20 years— from static pages to dynamic data —and it's time we upgrade the protocol at a deep level. Getting a notification of a message on your phone shouldn't be any different from getting the actual message in the app.