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

Andy Bierman <andy@yumaworks.com> Mon, 09 July 2018 15:58 UTC

Return-Path: <andy@yumaworks.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 6A66F130E4A for <core@ietfa.amsl.com>; Mon, 9 Jul 2018 08:58:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 uX0-gRNPoM3P for <core@ietfa.amsl.com>; Mon, 9 Jul 2018 08:58:30 -0700 (PDT)
Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com [IPv6:2a00:1450:4010:c07::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 54DB9130DC2 for <core@ietf.org>; Mon, 9 Jul 2018 08:58:30 -0700 (PDT)
Received: by mail-lf0-x235.google.com with SMTP id g6-v6so4983907lfb.11 for <core@ietf.org>; Mon, 09 Jul 2018 08:58:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dlelu3xfLDRBMF23mCn9ZVYjWUT9Tf/ZpxxWo126qio=; b=oRZDFqOapWT4n/5F7CE9qSiKrzeADODVMju61sR9tpj29eXm39ZJPyzGoSvbCd63Rx /NSdovOvcIqCLJsP0ENmhXveTTjhA3A46asOdzJ81Q8MV2eoKZNWA6BsdBacxJMCnxk0 ROxDUcyD4n3wG5ScINRKE3LH4sp01uF2/c0W6Ku/LuLQsQqKAQg4cQzsmmdFP+TfDI7x 1iISAuU+jTOgCDawbkelt4gtEnikHE5Sg1mTv4I99RDXtuhwi3CPcYACNETUh3m3WIqz M1SjXX8E5fBu3lDqLjn6xIWEgcD84l+3IgW6dLjurFx5ctUysBhGXS4O/+3MsJC5SiZI tFoA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dlelu3xfLDRBMF23mCn9ZVYjWUT9Tf/ZpxxWo126qio=; b=Dvi3JS92dCO4T7KWP6dqq9ZXKkeZJLvxGQO3VIKkivErT/7t0grEl61KJ80p7Q21Ig M9fZEl91cgIumr8Phv1mUanJ6pZMPs9Pwa3IwTpZLjQOUUC6hKHGQNUYrazTwuCy9Q+L WaK7RtstKkde1OXj3yTvxtDT4vtaPi5iO8d95vuHFqsr5h23AS8Hiy/tkPeVXVtnRQBm JZxBxLcvFOmdKP3fXjRv+xA5/KO22bvCCGCxqlM8KdTqiIZHqcM1s88XMnhsLwY9RdJH SIKsvLMnl7ohU1O/he4rlO06ECwaqgiojv/bgDJfanjHEbgUrLvmQs+0TiOVE41l9NZ1 yJfQ==
X-Gm-Message-State: APt69E0GKRUC8jeULa0Bnx6EhLi5k8+dakoXlY2TuZoDLmJUmrzQTvct GqPlppOT5Lm7h1BlkuAY46XEUQeDmqN24Es06aqKng==
X-Google-Smtp-Source: AAOMgpdqyTvC4PMCfua5ELdq3RRptKV+cIkLW32seRJaIWBXFc02skiU/vkkDVIcgM1fxRBkS151bh8/eQ+4eabgByU=
X-Received: by 2002:a19:204f:: with SMTP id g76-v6mr132955lfg.66.1531151908423; Mon, 09 Jul 2018 08:58:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:aa46:0:0:0:0:0 with HTTP; Mon, 9 Jul 2018 08:58:27 -0700 (PDT)
In-Reply-To: <f29d52d7-2b04-8acf-4016-f4b8ecdc7f00@cisco.com>
References: <6ff65b2e-ab4f-5d92-8fff-68c08584682e@cisco.com> <DM5PR06MB2777C2ABB330D1054D2E1D8D9A440@DM5PR06MB2777.namprd06.prod.outlook.com> <E765AC20-41BE-4235-B858-6904C9BA63EF@tzi.org> <f29d52d7-2b04-8acf-4016-f4b8ecdc7f00@cisco.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Mon, 09 Jul 2018 08:58:27 -0700
Message-ID: <CABCOCHQiqu_pBw2DAsNn=f24DZkjkuLGuksDe5zhBeL77B9WGw@mail.gmail.com>
To: Robert Wilton <rwilton=40cisco.com@dmarc.ietf.org>
Cc: Carsten Bormann <cabo@tzi.org>, 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>
Content-Type: multipart/alternative; boundary="00000000000099667505709315c7"
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/tmfFvbrCUPPF1ifYWR3R-uqKt2U>
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 15:58:35 -0000

On Mon, Jul 9, 2018 at 8:37 AM, Robert Wilton <
rwilton=40cisco.com@dmarc.ietf.org> wrote:

>
>
> On 09/07/2018 16:23, Carsten Bormann wrote:
>
>> 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.
>>
> Yes, I completely agree.
>
> I'm not convinced that it is worth optimizing for the case where the
> protocol knows the SID of the parent node, and hence deltas can be used for
> the top node.  Always using 0 as the parent of the root node just seems to
> facilitate simpler interop.  However, it is worth adding a caveat to my
> statement that I'm reviewing the encoding more from a RESTCONF protocol
> perspective rather than constrained devices so simplicity is more important
> me to saving a small number of bytes.
>
> If saving those few extra bytes for delta SIDs over absolute SIDs for the
> top level SIDs is critical then I think that another solution would be to
> put an extra non-presence container in the data model.  Hence the
> NP-container uses a absolute SID and all children use deltas again. Of
> course, this depends on the data model being written in CBOR+SID friendly
> way.
>
>
IMO it is a really bad idea to make the payload completely unusable unless
the top-node SID is
saved in some implementation-specific way.   Toolchains have a way of
growing over time,
so even if there is just 1 monolithic application now (so of course it can
remember the SID),
that may not be the case in the future.



Thanks,
> Rob
>
>
Andy


>
>
>> Grüße, Carsten
>>
>>
>> On Jul 9, 2018, at 17:18, Michel Veillette <Michel.Veillette@trilliant.co
>>> m> 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
>>>
>> .
>>
>>
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core
>