Re: [core] draft coap-size

Likepeng <likepeng@huawei.com> Mon, 07 November 2011 10:04 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 B404B21F8ABD for <core@ietfa.amsl.com>; Mon, 7 Nov 2011 02:04:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.196
X-Spam-Level:
X-Spam-Status: No, score=-3.196 tagged_above=-999 required=5 tests=[AWL=-0.800, 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 J4Zi3oIivdLg for <core@ietfa.amsl.com>; Mon, 7 Nov 2011 02:04:09 -0800 (PST)
Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [119.145.14.64]) by ietfa.amsl.com (Postfix) with ESMTP id 98FC921F8ACE for <core@ietf.org>; Mon, 7 Nov 2011 02:04:09 -0800 (PST)
Received: from huawei.com (szxga05-in [172.24.2.49]) by szxga05-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LUA00FLEBW23W@szxga05-in.huawei.com> for core@ietf.org; Mon, 07 Nov 2011 18:02:26 +0800 (CST)
Received: from szxrg02-dlp.huawei.com ([172.24.2.119]) by szxga05-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LUA001P3BVTXP@szxga05-in.huawei.com> for core@ietf.org; Mon, 07 Nov 2011 18:02:26 +0800 (CST)
Received: from szxeml207-edg.china.huawei.com ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.1.9-GA) with ESMTP id AEU56299; Mon, 07 Nov 2011 18:02:25 +0800
Received: from SZXEML411-HUB.china.huawei.com (10.82.67.138) by szxeml207-edg.china.huawei.com (172.24.2.59) with Microsoft SMTP Server (TLS) id 14.1.270.1; Mon, 07 Nov 2011 18:02:24 +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; Mon, 07 Nov 2011 18:02:16 +0800
Date: Mon, 07 Nov 2011 10:02:15 +0000
From: Likepeng <likepeng@huawei.com>
In-reply-to: <4EB66AC7.1090700@ericsson.com>
X-Originating-IP: [172.24.2.40]
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Message-id: <34966E97BE8AD64EAE9D3D6E4DEE36F2D0CB9E@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] draft coap-size
Thread-index: AQHMm+qB3mvH55N6pUWVHEWVt7gb15WesXUXgAB5jICAAgPPVw==
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
X-CFilter-Loop: Reflected
References: <4EB58338.3080609@ericsson.com> <34966E97BE8AD64EAE9D3D6E4DEE36F2D08EF8@szxeml525-mbs.china.huawei.com> <4EB66AC7.1090700@ericsson.com>
Cc: "core@ietf.org" <core@ietf.org>
Subject: Re: [core] draft coap-size
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, 07 Nov 2011 10:04:10 -0000

Hi Salvatore,

>so you mean that a GET request including an empty Size option (or a
>Size=0) will always include some payload
>(i.e. the first block of the resource representation) or what...

If the GET request only includes Block option, server will return the indicated Block.

If the GET request includes Block option and an empty Size option (or Size=0), the
server will return the Size of the whole resource and the requested Block. Usually the
Size option will be sent in the first block request.

So, in this way, the added Size option will not affact the normal block behavior.

If this sounds reasonable, I will revise the draft to make it clear.

>I am OK with whatever you decide, but that should be clear in the text
>and consistent in all the spec.

Sure.

Thanks,
Kind Regards
Kepeng
________________________________________
发件人: Salvatore Loreto [salvatore.loreto@ericsson.com]
发送时间: 2011年11月6日 19:08
到: Likepeng
Cc: core@ietf.org
主题: Re: [core] draft coap-size

Hi,

thanks for answering my questions, see more in line below

cheers

--
Salvatore Loreto
www.sloreto.com



