Re: Draft for Resumable Uploads

Guoye Zhang <guoye_zhang@apple.com> Wed, 06 April 2022 08:32 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 10F703A1763 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 6 Apr 2022 01:32:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.76
X-Spam-Level:
X-Spam-Status: No, score=-2.76 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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 (2048-bit key) header.d=apple.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 VFgtEuHqhOmB for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 6 Apr 2022 01:31: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 762433A175F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 6 Apr 2022 01:31:56 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1nc12j-000083-Lo for ietf-http-wg-dist@listhub.w3.org; Wed, 06 Apr 2022 08:29:33 +0000
Resent-Date: Wed, 06 Apr 2022 08:29:33 +0000
Resent-Message-Id: <E1nc12j-000083-Lo@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <guoye_zhang@apple.com>) id 1nc12i-00006b-15 for ietf-http-wg@listhub.w3.org; Wed, 06 Apr 2022 08:29:32 +0000
Received: from rn-mailsvcp-ppex-lapp15.rno.apple.com ([17.179.253.34] helo=rn-mailsvcp-ppex-lapp15.apple.com) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <guoye_zhang@apple.com>) id 1nc12g-0006BK-1j for ietf-http-wg@w3.org; Wed, 06 Apr 2022 08:29:31 +0000
Received: from pps.filterd (rn-mailsvcp-ppex-lapp15.rno.apple.com [127.0.0.1]) by rn-mailsvcp-ppex-lapp15.rno.apple.com (8.16.1.2/8.16.1.2) with SMTP id 2368FkL2002394; Wed, 6 Apr 2022 01:29:13 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=VCsKl0PUxucb4bkqZLyy0ZEYPZ8mHB1en2b4W1SvHxY=; b=OSQlxrdjZyxuBgUKxKIdMTW8gByRoxWrURmJ59sgQQLNBaPc4AtxTK1HtzRnNUOzMfyQ CERGp56QMkZeZ5dZJ+m7z4d5O2C+jAMRsIBAtNcUCSgrvWwWRvHJXEQ5HRR9qG29cJqH CkoW4/79b5vWeFt1LpBtLISDu1QYEfO5wb99ctZoyKSkn9iSs8lljrIyZaoTu7yvPxHv YmJa7vUnJyD8lDwK0pT0op32HeAmgupiTmQYCcU1LrtLZeQ/cKsI/KL64xyXQKFhFRF0 VmZnQ6EP1fAEh+qrkfEhsjuQ6XZGeCCTKAjcINsyhK+a6RKgRdn5CrAvmTtjYp47lxVB bw==
Received: from rn-mailsvcp-mta-lapp02.rno.apple.com (rn-mailsvcp-mta-lapp02.rno.apple.com [10.225.203.150]) by rn-mailsvcp-ppex-lapp15.rno.apple.com with ESMTP id 3f6m2bvm28-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 06 Apr 2022 01:29:13 -0700
Received: from rn-mailsvcp-mmp-lapp01.rno.apple.com (rn-mailsvcp-mmp-lapp01.rno.apple.com [17.179.253.14]) by rn-mailsvcp-mta-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.16.20220118 64bit (built Jan 18 2022)) with ESMTPS id <0R9W00EZSSWPR3F0@rn-mailsvcp-mta-lapp02.rno.apple.com>; Wed, 06 Apr 2022 01:29:13 -0700 (PDT)
Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp01.rno.apple.com by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.16.20220118 64bit (built Jan 18 2022)) id <0R9W01100SO5VB00@rn-mailsvcp-mmp-lapp01.rno.apple.com>; Wed, 06 Apr 2022 01:29:12 -0700 (PDT)
X-Va-A:
X-Va-T-CD: 2ea655955c4920f5550f505d297b8ed1
X-Va-E-CD: b771b36018a551dadbcab21e196f369b
X-Va-R-CD: 789a39f329adbc27872c7bc92346a2b9
X-Va-CD: 0
X-Va-ID: 647c9716-019f-46f7-8170-3b8b774375dd
X-V-A:
X-V-T-CD: 2ea655955c4920f5550f505d297b8ed1
X-V-E-CD: b771b36018a551dadbcab21e196f369b
X-V-R-CD: 789a39f329adbc27872c7bc92346a2b9
X-V-CD: 0
X-V-ID: 627e8c69-6baf-4798-87bb-c1106d2ccdf3
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.850 definitions=2022-04-06_02:2022-04-04,2022-04-06 signatures=0
Received: from smtpclient.apple (unknown [17.11.86.160]) by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.16.20220118 64bit (built Jan 18 2022)) with ESMTPSA id <0R9W00LG9SWL6F00@rn-mailsvcp-mmp-lapp01.rno.apple.com>; Wed, 06 Apr 2022 01:29:12 -0700 (PDT)
From: Guoye Zhang <guoye_zhang@apple.com>
Message-id: <AFC87471-BF4E-4F50-8CA5-182E90753D33@apple.com>
Content-type: multipart/signed; boundary="Apple-Mail=_5F5F6E41-61B0-49FF-8704-F4C6419B5C83"; protocol="application/pkcs7-signature"; micalg="sha-256"
MIME-version: 1.0 (Mac OS X Mail 16.0 \(3712.0.6\))
Date: Wed, 06 Apr 2022 01:29:09 -0700
In-reply-to: <43E868F0-457C-4BFB-A8D8-AAF84A06C3C3@bzfx.net>
Cc: Marius Kleidl <marius@transloadit.com>, ietf-http-wg <ietf-http-wg@w3.org>
To: Austin Wright <aaa@bzfx.net>
References: <CANY19NvMcPQaHRamFe-yy-E38xKo2XrmFCKVRoPbyBMQhoY6vA@mail.gmail.com> <43E868F0-457C-4BFB-A8D8-AAF84A06C3C3@bzfx.net>
X-Mailer: Apple Mail (2.3712.0.6)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.850 definitions=2022-04-06_02:2022-04-04,2022-04-06 signatures=0
Received-SPF: pass client-ip=17.179.253.34; envelope-from=guoye_zhang@apple.com; helo=rn-mailsvcp-ppex-lapp15.apple.com
X-W3C-Hub-DKIM-Status: validation passed: (address=guoye_zhang@apple.com domain=apple.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-6.4
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_MED=-2.3, RCVD_IN_MSPIKE_H5=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_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1nc12g-0006BK-1j 0da1c533905bcd5a07f25f09b6067602
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Draft for Resumable Uploads
Archived-At: <https://www.w3.org/mid/AFC87471-BF4E-4F50-8CA5-182E90753D33@apple.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/39971
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>


> On Apr 4, 2022, at 8:41 PM, Austin Wright <aaa@bzfx.net> wrote:
> 
> 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?

Originally, an earlier internal draft version had “Upload Creation Procedure” and “Upload Appending Procedure” with PATCH. Then we recognized that they are nearly the same thing with all the same requirements, just different offsets, so we merged them into a single “Upload Transfer Procedure”.

We can definitely revisit this decision if the consensus is to adopt and improve PATCH.

Guoye
> 
> Thanks,
> 
> Austin.
> 
> [1] 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
> [3] 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
>> [2] https://datatracker.ietf.org/doc/draft-tus-httpbis-resumable-uploads-protocol/
>> [3] https://github.com/tus/tus-v2
>> [4] https://tus.io/
>> [5] https://tus.io/protocols/resumable-upload.html
>> [6] https://mailarchive.ietf.org/arch/msg/httpbisa/I__B5Kc7h-1TvRRB9rmjY8tR-T0/
>> [7] https://tus.io/implementations.html
>> 
>