Re: Draft for Resumable Uploads

Austin Wright <aaa@bzfx.net> Tue, 05 April 2022 03:50 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 C0EF83A1EA0 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 4 Apr 2022 20:50:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.759
X-Spam-Level:
X-Spam-Status: No, score=-2.759 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.248, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=bzfx.net
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 Aahjnjo941mh for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 4 Apr 2022 20:49:58 -0700 (PDT)
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 0C26F3A1E9F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 4 Apr 2022 20:49:55 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1nbaAB-0001rM-Tw for ietf-http-wg-dist@listhub.w3.org; Tue, 05 Apr 2022 03:47:27 +0000
Resent-Date: Tue, 05 Apr 2022 03:47:27 +0000
Resent-Message-Id: <E1nbaAB-0001rM-Tw@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 <aaa@bzfx.net>) id 1nbaA9-0001q3-UJ for ietf-http-wg@listhub.w3.org; Tue, 05 Apr 2022 03:47:25 +0000
Received: from mail-pf1-f177.google.com ([209.85.210.177]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <aaa@bzfx.net>) id 1nbaA7-0005E9-VM for ietf-http-wg@w3.org; Tue, 05 Apr 2022 03:47:25 +0000
Received: by mail-pf1-f177.google.com with SMTP id b15so10900321pfm.5 for <ietf-http-wg@w3.org>; Mon, 04 Apr 2022 20:47:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bzfx.net; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Ww2ybXhp2pb+uNCdoq+U2aLgS4fH/6xAqHed7wYjhsQ=; b=OrznN+/1g15SOYQYAm3jNVn3cyUgf0lO4NNRNCFxo5kO2Rv/rSfPcLrEFpQ4Asml5z MHtb18R1aIlekpl/+IifkoDlOhImoOgPx1WMZzlYNcoM0j7UGGNsEwVKwS/37FoHdvDI 1IEVdu5z0cCuTrIwccYSBKhou/Qdu5LokN10M=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Ww2ybXhp2pb+uNCdoq+U2aLgS4fH/6xAqHed7wYjhsQ=; b=YUVecZXAhhfNvlYX5oekbftcJMZcxf2JXHu/H2D0pterNDzPp3GvFpnhrn9ybdVx11 gI0zy2B2K+EnDj8Orvp1MHoih9rs3S1zNttI3oNHsNbZqj9vCsGbA6QKsvQnn3lArQwO jGJuQDtr1uqeceQCtBsan3c37BG4yO6dUsZdfUSV5pFoj2672ndDLO3aNUt3M/+Kkrk5 +u23XmLW+jEaJhD2om1DNIwPAEmuKcuoBYTKezQuzouu2IpyldfBu1ZtEG8PjHOjGNJe rFIj6tcsFL/gA0n79BxHs2f15GrwUwXqB1Q2VVmoHLDVDhhNLf3ayz16yVZQ3mPOyNmK hwrw==
X-Gm-Message-State: AOAM533FslSDvMM9Cr5S+RfJIlYlsTZ4LOGTgKthYoyyOw60ON6FEkC2 y75Iu9zhErL2cD6GMgxHB3XisA==
X-Google-Smtp-Source: ABdhPJzwHWWaf6/yF6Yu3e8vvdPoqH88Eu3Kq1QrjCyhpfnB++kalxm9conh7h6QMwj9Rci5POxqeA==
X-Received: by 2002:a62:5343:0:b0:4f7:baad:5c22 with SMTP id h64-20020a625343000000b004f7baad5c22mr1467833pfb.30.1649130100642; Mon, 04 Apr 2022 20:41:40 -0700 (PDT)
Received: from smtpclient.apple (174-17-141-74.phnx.qwest.net. [174.17.141.74]) by smtp.gmail.com with ESMTPSA id g3-20020a17090a708300b001c7e8ae7637sm534251pjk.8.2022.04.04.20.41.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Apr 2022 20:41:39 -0700 (PDT)
From: Austin Wright <aaa@bzfx.net>
Message-Id: <43E868F0-457C-4BFB-A8D8-AAF84A06C3C3@bzfx.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_A5FEF021-95A9-4BDF-BB04-E64D8F38D30D"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\))
Date: Mon, 04 Apr 2022 20:41:38 -0700
In-Reply-To: <CANY19NvMcPQaHRamFe-yy-E38xKo2XrmFCKVRoPbyBMQhoY6vA@mail.gmail.com>
Cc: ietf-http-wg <ietf-http-wg@w3.org>
To: Marius Kleidl <marius@transloadit.com>
References: <CANY19NvMcPQaHRamFe-yy-E38xKo2XrmFCKVRoPbyBMQhoY6vA@mail.gmail.com>
X-Mailer: Apple Mail (2.3696.80.82.1.1)
Received-SPF: pass client-ip=209.85.210.177; envelope-from=aaa@bzfx.net; helo=mail-pf1-f177.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=aaa@bzfx.net domain=bzfx.net), 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 1nbaA7-0005E9-VM b385bd5ef4970b832c7ae58ed9c10920
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Draft for Resumable Uploads
Archived-At: <https://www.w3.org/mid/43E868F0-457C-4BFB-A8D8-AAF84A06C3C3@bzfx.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/39952
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>

