Re: Draft for Resumable Uploads

Eric J Bowman <mellowmutt@zoho.com> Wed, 20 April 2022 06:42 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 6147D3A0B25 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 19 Apr 2022 23:42:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.756
X-Spam-Level:
X-Spam-Status: No, score=-2.756 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); domainkeys=pass (768-bit key) header.from=mellowmutt@zoho.com header.d=zoho.com; dkim=pass (1024-bit key) header.d=zoho.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 E1TFNhUrKG8m for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 19 Apr 2022 23:42:42 -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 A172C3A1026 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 19 Apr 2022 23:42:41 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1nh40b-0000GP-Id for ietf-http-wg-dist@listhub.w3.org; Wed, 20 Apr 2022 06:40:13 +0000
Resent-Date: Wed, 20 Apr 2022 06:40:13 +0000
Resent-Message-Id: <E1nh40b-0000GP-Id@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 <mellowmutt@zoho.com>) id 1nh40Z-0000F6-DP for ietf-http-wg@listhub.w3.org; Wed, 20 Apr 2022 06:40:11 +0000
Received: from sender4-pp-o91.zoho.com ([136.143.188.91]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mellowmutt@zoho.com>) id 1nh40Q-0002GT-Rj for ietf-http-wg@w3.org; Wed, 20 Apr 2022 06:40:06 +0000
ARC-Seal: i=1; a=rsa-sha256; t=1650436781; cv=none; d=zohomail.com; s=zohoarc; b=N2jyX9+XmiVoLDBVcsg22NuCRyAc7PPIakDZHKsFk6pdJJbM5RJxGCnsi5B7dgIP5IY6iHQJE8ncUV7UWZgxPQqKV6zSvDaoj8jRYnCvbRC/hRoHj2XdXIgpkiTjcr0EpOlWkuNqT4N8d8LYY+JfYN/OvfVYXURdJc4oYq3Ok9A=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650436781; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JMWpb9VIwv9bJBiChij/vmU8KX/MEkc6+B0aUfIIkXY=; b=mp9bKd2dcMv/4GMJhgEmAauny7qsQVwXircogpvAcf8jbjQKYxL4dvC6jHsaDMFUWwbJbKLQt7ASpyQsfY9ibDto5QEmTk84iizJ+ieoNl/x7aH0c2fVr9wDOvm+Sch/B9DQIXhjrxWtk5JYTB/am0nSxegUHWEFGuvWL1JiYOc=
ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=mellowmutt@zoho.com; dmarc=pass header.from=<mellowmutt@zoho.com>
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=j0r8DfuFYW51an2me6NQcSQK1ukXEna5KyT+ggFxcI1j0r3WEP9fyG+H48ejTXtNOyKASqj5QYyJ x72jCNkf1H7bN8ClUpI3ev1Ael0KEsfnr0xy9FB9AAqo6UxfTMhJ
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1650436781; s=zm2022; d=zoho.com; i=mellowmutt@zoho.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-Id:Message-Id:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Reply-To; bh=JMWpb9VIwv9bJBiChij/vmU8KX/MEkc6+B0aUfIIkXY=; b=E41ZFCSq3THgfzFVg26TfYwCMXK/mUvmdO4Td/SNhk6v7EGI3pKelU4CqcVJXMey ljNlKU8M2S9+k8uVLUCaPHwbOWvegtUym02p5shRf7xOPo8Tz94R17wIi9nE8voo9w5 6gCGlzVQrJvRFc2PQ7PXtMAGnpFhdaFg33lWMlEg=
Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1650436779481442.64882211404677; Tue, 19 Apr 2022 23:39:39 -0700 (PDT)
Received: from [65.117.211.248] by mail.zoho.com with HTTP;Tue, 19 Apr 2022 23:39:39 -0700 (PDT)
Date: Tue, 19 Apr 2022 23:39:39 -0700
From: Eric J Bowman <mellowmutt@zoho.com>
To: "Roy T. Fielding" <fielding@gbiv.com>
Cc: ietf-http-wg <ietf-http-wg@w3.org>
Message-Id: <18045b2adb9.c9d5f10255708.2924994361377433781@zoho.com>
In-Reply-To: <5B3291E4-CA3B-4D6E-92F0-512D89E44A79@gbiv.com>
References: <CANY19NvMcPQaHRamFe-yy-E38xKo2XrmFCKVRoPbyBMQhoY6vA@mail.gmail.com> <EA8A9F25-D49F-41DE-B98E-A013E1E68CAF@apple.com> <6e64f598-e82b-bff5-5ed9-c3c3f4b01439@gmx.de> <C6907036-146C-4FAB-938E-238473CB42B4@apple.com> <17ff7558cda.10ad81f8113705.2829201994677815148@zoho.com> <2FADC394-0954-4AA2-8F55-6CDF88833CB3@apple.com> <17ff85458eb.119b6ffbd16630.2281063094525551184@zoho.com> <a0670d54-d999-807c-23e2-95e357e73104@gmx.de> <17ff868f14e.d111a4c016833.788757655885004970@zoho.com> <4c1aabee-bc23-6d19-2e5d-8fdf3b3532ad@gmx.de> <892B7A86-57D0-4B21-9899-65EF3FA84A12@bzfx.net> <17ffd4d64d2.c4f12f9734385.3620821323075353432@zoho.com> <904B5382-ADCA-461F-B47C-583874D4FB55@bzfx.net> <17ffe8ddd90.1257859fc38181.7721145847915462132@zoho.com> <54BB33F9-DF98-48DB-BA2B-C8A63208BA21@bzfx.net> <1800309bddc.ec99308354061.3626360867795203460@zoho.com> <48744eb6-4437-508c-f61c-06918839e858@gmx.de> <1801b361c47.db210b21123021.8993280150669755607@zoho.com> <9b3236fc-284f-29f5-6405-850dcc2e6fed@gmx.de> <5B3291E4-CA3B-4D6E-92F0-512D89E44A79@gbiv.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_131843_1112577862.1650436779450"
Importance: Medium
User-Agent: Zoho Mail
X-Mailer: Zoho Mail
Feedback-ID: rr08011227cf6134dd2015ca4fa406459b00006d946a953b58e4c755fb1e1b3cf0a6a0ad281a148d071437e6:zu080112279d4f4738bb6cfbc20d5d21870000be7a1b02982a259cf8bb408d110fe41a6b14f6a40ba44435f5:rf0801123204d9707211575ca3b411b8a90000de1045cd72f57d4be4e4a5986fc524567eed1ae39f0aab83bac10fb2820fc9f8f387751d:ZohoMail
Received-SPF: pass client-ip=136.143.188.91; envelope-from=mellowmutt@zoho.com; helo=sender4-pp-o91.zoho.com
X-W3C-Hub-DKIM-Status: validation passed: (address=mellowmutt@zoho.com domain=zoho.com), signature is good
X-W3C-Hub-DKIM-Status: validation passed: (address=mellowmutt@zoho.com domain=mellowmutt@zoho.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.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_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1nh40Q-0002GT-Rj 3004ef3751f0ad814328dbce3676db58
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Draft for Resumable Uploads
Archived-At: <https://www.w3.org/mid/18045b2adb9.c9d5f10255708.2924994361377433781@zoho.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/39998
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>

Roy T. Fielding wrote:



>

> I've defined this before. A resource is a mapping of a URI to value over time,

> and thus always exists as a function because there is no distinction between

> an origin server that doesn't exist, a resource that is not yet mapped by the

> origin server (but could be), or the network being down. For example,

> OPTIONS can target a resource that has no representation.

>






Yes, you have, and I'm glad you used the word "defined" and good luck with OPTIONS on this URI:



http://foo.bar/xyzzy



Theoretically is, and always has been even before I just conjured it, a resource *by definition* because maybe one day it will be defined (and damn if that isn't why the Web works where Xanadu etc. failed, conceptually) and have a representation (I posit that it does not, at the time of this writing). But, it is undefinable by today's standards. Colloquially, it's really difficult to explain when HTTP defines resources as "created" if I also insist that said resource always existed in the first place.



>

> A value (the selected representation) is what might or might not exist at

> any single point in time for any given request.

>






And the Periodic Table is a horrifically outdated representation / model which remains the basis of getting work done IRL, regardless of where an "electron" may "be". Short of rewriting HTTP to use "defined" instead of "created" how can we have this resumable-upload discussion without tripping over our own pedantry, I wonder?



>

> The question for PATCH (when I originally proposed it in HTTP/1.1)

> was whether a non-existent representation would be treated equivalent

> to a zero-length representation for the semantics of PATCH.

> I chose to define it as such because that would match the semantics

> of the Unix patch command.  Hence, that's the definition.

>






The semantics of my hobbyist MONTage protocol's PATCH method (and media types) are defined by DARCS patch theory. Whilst taking your (indirect) advice and separating non-existent (404 in my book) from zero-length (410). Maybe I should call it PILL, or PITA? lol ;)



>

> However, I don't think this discussion is relevant to the proposed upload

> mechanism. HTTP's methods are defined by the method spec, not by

> opinions on what the name allows, and Julian pointed to the right spec.

>






I'm not interpreting method semantics based on their names, Roy. My opinion is that the right spec is wrong. I always tried to transcend the limitations of HTML's reliance on GET/POST by adopting other methods, but if those methods all have overlapping semantics I don't see the point? The bug up my butt remains partial PUT becoming acceptable due to *changes* in the spec. My opinion that create/replace semantics deserves its own unsullied method could go by any number of names, and I would hope that doesn't change over time.



My opinion that method semantics shouldn't vary by media type, transcends any given method regardless of its name or intent. I did not see that 10 years ago when arguing against RFC 5789. At the remove I have now, it's so obviously wrong I feel I shouldn't even need to explain it, but yeah, that's just my opinion. I hate that my pragmatic advice to the youngsters is stick with GET/POST.



>

> The problem with extending old methods to do new tricks is that

> such extensions must be defined with respect to what happens when

> the extension is ignored. A partially ignored extension can wreak havoc,

> both within protocol chains and within single server implementations

> that are internally layered with method-specific assumptions.

>






Exactly why I'm taking a purist approach in my opposition to PATCH creating resources? What has been discussed in this thread, is a new media type for that, over a decade on since PATCH started getting used for... well... patching. I don't see a problem with that "method-specific assumption" at all, it's been de facto for a long while.



>

> There are only two options for implementing this while staying

> within HTTP...

>

> The second is to immediately send a 1xx response to the client that

> directs them to a separate temporary resource corresponding to

> *this* request content being uploaded, upon which the client can do

> resumable tricks if this request fails.

>






I'm done ranching, my herd is sold as of October and I'm on to my next opportunity, which still leaves me a strongly-opinionated HTTP hobbyist. Playing Devil's Advocate,  in this thread, Austin and Guoye are discussing multiple clients completing a failed upload. Hence my 206 suggestion, rather than stating there is no HTTP solution to the problem at hand?



>

> The first is to immediately respond with 202 Accepted

> and the instructions for resuming/finalizing the upload if failed.

>

> Both achieve the goal, are method-independent, and don't change

> the semantics for deployed practice.


>






Both assume only one client attempting to upload. In which case I agree with you entirely. In other cases I'm fine with deferring to your wisdom, but not without question, no disrespect intended.



>

> A 202 response changes the normal response flow, which

> loses whether the initial request succeeded. This is probably

> not desired most of the time, since resuming an upload is rare.

>






I've always considered 202 as "comment awaiting moderation" which may take anywhere from a few moments, to never, whether the upload succeeded or not. Out here in the sticks, taking a pic and texting it to someone rarely succeeds. If I have to re-try, I'd rather my UA picks up where it left off. Estonia has better connectivity than rural-mountain Colorado (optical fiber getting close lately tho).


>
> A 1xx response does not change the normal response flow,

> but requires that the *client* that indicated support for doing

> a resumable upload support also support a 1xx response.

> IMO, that trade-off is obvious.

>






With you there. May not seem like it given my previous responses to this topic, but I guess I was assuming some generic client like libcurl that reports the 1xx and quits instead of continuing, my bad.


>

> Yes, that requires a protocol chain that supports 1xx responses.

> It is completely and utterly irresponsible at this point to allow

> NEW FUNCTIONALITY to be supported by stacks that are

> somehow incapable of understanding the existing protocol defined

> over 25 years ago. They were required to implement support for 1xx

> and 100. They will want to implement support for 103. They will have to

> implement this new 1xx support if they want a resumable upload

> without losing the initial request status, because 1xx is the only

> way to communicate method-specific, resource-based options

> before a final status code is sent.

>






So, you're -1 on distributed uploads from multiple clients? Granted I don't have any use case for this, but apparently others do. Not sure what you mean by "final" status code. My years-long example 206 broken-gif file could at any time have been fixed or replaced to achieve a "final" status of 200 OK. Because I thought I understood the temporal nature of a resource (or its definition I guess).


>
> If the 1xx is lost, the client will only see the result of the initial

> request in a 2xx or 4xx response, which could also include

> extensions to indicate where the partial upload is kept and how

> to resume/cancel it with further requests. The difference

> is that the client wouldn't receive that information if the

> connection fails before receiving the final response headers.

>






And how are other clients informed of the partial resource, if at all, seems to be another problem folks are trying to solve. I have another suggestion using weak validators like I used to, but I'm too damn tired. Calving season went off without a hitch, but the past week has been nothing but blizzards and single-digit temps, now is when folks around my area are busy sending hay by the truckload to Churchill Downs, busy busy busy.



-Eric