Re: [core] Comments on draft-ietf-core-yang-cbor-06

Robert Wilton <rwilton@cisco.com> Mon, 09 July 2018 16:09 UTC

Return-Path: <rwilton@cisco.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 83482130E48; Mon, 9 Jul 2018 09:09:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.511
X-Spam-Level:
X-Spam-Status: No, score=-14.511 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w0zaSywtAWu0; Mon, 9 Jul 2018 09:09:48 -0700 (PDT)
Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E79D7130E31; Mon, 9 Jul 2018 09:09:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4835; q=dns/txt; s=iport; t=1531152588; x=1532362188; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=r4lVzlO9wgUw5viryUrKpw78jwGnVUqwN+dKAqqffog=; b=fcnJLU6PVx7HXGeoKiV7GI9lI9Wz45ST2XCekqY0z6Ne3MTyDjmutTwO x3JLUyTk3gU6G/qojCm2WQUr8ggSkTjwSTGQsqiir0I7pP2XhuJpUXUsq zXGLLUGok9VYH9UNaatpU1np4mlce5FNTbhr/tSrLHzXqGvNIJDLFFepF M=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0B0AQDOh0Nb/xbLJq1dGQEBAQEBAQEBAQEBAQcBAQEBAYQrfyiDeohjjTQqlywLGAuESQKCZjcVAQIBAQIBAQJtHAyFNgEBAQECAQEBIQ8BBTYLDAQJAhEEAQEBAgIjAwICJx8JCAYBDAYCAQGDHAGBdwgPjlmbSIIchFuDboE6gQuJOT+BDyeCaIMYAQECAYReglUCiAGEUYEqi1MJhgiCLDiGMgaBQkOGESWFIoo4ggSFVIFXIoFSMxoIGxU7gmkJghsXg0WFFIU/PjABAQGOTgEB
X-IronPort-AV: E=Sophos;i="5.51,330,1526342400"; d="scan'208";a="5008189"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 16:09:43 +0000
Received: from [10.63.23.105] (dhcp-ensft1-uk-vla370-10-63-23-105.cisco.com [10.63.23.105]) by aer-core-1.cisco.com (8.15.2/8.15.2) with ESMTP id w69G9hxP017716; Mon, 9 Jul 2018 16:09:43 GMT
To: Michel Veillette <Michel.Veillette@trilliant.com>, Carsten Bormann <cabo@tzi.org>
Cc: "draft-ietf-core-yang-cbor@ietf.org" <draft-ietf-core-yang-cbor@ietf.org>, "core@ietf.org" <core@ietf.org>
References: <6ff65b2e-ab4f-5d92-8fff-68c08584682e@cisco.com> <DM5PR06MB2777C2ABB330D1054D2E1D8D9A440@DM5PR06MB2777.namprd06.prod.outlook.com> <E765AC20-41BE-4235-B858-6904C9BA63EF@tzi.org> <DM5PR06MB27772BC8B389ED32841725A19A440@DM5PR06MB2777.namprd06.prod.outlook.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <46e3466e-4ac6-4108-6490-c81891560648@cisco.com>
Date: Mon, 09 Jul 2018 17:09:43 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <DM5PR06MB27772BC8B389ED32841725A19A440@DM5PR06MB2777.namprd06.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/E6UwRVGVQ2IjbKrsQKtrnOtp9r0>
Subject: Re: [core] Comments on draft-ietf-core-yang-cbor-06
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.27
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: <https://mailarchive.ietf.org/arch/browse/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, 09 Jul 2018 16:09:51 -0000


On 09/07/2018 16:39, Michel Veillette wrote:
> Hi Carsten
>
> CoMI for example, uses delta for the first root data node based on the requested SID.
> In the following example, the +2 is relative to SID 1721 which is part of the requested URI (i.e. a5).
> This requested SID need to be maintained in the client state in order to process the response.
>
> https://tools.ietf.org/html/draft-ietf-core-comi-03#section-5.2.3.1
>
>     REQ: GET example.com/c/a5
>
>     RES: 2.05 Content (Content-Format: application/yang-value+cbor)
>     {
>       +2 : "2014-10-26T12:16:51Z",   / current-datetime SID 1723 /
>       +1 : "2014-10-21T03:00:00Z"    / boot-datetime SID 1722 /
>     }
OK, so the JSON YANG encoding mitigates the equivalent issue by always 
including the name of the element being returned.

