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

Robert Wilton <rwilton@cisco.com> Mon, 09 July 2018 16:39 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 50889130E4D; Mon, 9 Jul 2018 09:39:13 -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_MED=-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 vQv33LG4uBT5; Mon, 9 Jul 2018 09:39:11 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F4135130E2A; Mon, 9 Jul 2018 09:39:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1746; q=dns/txt; s=iport; t=1531154351; x=1532363951; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=mOwTiA2DGTb547b8A8/KLNe9UaH6HZY4JI6uaEewkSI=; b=FdITSQIxPEY/sJ1RrZeNwrLU+uLo9o4UGFQCBPqH0DjAmLtrqxeXQ9UY ysje7MbuPW6YqARrj2nv0YwHNwTjJhrHKoEdPFKlfF2V+XnxbJt67D7Xr vK2yArKopi4t0ENo+glnCdN8dwpW4oDUV2xJekOqW7T4u7HFsnzDeTSF4 8=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0B0AQAdj0Nb/xbLJq1dGQEBAQEBAQEBAQEBAQcBAQEBAYUqKIN6iGONNAgilywLhGwCgmY4FAECAQECAQECbSiFNgEBAQECASMPAQVBEAkCDgoCAiYCAlcGDQYCAQGDHIF4CI52m0iCHIRbg2+BOoELiTk/gQ8nDIJch3uCVQKZTwmPHgaIFoVHjDyFVIFYIYFSMxoIGxWDJIIhAxeOGD4wjlEBAQ
X-IronPort-AV: E=Sophos;i="5.51,330,1526342400"; d="scan'208";a="5069401"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 16:39:07 +0000
Received: from [10.63.23.105] (dhcp-ensft1-uk-vla370-10-63-23-105.cisco.com [10.63.23.105]) by aer-core-4.cisco.com (8.15.2/8.15.2) with ESMTP id w69Gd5B4026579; Mon, 9 Jul 2018 16:39:06 GMT
To: Carsten Bormann <cabo@tzi.org>
Cc: Michel Veillette <Michel.Veillette@trilliant.com>, "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> <46e3466e-4ac6-4108-6490-c81891560648@cisco.com> <A4981CB6-5D97-4069-BEDB-1E5EEB1A5EE9@tzi.org>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <acea6cab-9da3-6543-454b-a857c269cf52@cisco.com>
Date: Mon, 09 Jul 2018 17:39:05 +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: <A4981CB6-5D97-4069-BEDB-1E5EEB1A5EE9@tzi.org>
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/q4-giYEaDUVfZihTOzgsjCXMPuk>
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:39:14 -0000


On 09/07/2018 17:20, Carsten Bormann wrote:
> On Jul 9, 2018, at 18:09, Robert Wilton <rwilton@cisco.com> wrote:
>> ambiguity as to whether the top level nodes are using absolute or delta sids
> We don’t need to be able to include “absolute SIDs”(1) into the delta positions in the encoding.
> The deltas are always deltas.  They just happen to be relative to a context SID at the top of the tree; mostly, that is 0 (but that’s what we are also discussing here).
Apologies if my terminology was confusing.

I agree, that we are discussing whether the parent of the top level 
nodes should always have a SID of 0, or otherwise if it should be 
explicitly specified.

For me, one of the big advantages of CBOR over schema based encodings 
like protobuf, is that the structure of the encoded data is self 
describing.  I think that it is worth spending a few extra bytes in the 
encoding to get this property.  So, if I get a bad CBOR message that I 
can't interpret then I can easily convert it into a human readable 
structure to debug the problem (or know the CBOR itself is 
invalid/corrupt).  I see that requiring external knowledge for the 
parent SID of the top level nodes seems to take a step away from that.

E.g. if the device accidentally gives a response for the wrong node in 
the tree, and if the response relies on the SID in the request to be 
fully decodeable then the response will somewhat look like garbage and 
it will be harder to debug.  Is this worth saving a couple of bytes for?

Thanks,
Rob


>
> Grüße, Carsten
>
> (1) there is no need for this term; SIDs are SIDs and SID deltas are SID deltas.  The map key positions in YANG-CBOR are always SID deltas.
>
>
> .
>