On 11/5/11 9:28 PM, Likepeng wrote:
> Hello Salvatore,
>
>> I support the definition of the Size option as I think it is a useful option to be used in conjunction with Block.
>> About the inclusion/merge of it in Block draft I don't care.
> Thanks for the review and the support.
> I would prefer to be merged with Block draft, but if the WG decides to be separate, that is also fine to me.
>
>> 1) In section 2.2
>>   The GET request including Size=0 is treated as a request to get the
>>   size of the resource representation (but not the resource payload).
>> this is a duplication as you can already obtain the size of the resource using the Link Forma "sz" attribute.
> Yes, but the resource size got from "sz" attribute is not accurate.
>
>> more the above paragraph is not fully consistent with the sentence in Section 4.2
>>   For a GET request, if it includes an empty Size option, the Size
>>   option MUST be included in the response.
>> the above sentence does not specify if the response include the actual resource representation or not.
> The response needs to include the actual resource representation for the indicated block number.
> I will fix the text.

so you mean that a GET request including an empty Size option (or a
Size=0) will always include some payload
(i.e. the first block of the resource representation) or what...

I am OK with whatever you decide, but that should be clear in the text
and consistent in all the spec

>
>> 2) the following two paragraphs in Section 2.2 are not completely clear at least to me:
>>   If the Size option is specified it SHOULD be accurate at that time,
>>   and SHOULD NOT be an estimate.
>>   But due to the dynamic change of the resource data, the Size may not
>>   be accurate.  If the value of Size option is not the same as the
>>   actual transmitted data, the recipient MUST take the size of the
>>   actual transmitted data as accurate, and ignore the Size option.  In
>>   case that the recipient gets all the data but it is still smaller
>>   than the announced Size, the recipient SHOULD stop the transmission.
>>   If the recipient finds out the transmitted data reaches the Size
>>   limit, and there's more data left, the recipient SHOULD continue to
>>  transmit the remaining data.
> I mean, for the dynamic data, during the transmission, the resource size may be changed.
>
> I can revise the text to say:
> If the Size option is specified, it MUST be accurate at that time.
>
> And remove the second paragraph, because it is more like the implementation recommendation or strategy.

I don't think is an implementation recommendation,
IMO it should completely clear what happens when the Size changes during
a transfer (i.e. GET request)
for example the server could include in one of the answer transferring
one of the blocks the new Size...
however it is not clear when the Size changes if the changes in the
resource are only at the end of it...
it can also happen that the changes have effected some of the blocks
already transmitted
so what would be the behavior in this case


Cheers
/Sal

>
> Kind Regards
> Kepeng
>
> 发件人: core-bounces@ietf.org [core-bounces@ietf.org] 代表 Salvatore Loreto [salvatore.loreto@ericsson.com]
> 发送时间: 2011年11月6日 2:40
> 到: core@ietf.org; draft-li-core-coap-size-option@tools.ietf.org
> 主题: [core] draft coap-size
>
>
> Hi there
>
> I have read the 02 version of the draft
> and I support the definition of the Size option as I think it is a useful option to be used in conjunction with Block.
> About the inclusion/merge of it in Block draft I don't care.
>
> some comments on the draft:
>
> 1) In section 2.2
>
>
>    The GET request including Size=0 is treated as a request to get the
>    size of the resource representation (but not the resource payload).
>
> this is a duplication as you can already obtain the size of the resource using the Link Forma "sz" attribute.
>
> more the above paragraph is not fully consistent with the sentence in Section 4.2
>
>
>    For a GET request, if it includes an empty Size option, the Size
>    option MUST be included in the response.
>
> the above sentence does not specify if the response include the actual resource representation or not.
>
>
> 2) the following two paragraphs in Section 2.2 are not completely clear at least to me:
>
>
>    If the Size option is specified it SHOULD be accurate at that time,
>    and SHOULD NOT be an estimate.
>
>
>    But due to the dynamic change of the resource data, the Size may not
>    be accurate.  If the value of Size option is not the same as the
>    actual transmitted data, the recipient MUST take the size of the
>    actual transmitted data as accurate, and ignore the Size option.  In
>    case that the recipient gets all the data but it is still smaller
>    than the announced Size, the recipient SHOULD stop the transmission.
>    If the recipient finds out the transmitted data reaches the Size
>    limit, and there's more data left, the recipient SHOULD continue to
>    transmit the remaining data.
>
> cheers
> Salvatore
>