Re: [core] Status of Blockwise Transfers

"Kovatsch Matthias" <kovatsch@inf.ethz.ch> Mon, 31 October 2011 19:24 UTC

Return-Path: <kovatsch@inf.ethz.ch>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8DD9511E80CB for <core@ietfa.amsl.com>; Mon, 31 Oct 2011 12:24:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level:
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 BZbcpi3hsHrD for <core@ietfa.amsl.com>; Mon, 31 Oct 2011 12:24:33 -0700 (PDT)
Received: from edge20.ethz.ch (edge20.ethz.ch [82.130.99.26]) by ietfa.amsl.com (Postfix) with ESMTP id 7963811E80BD for <core@ietf.org>; Mon, 31 Oct 2011 12:24:31 -0700 (PDT)
Received: from CAS12.d.ethz.ch (172.31.38.212) by edge20.ethz.ch (82.130.99.26) with Microsoft SMTP Server (TLS) id 14.1.339.1; Mon, 31 Oct 2011 20:24:29 +0100
Received: from MBX10.d.ethz.ch ([169.254.1.192]) by CAS12.d.ethz.ch ([fe80::7861:4ecb:7c42:cad4%10]) with mapi id 14.01.0339.001; Mon, 31 Oct 2011 20:24:30 +0100
From: Kovatsch Matthias <kovatsch@inf.ethz.ch>
To: Likepeng <likepeng@huawei.com>, "Dijk, Esko" <esko.dijk@philips.com>, "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] Status of Blockwise Transfers
Thread-Index: AcyTA1LLgF2apeWtTByzRREkH8/sygEtchlQAA/NDpQAAOAYEA==
Date: Mon, 31 Oct 2011 19:24:29 +0000
Message-ID: <55877B3AFB359744BA0F2140E36F52B513833019@MBX10.d.ethz.ch>
References: <55877B3AFB359744BA0F2140E36F52B51382ED5E@MBX10.d.ethz.ch> <031DD135F9160444ABBE3B0C36CED618D50B@011-DB3MPN1-013.MGDPHG.emi.philips.com> <34966E97BE8AD64EAE9D3D6E4DEE36F2CF8815@szxeml525-mbs.china.huawei.com>
In-Reply-To: <34966E97BE8AD64EAE9D3D6E4DEE36F2CF8815@szxeml525-mbs.china.huawei.com>
Accept-Language: en-US, de-CH
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [70.102.96.7]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [core] Status of Blockwise Transfers
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/core>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 31 Oct 2011 19:24:33 -0000

Thanks for the responses!

> > The current spec seems to already take this "most likely to happen" meaning
> > for the status code in the examples, e.g. blockwise PUT returns 2.04 each
> > time but if a block is missing the final result could still be 2.04 or 4.00 or 4.08.
> > POST could do the same?

But what is most likely to happen?
The author of the server implementations will just arbitrarily pick a status code, which still has no meaning.
A badly written client then might misinterpret that intermediate status. I think, it only creates a source of errors.

> > On your first point, concurrent Block1/Block2 usage, that seems only applicable to POST or doesn't it?
> From the spec, only concurrent POST is mentioned.

Yes, that is how I understand it as well. A successful PUT would always results in resource state, i.e., no payload in the response.

> In the Size extension draft, I proposed to get the resource size by the Size option, and use concurrent GET for blocks.
> http://www.ietf.org/id/draft-li-core-coap-size-option-02.txt

I would say an upper bound (sz attribute) is enough. Embedded devices usually avoid dynamic memory allocation and those which use it probably have plenty of memory from a CoRE point of view.
For the concurrent GETs, one should be careful not to re-invent/implement TCP (sliding window for messages in flight), I guess. If it is required, the devices should rather switch to another protocol, shouldn't they?
I also saw that even for the server it can be hard to know the exact size in advance. With content-negotiation, the representation is created on-the-fly from some variables. When including on-demand sensor readings, the server cannot even do a "dry run" to pre-cache the sizes for each content-type.

Best regards
Matthias