Hello Marius & WG,

I’m glad to see some activity on this issue; I wrote the draft that you linked to in [1]. See [2] for the most relevant of the documents.

One of the reasons I wrote a new document rather than adopting TUS, is that it appears to be using HTTP as a substrate, rather than extending HTTP as an application unto itself. The draft seems to have made some improvements in this area, but it still relies on some assumptions that I tried to avoid.

Notably, it introduces many new headers that modify the semantics of the method. The  "Upload-Offset” and "Upload-Incomplete” headers must be understood by all the HTTP intermedaries the message passes through. This could confuse caches or gateways.

I avoided this by using the PATCH method whenever possible (to modify an existing resource without replacing it, exactly the semantics we’re looking for). The HTTP server, in all cases, gets to select the URI uses to identify resources.

I sort of gave up on my draft after it received no feedback. And I never liked how resumable requests work (e.g. resuming a POST upload), it seems difficult to implement.

However I came back upon it recently. I think 1xx interim responses are ideal for communicating information about an ongoing upload. And I plan on submitting a "message/byterange” media type for consideration as a PATCH body. While this by itself does not provide discoverability, I believe APIs could at least adopt this as a standard media type for segmented/partial uploads. [3]

Do you have any thoughts on this approach?

Thanks,

Austin.

[1] https://lists.w3.org/Archives/Public/ietf-http-wg/2019JulSep/0066.html <https://lists.w3.org/Archives/Public/ietf-http-wg/2019JulSep/0066.html>
[2] https://tools.ietf.org/id/draft-wright-http-partial-upload-01.html <https://tools.ietf.org/id/draft-wright-http-partial-upload-01.html>
[3] https://github.com/awwright/http-progress/issues/1#issuecomment-1061314730 <https://github.com/awwright/http-progress/issues/1#issuecomment-1061314730> for one possible way to use message/byterange with existing, standard HTTP features.


> On Apr 1, 2022, at 02:48, Marius Kleidl <marius@transloadit.com> wrote:
> 
> Hello HTTP working group,
> 
> we are all familiar with connectivity disruptions affecting our internet activities. One example is when a large file download is interrupted; say a 100 MB file download encounters a network loss after the client receives 70 MB. Fortunately, resumable HTTP downloads using range requests are a widely deployed standard feature that allows clients to fetch the remaining 30 MB only, saving time and resources for both endpoints. However, in the opposite direction, there is not a standard convention for resuming HTTP uploads.
> 
> Across the HTTP ecosystem there are several different approaches to providing resumable uploads. We are aware of at least one attempt to try and standardize an approach [1], but to our knowledge none have succeeded in being adopted and driven to conclusion.
> 
> We believe resumable uploads are a common problem and that there is value in a standard resumable upload approach. We've been working on a document [2] [3] that uses HTTP to solve what we believe to be the core problem set, while also allowing for extended use cases. We are bringing this to the list to understand if there is interest in the working group to solve the problem, and whether our document is a good basis for a solution.
> 
> In case you are interested in the background of this draft: The origin is within the tus project [4], which has been developing a HTTP-based protocol for resumable uploads [5] since 2013 (tus was also posted on this mailing list at the time [6]). Furthermore, we also provide various open-source implementations [7] to allow easy usage on the web, in mobile applications, desktop application, or server environments. tus has seen great adaption, proving that there is a demand for an open-source solution providing resumable uploads.
> 
> We hope to bring resumable uploads to more people. For this, adopting resumable uploads into HTTP would be a great step. There is also interest in including support for resumable uploads natively into platforms, like browsers and mobile SDKs, so that developers do not have to bring their own library for resumable uploads.
> 
> We have taken the main uploading process from our tus protocol and reworked it into a self-containing draft, which we want to present to you! As such, this draft can be seen as an evolution of our work on tus and as a step to increase availability of resumable uploads.
> 
> Thank you for any feedback in advance!
> 
> Best regards,
> Marius Kleidl
> 
> [1] https://lists.w3.org/Archives/Public/ietf-http-wg/2019JulSep/0066.html <https://lists.w3.org/Archives/Public/ietf-http-wg/2019JulSep/0066.html>
> [2] https://datatracker.ietf.org/doc/draft-tus-httpbis-resumable-uploads-protocol/ <https://datatracker.ietf.org/doc/draft-tus-httpbis-resumable-uploads-protocol/>
> [3] https://github.com/tus/tus-v2 <https://github.com/tus/tus-v2>
> [4] https://tus.io/ <https://tus.io/>
> [5] https://tus.io/protocols/resumable-upload.html <https://tus.io/protocols/resumable-upload.html>
> [6] https://mailarchive.ietf.org/arch/msg/httpbisa/I__B5Kc7h-1TvRRB9rmjY8tR-T0/ <https://mailarchive.ietf.org/arch/msg/httpbisa/I__B5Kc7h-1TvRRB9rmjY8tR-T0/>
> [7] https://tus.io/implementations.html <https://tus.io/implementations.html>
>