Re: Resumable Upload draft updates

Michael Toomim <toomim@gmail.com> Mon, 22 July 2024 22:50 UTC

Received: by ietfa.amsl.com (Postfix) id C1515C14F6FA; Mon, 22 Jul 2024 15:50:59 -0700 (PDT)
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 C0719C14F6F4 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 22 Jul 2024 15:50:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.856
X-Spam-Level:
X-Spam-Status: No, score=-2.856 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, 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); dkim=pass (2048-bit key) header.d=w3.org header.b="DObEL5k9"; dkim=pass (2048-bit key) header.d=w3.org header.b="EMZof4pU"; dkim=pass (2048-bit key) header.d=gmail.com header.b="KSXiOUyp"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xTFUculXjUjo for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 22 Jul 2024 15:50:59 -0700 (PDT)
Received: from mab.w3.org (mab.w3.org [IPv6:2600:1f18:7d7a:2700:d091:4b25:8566:8113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C9769C14F6EF for <httpbisa-archive-bis2Juki@ietf.org>; Mon, 22 Jul 2024 15:50:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:In-Reply-To:From:References:To:MIME-Version:Date:Message-ID: Content-Type:Cc:Reply-To; bh=aoCpKxNjBlcpcAPUrlKJZ3fZVT+7n7sWBKQQ5ancSVQ=; b= DObEL5k90VdrwkILbD/sjlyK2aKen+1NJdyNFRvj0yKbjNC3ewXtvQpV/+18cx+AYYeELNfHiPqNc QCdhisIwabGuxtaJu/Cgj9cXM+hzFRrFX9CJ0cA4MvjKCL1ekJjmaXNn8G67RqpKt8h+ry4fmfvbX m++bCZ2IUjG9yPja0Bu12mDp8jKEhNGmfOGF0PyDQsxEtC5Y3dDiT9f47Ph7gzLwSKawUEimPi97T 2bnddAlZXqaZwYX+PSVmMkW8NLlOTnJGauZsM6FUq6AqCYLkj0l5IPBf+AlQgwE9NYTP4UFHE/zV8 KQJF6i8M4LASOB74zvxG7JH/xTJLPtmmLw==;
Received: from lists by mab.w3.org with local (Exim 4.96) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1sW1rG-0002nE-0B for ietf-http-wg-dist@listhub.w3.org; Mon, 22 Jul 2024 22:50:18 +0000
Resent-Date: Mon, 22 Jul 2024 22:50:18 +0000
Resent-Message-Id: <E1sW1rG-0002nE-0B@mab.w3.org>
Received: from ip-10-0-0-144.ec2.internal ([10.0.0.144] helo=pan.w3.org) by mab.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <toomim@gmail.com>) id 1sW1rD-0002mG-22 for ietf-http-wg@listhub.w3.internal; Mon, 22 Jul 2024 22:50:15 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID: Content-Type:Cc:Reply-To; bh=aoCpKxNjBlcpcAPUrlKJZ3fZVT+7n7sWBKQQ5ancSVQ=; t=1721688615; x=1722552615; b=EMZof4pUoN/cPvXeTGYWfQ2pkVBIaE4QI8yecW9mZBKNNVP x4Sh6hd+tzxtXQgKwQq66p8KeG0fz8TLxWpyDg14qfvfw2Ene+2ZYCFKiuqmkfK+/zJsu5CZGhCRV 6Pjk0lnoer89/22HM1kSLkON7yulQ5v5gE4segKSIzS/5nH7VHHpDA9NvmwZwtDY5WllTy8fxeCNX QhxztD3MSTmRMIOZmuyJkzU+JJ/yF+EvAzAy3iTsYyvAVL0PPLLi2LtLkzHaUTXKvlsabHETa/Y4H nP42DVPsyZb7j7UCmr7G3tLio0ZWggTx7eajUfdXSYj0ldm3IPcMFvaWAWhAtNIw==;
Received-SPF: pass (pan.w3.org: domain of gmail.com designates 2607:f8b0:4864:20::42c as permitted sender) client-ip=2607:f8b0:4864:20::42c; envelope-from=toomim@gmail.com; helo=mail-pf1-x42c.google.com;
Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by pan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from <toomim@gmail.com>) id 1sW1rC-00BiI4-2z for ietf-http-wg@w3.org; Mon, 22 Jul 2024 22:50:15 +0000
Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-70b703eda27so2140202b3a.3 for <ietf-http-wg@w3.org>; Mon, 22 Jul 2024 15:50:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721688610; x=1722293410; darn=w3.org; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=aoCpKxNjBlcpcAPUrlKJZ3fZVT+7n7sWBKQQ5ancSVQ=; b=KSXiOUypVgYjo+NM7RkblngUb87VaYoBok49NdtzX98MG36YcjrTluWItTUy7qChng h0ye1XkCppFpPj1/tARc35ga4z/B4gnI6SsIC4NveSlTytxD47Oh+DSLsvbGVFDByThf Pg06jfq7SfBr2P0G1GoQEfrb2+kciB2ZL6RhBijJI8YvYROwWo/tWbfBpdrS/FT8VBql I0SIADLBMZGtStfHmETCZu7AFbq9gkO8R/L6ribgigA9K3dHaZp1lAegrnUAuj+dIgBw 5I07HDrxzrJJ83Z8waoKTYZJ6rlzU8aqkK8+sj9uXOrcyUO/nhq/DyjPB00Dq0XXowrE G/+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721688610; x=1722293410; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=aoCpKxNjBlcpcAPUrlKJZ3fZVT+7n7sWBKQQ5ancSVQ=; b=ug/bYbkfeZemrQQcA8ruf4gCm3She3x+dm04V142D9aldKE7vE4lWCe5Z1vUH85tl6 oyc2vGjs2KYG89miKHhB+Z0/wXHbLIFCXhuXNBizvUOk1NRfMU+m2260lZvpOcWckKXG iTEOmkm6ZAP/TnoBp4ugnh4Caan36H1/uUcouK4k7o1xQC6fzqseh16ptKI8sFl5k/P5 vjwWf9jgDw5AtyaugAZXHxpKhFHQrkDB7nUMSLpgT5hp8MagHfjvaUPbECyV/cfAUsmj pklWd0doO7LkgotLnxoEN6vL0GMot3RgMsPVOWJTSWHAUGi9+wjdxL35dc72Jvlitot0 wUHg==
X-Gm-Message-State: AOJu0YxxSJNPaOW3eRtQppYb6biolL5fCMsgxPKUyO+SaM3OSRh+01PQ KSh0biQ4yHioCXjt9haLGhB7xfJsUwMOjB2l6Eg/Qc/nHgEVHozin4wd1nkh9CQ=
X-Google-Smtp-Source: AGHT+IFQNx8KkBxms3GJBFqmmT40g68EW58ZihRjbOzE8qS04Df5HQySr5S37pPXHBnBLstYEyf2qw==
X-Received: by 2002:a05:6a00:4f82:b0:70d:ca45:a004 with SMTP id d2e1a72fcca58-70dca45a391mr1204767b3a.13.1721688610326; Mon, 22 Jul 2024 15:50:10 -0700 (PDT)
Received: from ?IPV6:2001:67c:370:128:4cd5:4910:6f32:d434? ([2001:67c:370:128:4cd5:4910:6f32:d434]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70cff5ab918sm5823234b3a.183.2024.07.22.15.50.09 for <ietf-http-wg@w3.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jul 2024 15:50:09 -0700 (PDT)
Content-Type: multipart/alternative; boundary="------------eihE30z5XQw00SQ55Joag03u"
Message-ID: <29911fc7-cfa3-4ea4-8ee0-822781060fa5@gmail.com>
Date: Mon, 22 Jul 2024 15:50:08 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: ietf-http-wg@w3.org
References: <CANY19Ns76du=x04xtejdRrdNT2Lq_=5Huo5oH_KQ9qg5bAO89A@mail.gmail.com>
Content-Language: en-US
From: Michael Toomim <toomim@gmail.com>
In-Reply-To: <CANY19Ns76du=x04xtejdRrdNT2Lq_=5Huo5oH_KQ9qg5bAO89A@mail.gmail.com>
X-W3C-Hub-DKIM-Status: validation passed: (address=toomim@gmail.com domain=gmail.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-5.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, DMARC_PASS=-0.001, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, W3C_AA=-1, W3C_DB=-1, W3C_WL=-1
X-W3C-Scan-Sig: pan.w3.org 1sW1rC-00BiI4-2z 62a1ac68aa7d6973c606444719caeda8
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Resumable Upload draft updates
Archived-At: <https://www.w3.org/mid/29911fc7-cfa3-4ea4-8ee0-822781060fa5@gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/52097
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/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

It was great seeing this progress on resumeable uploads in HTTPWG today!

I am seeing a deep symmetry between this work and the Resource 
Versioning work that I'll present on Wednesday. It turns out that we can 
represent a lot of the semantics needed for Resumeable Uploads through 
these generic Version and Parents headers that I'm proposing.

Specifically, an upload can be represented as an append-only bytestream, 
which is growing over time until it reaches a committed "version." We 
can specify this with:

    Version-Type: bytestream

This header defines that the resource grows at one byte per timestep, 
and thus "version == length" in bytes.

Now when a client needs to resume an upload, it simply asks the server 
what version it currently has:

    HEAD /upload

And the server's response says what version it has:

    200 OK
    Version: "500"

This tells the client that the server is at time=500, thus it has the 
first 500 bytes of the resource, and the client now knows to upload a 
range starting from 500:

    PUT /something
    Current-Version: "900"
    Parents: "500"
    Content-Range: bytes 500-900/900
    Content-Length: 400

    <binary data from 500-900>

Check out the full example in Section 3.3 of 
draft-toomim-httpbis-versions-00 
<https://datatracker.ietf.org/doc/html/draft-toomim-httpbis-versions#section-3.3>.

The nice thing about this is that we can implement Resumeable Uploads 
without as many new headers. For instance, we wouldn't need this new 
Upload-Length 
<https://github.com/httpwg/http-extensions/issues/2832#issue-2416825177> 
header proposed today, because the Current-Version header in versions-00 
Section 2.6 
<https://datatracker.ietf.org/doc/html/draft-toomim-httpbis-versions-00#section-2.6> 
already does the job — you can see it on line 2 of the example PUT above!

I think it would be great to have general headers that can be used for 
both Resource Versioning and Resumeable Uploads.

What does the group think about this? Details are in versions-00, 
section 3.3 
<https://datatracker.ietf.org/doc/html/draft-toomim-httpbis-versions-00#section-3.3>.

Michael

On 7/18/24 5:10 PM, Marius Kleidl wrote:
> Dear working group,
>
> last week we published iteration -04 for the resumable upload draft 
> [1], which includes a number of useful additions:
>
>   * The application/partial-upload media type for PATCH requests
>   * Upload limits (max/min total size, max/min request size, upload
>     expiration)
>   * Guidelines for handling content and transfer codings
>   * Guidelines for integrity checks using digest fields
>   * Problem types for error responses
>
> From our perspective as editors, the draft is shaping up well, but a 
> few small questions could still be addressed:
>
>  1. The server announces the upload limits (e.g. for maximum size or
>     minimum request size) only when the client creates a new upload
>     resource. For the client it would also be useful to know these
>     limits upfront before creating an upload. The client may then
>     decide to not start an upload if it cannot obey the limits. Should
>     we allow the client to send an OPTIONS request to retrieve the
>     upload limits before creating a resource? [2]
>  2. If an upload is spread across multiple requests (e.g. due to
>     limits from intermediaries), the server only knows the upload
>     length once the upload is completed. However, in many cases the
>     client knows the length upfront and could indicate the length to
>     the server, who can use this information to optimize the upload
>     storage or reject the upload entirely. Should we add an advisory
>     header to upload creation requests to indicate the upload length?
>     The Upload-Complete header would still keep the authority for
>     completing the upload. [3]
>  3. A client may include integrity fields to send the expected digest
>     for the upload to the server for later verification. This requires
>     the client to know the digest upfront or transmit it later using
>     trailers (which might not always be possible). Should we also
>     provide a way for the client to request a digest from the server
>     once the upload is complete? Then the client and server can
>     compute the digest during the upload and the client can compare
>     its digest to the server's. [4]
>
> We are looking forward to discussing these points in the httpbis 
> session on Monday!
>
> Best regards,
> Marius Kleidl
>
> [1] 
> https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-resumable-upload-04
> [2] https://github.com/httpwg/http-extensions/issues/2833
> [3] https://github.com/httpwg/http-extensions/issues/2832
> [4] https://github.com/httpwg/http-extensions/issues/2834