Re: Resumable Uploads

Amos Jeffries <squid3@treenet.co.nz> Sun, 21 April 2013 01:30 UTC

Return-Path: <ietf-http-wg-request@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 7FB5821F8763 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 20 Apr 2013 18:30:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.516
X-Spam-Level:
X-Spam-Status: No, score=-10.516 tagged_above=-999 required=5 tests=[AWL=0.083, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l0f0YXliKqnT for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 20 Apr 2013 18:30:12 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id F1B3B21F86C3 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sat, 20 Apr 2013 18:30:11 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UTj65-0004gE-PO for ietf-http-wg-dist@listhub.w3.org; Sun, 21 Apr 2013 01:29:41 +0000
Resent-Date: Sun, 21 Apr 2013 01:29:41 +0000
Resent-Message-Id: <E1UTj65-0004gE-PO@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <squid3@treenet.co.nz>) id 1UTj62-0004eX-5r for ietf-http-wg@listhub.w3.org; Sun, 21 Apr 2013 01:29:38 +0000
Received: from ip-58-28-153-233.static-xdsl.xnet.co.nz ([58.28.153.233] helo=treenet.co.nz) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <squid3@treenet.co.nz>) id 1UTj61-0001tt-49 for ietf-http-wg@w3.org; Sun, 21 Apr 2013 01:29:38 +0000
Received: from [192.168.2.7] (103-9-43-128.flip.co.nz [103.9.43.128]) by treenet.co.nz (Postfix) with ESMTP id 08928E6EC1 for <ietf-http-wg@w3.org>; Sun, 21 Apr 2013 13:29:12 +1200 (NZST)
Message-ID: <517340E8.2030301@treenet.co.nz>
Date: Sun, 21 Apr 2013 13:29:12 +1200
From: Amos Jeffries <squid3@treenet.co.nz>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
MIME-Version: 1.0
To: ietf-http-wg@w3.org
References: <CADZbJ9dYFGyrceh03M3B0KdKto7160Dis_geh9um0BhVe1re0g@mail.gmail.com> <alpine.DEB.2.00.1304182006001.21288@tvnag.unkk.fr> <29DE6A70-E3B9-4DCE-8C7E-506F6A0ADC92@gmail.com> <51706F32.5030108@panix.com> <5170E2A3.6010706@gmx.de> <CADZbJ9dGEVq-fQmhjRsddYdcg459r_zLfrOddkzHLOprZM0dNg@mail.gmail.com> <51712A49.6000901@gmx.de> <alpine.DEB.2.00.1304191335410.3525@tvnag.unkk.fr> <CABkgnnVFW5zkH-0eY=iyDuFAF9Ua6+4NL26KMP5Nf-cqxmXLJw@mail.gmail.com> <6FD4A73D-08D9-428B-B15A-935691A32BF9@tzi.org> <alpine.DEB.2.00.1304192255220.8950@tvnag.unkk.fr> <CABkgnnW70B4daZBm_txGFcUC3zaB8-8926tkiCESFN8nVb24Sg@mail.gmail.com> <CAK3OfOj5XF3dz2-jAfWMdt000dtHm6W7tAvy7P9CKFp7DPta7A@mail.gmail.com>
In-Reply-To: <CAK3OfOj5XF3dz2-jAfWMdt000dtHm6W7tAvy7P9CKFp7DPta7A@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=58.28.153.233; envelope-from=squid3@treenet.co.nz; helo=treenet.co.nz
X-W3C-Hub-Spam-Status: No, score=-2.9
X-W3C-Hub-Spam-Report: AWL=-2.918, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1UTj61-0001tt-49 351e0b97e1fff5a874c2ea22beb7ed80
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Resumable Uploads
Archived-At: <http://www.w3.org/mid/517340E8.2030301@treenet.co.nz>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17441
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: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 20/04/2013 5:02 p.m., Nico Williams wrote:
>
>
> On Apr 19, 2013 5:13 PM, "Martin Thomson" <martin.thomson@gmail.com 
> <mailto:martin.thomson@gmail.com>> wrote:
> >
> > On 19 April 2013 13:56, Daniel Stenberg <daniel@haxx.se 
> <mailto:daniel@haxx.se>> wrote:
> > > I'd just add that a resumed upload does not necessarily imply a 
> previous
> > > upload failure. It could also be that you're appending parts over 
> time as
> > > they "come in" or similar.
> >
> > I'd have thought that this is a perfect fit for PATCH.  Nothing new 
> needed.
>
> Sure, but how do you indicate that a transfer is complete?
>

I would think that any API using PATCH, started with a PUT to create the 
resource, used a series of PATCH to updated it and is treating the 
intermediary stages between initial PUT and followup PATCH's as:

a) time periods when GET on the resource can pull the current state in 
its entirety (no need for a completion signal, as every PATCH makes a 
new "complete" / up-to-date copy)

b) using a final POST to perform resource manipulation through some 
control script - ie copy the final solution to a proper Location, and 
run any post-processing checks.

c) using LOCK/UNLOC requests on theh resource URL explicitly to signaly 
the in-use state across teh period when the resource is being PATCH'd.

And yes, all of these assume working API no problems with a particular 
request/response message. The interesting cases for resume are the ones 
when corruption, loss, or disconnection happen while the server is 
receiving a request.

Amos