Re: [core] Status of Blockwise Transfers

Likepeng <likepeng@huawei.com> Sat, 05 November 2011 20:45 UTC

Return-Path: <likepeng@huawei.com>
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 0BFAA1F0C3C for <core@ietfa.amsl.com>; Sat, 5 Nov 2011 13:45:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.357
X-Spam-Level:
X-Spam-Status: No, score=-3.357 tagged_above=-999 required=5 tests=[AWL=-0.961, BAYES_00=-2.599, MIME_BASE64_TEXT=1.753, MIME_CHARSET_FARAWAY=2.45, 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 c+W94MIFYEE8 for <core@ietfa.amsl.com>; Sat, 5 Nov 2011 13:45:55 -0700 (PDT)
Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66]) by ietfa.amsl.com (Postfix) with ESMTP id 5B8851F0C34 for <core@ietf.org>; Sat, 5 Nov 2011 13:45:55 -0700 (PDT)
Received: from huawei.com (szxga03-in [172.24.2.9]) by szxga03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LU700B6IGCIVC@szxga03-in.huawei.com> for core@ietf.org; Sun, 06 Nov 2011 04:45:54 +0800 (CST)
Received: from szxrg01-dlp.huawei.com ([172.24.2.119]) by szxga03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LU7008IGGCIC0@szxga03-in.huawei.com> for core@ietf.org; Sun, 06 Nov 2011 04:45:54 +0800 (CST)
Received: from szxeml206-edg.china.huawei.com ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.1.9-GA) with ESMTP id AEW45946; Sun, 06 Nov 2011 04:45:53 +0800
Received: from SZXEML411-HUB.china.huawei.com (10.82.67.138) by szxeml206-edg.china.huawei.com (172.24.2.58) with Microsoft SMTP Server (TLS) id 14.1.270.1; Sun, 06 Nov 2011 04:45:52 +0800
Received: from SZXEML525-MBS.china.huawei.com ([169.254.8.177]) by szxeml411-hub.china.huawei.com ([10.82.67.138]) with mapi id 14.01.0270.001; Sun, 06 Nov 2011 04:45:46 +0800
Date: Sat, 05 Nov 2011 20:45:46 +0000
From: Likepeng <likepeng@huawei.com>
In-reply-to: <55877B3AFB359744BA0F2140E36F52B513833019@MBX10.d.ethz.ch>
X-Originating-IP: [172.24.2.41]
To: Kovatsch Matthias <kovatsch@inf.ethz.ch>, "Dijk, Esko" <esko.dijk@philips.com>, "core@ietf.org" <core@ietf.org>
Message-id: <34966E97BE8AD64EAE9D3D6E4DEE36F2D09F16@szxeml525-mbs.china.huawei.com>
MIME-version: 1.0
Content-type: text/plain; charset="gb2312"
Content-language: zh-CN
Content-transfer-encoding: base64
Accept-Language: zh-CN, en-US
Thread-topic: [core] Status of Blockwise Transfers
Thread-index: AcyTA1LLgF2apeWtTByzRREkH8/sygEtchlQAA/NDpQAAOAYEAD/fWmn
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
X-CFilter-Loop: Reflected
References: <55877B3AFB359744BA0F2140E36F52B51382ED5E@MBX10.d.ethz.ch> <031DD135F9160444ABBE3B0C36CED618D50B@011-DB3MPN1-013.MGDPHG.emi.philips.com> <34966E97BE8AD64EAE9D3D6E4DEE36F2CF8815@szxeml525-mbs.china.huawei.com> <55877B3AFB359744BA0F2140E36F52B513833019@MBX10.d.ethz.ch>
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: Sat, 05 Nov 2011 20:45:57 -0000

Hello Matthias,

> 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.

Sometimes, the resource will be changed a lot after the resource discovery.

> 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?

Agree. We don't want to re-invent/implement TCP sliding window. I have no intention to propose to add the concurrent GET function, just to say, if people want to implement this feature, here is something that would be useful.

>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.

I agree that sometimes it is difficult to know the size in advance, but in most of the cases, it can be known.

Thanks,
Kind Regards
Kepeng
________________________________________
发件人: Kovatsch  Matthias [kovatsch@inf.ethz.ch]
发送时间: 2011年11月1日 3:24
到: Likepeng; Dijk, Esko; core@ietf.org
主题: RE: [core] Status of Blockwise Transfers

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