Re: [core] Status of Blockwise Transfers

"Dijk, Esko" <esko.dijk@philips.com> Fri, 04 November 2011 11:00 UTC

Return-Path: <esko.dijk@philips.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 37CD321F8C17 for <core@ietfa.amsl.com>; Fri, 4 Nov 2011 04:00:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 bASnDKpmM+ws for <core@ietfa.amsl.com>; Fri, 4 Nov 2011 04:00:36 -0700 (PDT)
Received: from AM1EHSOBE003.bigfish.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) by ietfa.amsl.com (Postfix) with ESMTP id DCAF921F8C11 for <core@ietf.org>; Fri, 4 Nov 2011 04:00:35 -0700 (PDT)
Received: from mail115-am1-R.bigfish.com (10.3.201.252) by AM1EHSOBE003.bigfish.com (10.3.204.23) with Microsoft SMTP Server id 14.1.225.22; Fri, 4 Nov 2011 11:00:17 +0000
Received: from mail115-am1 (localhost.localdomain [127.0.0.1]) by mail115-am1-R.bigfish.com (Postfix) with ESMTP id 74F4FF8838D; Fri, 4 Nov 2011 11:00:27 +0000 (UTC)
X-SpamScore: -49
X-BigFish: VPS-49(zz217bL15d6O9251J1447M542M1432Nzz1202hzz1033IL8275dhz2dh2a8h668h839h944h61h)
X-Spam-TCS-SCL: 0:0
X-Forefront-Antispam-Report: CIP:157.55.7.222; KIP:(null); UIP:(null); IPVD:NLI; H:mail.philips.com; RD:none; EFVD:NLI
X-FB-SS: 0,
Received: from mail115-am1 (localhost.localdomain [127.0.0.1]) by mail115-am1 (MessageSwitch) id 1320404427145735_13148; Fri, 4 Nov 2011 11:00:27 +0000 (UTC)
Received: from AM1EHSMHS005.bigfish.com (unknown [10.3.201.251]) by mail115-am1.bigfish.com (Postfix) with ESMTP id 1A78E48004F; Fri, 4 Nov 2011 11:00:27 +0000 (UTC)
Received: from mail.philips.com (157.55.7.222) by AM1EHSMHS005.bigfish.com (10.3.207.105) with Microsoft SMTP Server (TLS) id 14.1.225.22; Fri, 4 Nov 2011 11:00:16 +0000
Received: from 011-DB3MPN1-013.MGDPHG.emi.philips.com ([169.254.3.171]) by 011-DB3MMR1-001.MGDPHG.emi.philips.com ([10.128.28.51]) with mapi id 14.01.0339.002; Fri, 4 Nov 2011 11:00:33 +0000
From: "Dijk, Esko" <esko.dijk@philips.com>
To: Kovatsch Matthias <kovatsch@inf.ethz.ch>, Likepeng <likepeng@huawei.com>
Thread-Topic: [core] Status of Blockwise Transfers
Thread-Index: AcyTA1LLgF2apeWtTByzRREkH8/sygEtchlQAA/NDpQAAOAYEAC2ZLlg
Date: Fri, 04 Nov 2011 11:00:32 +0000
Message-ID: <031DD135F9160444ABBE3B0C36CED618E387@011-DB3MPN1-013.MGDPHG.emi.philips.com>
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>
In-Reply-To: <55877B3AFB359744BA0F2140E36F52B513833019@MBX10.d.ethz.ch>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [194.171.252.101]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: philips.com
Cc: "core@ietf.org" <core@ietf.org>
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: Fri, 04 Nov 2011 11:00:37 -0000

Thank you both for your comments.

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

Still, it's not "arbitrarily pick a status code". Even though the intermediate per-block status codes are not the status for the final operation, they're still needed. E.g. if the Nth block of a blockwise PUT returns 4.13 or 5.00 the client knows to stop sending further blocks.
We could look at it in another way: in essence the 2.01 and 2.04 codes from core-coap are re-used by core-block as per-block status codes slightly different meanings:

        2.01  Will Be Created after successfully completing this blockwise operation, Please Continue
        2.04    Will Be Changed after successfully completing this blockwise operation, Please Continue

at least for atomic blockwise PUT/POST. So the codes have some flavour of HTTP 100 Continue as well and an early indication of what would happen.

regards,
Esko

-----Original Message-----
From: Kovatsch Matthias [mailto:kovatsch@inf.ethz.ch]
Sent: Monday 31 October 2011 20:24
To: Likepeng; Dijk, Esko; core@ietf.org
Subject: 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


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.