E.g. presumably something like this:

    RES: 2.05 Content (Content-Format: application/yang-value+cbor)
    a5 : {
        +2 : "2014-10-26T12:16:51Z",   / current-datetime SID 1723 /
        +1 : "2014-10-21T03:00:00Z"    / boot-datetime SID 1722 /
      }

But I presume that you have already considered this previously and have 
rejected it for compactness reasons.

I'm not sure that I'm a big fan of the ambiguity as to whether the top 
level nodes are using absolute or delta sids.  Another choice would be 
to define a CBOR tag that explicitly reports the parent SID, although 
that seems more convoluted that just always including the name ...

Thanks,
Rob


>
> Regards,
> Michel
>
> -----Original Message-----
> From: Carsten Bormann [mailto:cabo@tzi.org]
> Sent: Monday, July 9, 2018 11:23 AM
> To: Michel Veillette <Michel.Veillette@trilliant.com>
> Cc: Robert Wilton <rwilton@cisco.com>; draft-ietf-core-yang-cbor@ietf.org; core@ietf.org
> Subject: Re: [core] Comments on draft-ietf-core-yang-cbor-06
>
> It is much less confusing to always talk of deltas in the structure.
>
> Just say that the context SID value (the one that the delta is computed from) is 0 at the root of a tree.
>
> Grüße, Carsten
>
>
>> On Jul 9, 2018, at 17:18, Michel Veillette <Michel.Veillette@trilliant.com> wrote:
>>
>> Hi Robert
>>   
>> Andy also asked for a clarification about the encoding of the root data node identifier (absolute vs. delta).
>> Section 4.4.1. have a sentence addressing this topic.
>>     It is important to note that the protocol or method
>>     using this mapping may carry a parent SID or may have the knowledge
>>     of this parent SID based on its context.  In these cases, delta
>>     encoding can be performed based on this parent SID which minimizes
>>     the size of the encoded data.
>>   
>> A similar sentence need to be added to section 4.2.1.
>> We also need to clarify that the protocol or method using this encoding must mandate which approach is implemented, the data serialized don’t carry this information.
>>   
>> Regards,
>> Michel
>>   
>> From: Robert Wilton [mailto:rwilton@cisco.com]
>> Sent: Monday, July 9, 2018 11:00 AM
>> To: draft-ietf-core-yang-cbor@ietf.org; core@ietf.org
>> Subject: Comments on draft-ietf-core-yang-cbor-06
>>   
>> Hi,
>>
>> I've read this draft, and think that it is well written.
>>
>> There is one area of the draft that is somewhat unclear to me when using SID encodings:  Is the root node(s) of a request or a response always an absolute SID value, or could it still be a delta?
>>
>> In particular:
>>
>> Sec 2.1 indicates that the translation to/from SID deltas is stateless, which implies to me that the root node(s) of a request/response would always be an absolute SID value.
>>
>> Sec 4.2.1 gives an example using a absolute SID for the top node.  It then has this text: "
>>
>>     On the other hand, if the serializer is aware of the parent SID, 1716
>>     in the case 'system-state' container, root data nodes are encoded
>>     using deltas.
>> "
>> I think that it is quite plausible that the serializer may know the SIDs for all nodes in the data tree, which the text implies it could then use a relative SID for the top node.  Particularly, if the top level node was explicit from the request.
>>
>> Hence, I think that this draft could probably benefit in being more explicit on exactly when a top level node uses an absolute SID, and in what scenarios it may end up using a a relative SID.  If this distinction is down to the protocol being used, then perhaps that could be stated?
>>
>> One other nit:
>>
>> Section 4.4.1 says "delta encoding can be performed", but I think that this should probably be "delta encoding MUST be performed".
>>
>> Thanks,
>> Rob
>>   
>>
>>   
>>
>> _______________________________________________
>> core mailing list
>> core@ietf.org
>> https://www.ietf.org/mailman/listinfo/core