Re: [core] yang cbor encoding without SID

Alexander Pelov <alexander@ackl.io> Mon, 24 July 2017 08:55 UTC

Return-Path: <alexander@ackl.io>
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 C429A12EACC for <core@ietfa.amsl.com>; Mon, 24 Jul 2017 01:55:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
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 3SecWFvmzhoS for <core@ietfa.amsl.com>; Mon, 24 Jul 2017 01:55:41 -0700 (PDT)
Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:c:538::196]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B5DDC129ACD for <core@ietf.org>; Mon, 24 Jul 2017 01:55:40 -0700 (PDT)
Received: from [IPv6:2001:660:7301:3728:65dd:b049:5cc5:86db] (unknown [IPv6:2001:660:7301:3728:65dd:b049:5cc5:86db]) (Authenticated sender: alex@ackl.io) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id A4BBC1720E0; Mon, 24 Jul 2017 10:55:37 +0200 (CEST)
From: Alexander Pelov <alexander@ackl.io>
Message-Id: <E1FA42D8-6FD1-4878-AF8A-AB4847BCC202@ackl.io>
Content-Type: multipart/alternative; boundary="Apple-Mail=_498985C0-50D5-4C08-9C3A-33DE96749F77"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Date: Mon, 24 Jul 2017 10:55:36 +0200
In-Reply-To: <74bbae503e0cfb3d689ea2a737a5e7f4@xs4all.nl>
Cc: Andy Bierman <andy@yumaworks.com>, Core <core@ietf.org>
To: consultancy@vanderstok.org
References: <MWHPR06MB2317B38A39779C05D9E75485FEA40@MWHPR06MB2317.namprd06.prod.outlook.com> <CABCOCHQDpSsfMgCuzGSCafhrvtP3yx_BP4MxFDc29VHbyPdKnQ@mail.gmail.com> <MWHPR06MB2317092747A52FB815570C7DFEA40@MWHPR06MB2317.namprd06.prod.outlook.com> <85B187B2-04DF-4C6B-A36C-FCC7FC2D3B79@tzi.org> <CABCOCHSOi8G2E5m_eyHZ6d9Ym6=sTwbqbtTgQsNEwDqe+wckTw@mail.gmail.com> <BN6PR06MB2308B8B1F80F42C24FED4D77FEA50@BN6PR06MB2308.namprd06.prod.outlook.com> <CABCOCHT1Fia=oW1kckY3tDtSKAcOnqP_pZq_wKTtD-W=nHK4zg@mail.gmail.com> <BN6PR06MB23088C017D8B90385667998FFEA50@BN6PR06MB2308.namprd06.prod.outlook.com> <20170722120258.GA22600@elstar.local> <9BC4E6D5-EB85-474F-A52B-BC170A962FC5@tzi.org> <20170722140230.GA22751@elstar.local> <CABCOCHS87tP2ErEXRpyZHszXoMDUKpy-n3c=9sBUNV8W_XzwCg@mail.gmail.com> <74bbae503e0cfb3d689ea2a737a5e7f4@xs4all.nl>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/sgtM2EapQh-O7olwHBsD_XTuIUI>
Subject: Re: [core] yang cbor encoding without SID
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
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, 24 Jul 2017 08:55:44 -0000

Dear all,

Section "4.2.2. Member names as keys" of draft-ietf-core-yang-cbor-04 describes how you achieve what you want in your demand.

I think there is no point in continuing the discussion of should we include something that is already there. You can start using it as it is today.

Also, we will be doing an interop event by the end of August. Please, make sure to participate to this event, as without running code, a specification serves no useful purpose.

Alexander




> Le 24 juil. 2017 à 08:42, peter van der Stok <stokcons@xs4all.nl> a écrit :
> 
> For case 3, CoMI with string identifiers, I recommend to send hashes and fall back to strings when a clash occurs.
> Strings are only used for clashing names, all others are sent as hashes.
> For an installation with 1000 names and 30 bit hash, the clash probability is less than 5*10^-4.
> With little extra code, string identifiers are only necessary when 3 or more names clash to the same hash value.
> The probability of such a clash with 30 bit hash and 1000 names is less than 5*10^-8.
> For comparison, the probability that a given flight will crash is 10^-7.
> 
> Peter
> 
> Andy Bierman schreef op 2017-07-23 20:39:
>> On Sat, Jul 22, 2017 at 7:02 AM, Juergen Schoenwaelder
>> <j.schoenwaelder@jacobs-university.de> wrote:
>>> On Sat, Jul 22, 2017 at 03:37:33PM +0200, Carsten Bormann wrote:
>>>>> Anyway, I do not want to prevent people from getting experience
>>> with
>>>>> this as long as there is a way to use YANG-CBOR without SID.
>>> Make SID
>>>>> an additional optimization. If you want to require SID for CoMI,
>>> fine.
>>>>> Then in the worst case CoMI goes with the fate of SIDs.
>>>> Sounds good to me.
>>>> So we would have the following levels of optimization:
>>>> 1 RESTCONF with JSON-YANG
>>>> 2 RESTCONF with CBOR-YANG
>>> Option #2 makes sense to investigate, i.e., to find out how much
>>> efficiency gain there is. Someone would need to implement both and
>>> provide hard numbers. I would expect a certain gain on the
>>> encoding/decoding side but then one needs to lock at the whole
>>> picture. But I think this is a reasonable experiment to
>>> make. Volunteers?
>> Isn't CBOR-YANG covered by changes to the current document?
>> IMO, the following protocol-independent media types should be defined:
>> (2)
>>  application/yang-data+cbor : exact same identifier and instance
>> value mappings as XML and JSON versions of yang-data.
>> (4)
>>  application/yang-data+cbor.sid : identifier and instance value
>> mappings according to SID registry
>> Efficiency in system design is not limited to the protocol.
>> Designers of YANG modules for constrained devices can use numeric
>> types over string types
>> and increase the efficiency of the CBOR encoding.
>> The main use-case for CBOR for RESTCONF right now is pushing lots of
>> operational state telemetry data
>> off of routers. I can imagine routers using
>> application/yang-data+cbor.sid a little at a time, for spot solutions.
>> Some might want to see the technology mature before putting it in
>> production networks.
>>>> 3 COMI with string identifiers
>>>> 4 COMI with SIDs
>>> Up to COMI people to decide, perhaps #4 is sufficient if COMI's
>>> scope
>>> is restricted to very constrained devices or boxes using highly
>>> limited links and we do not need #3. All depends on what is the real
>>> target for COMI.
>>>> (There might also be NETCONF with CBOR-YANG, which doesn’t quite
>>> fit
>>>> into the above hierarchy.)
>>> NETCONF has no way to negotiate different content encodings, NETCONF
>>> is pretty much hard wired to use XML since the whole protocol is
>>> encoded in XML.
>>> /js
>> Andy
>>> --
>>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen |
>>> Germany
>>> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/
>>> [1]>
>>> _______________________________________________
>>> core mailing list
>>> core@ietf.org <mailto:core@ietf.org>
>>> https://www.ietf.org/mailman/listinfo/core <https://www.ietf.org/mailman/listinfo/core> [2]
>> Links:
>> ------
>> [1] http://www.jacobs-university.de/ <http://www.jacobs-university.de/>
>> [2] https://www.ietf.org/mailman/listinfo/core <https://www.ietf.org/mailman/listinfo/core>
>> _______________________________________________
>> core mailing list
>> core@ietf.org <mailto:core@ietf.org>
>> https://www.ietf.org/mailman/listinfo/core <https://www.ietf.org/mailman/listinfo/core>
> 
> _______________________________________________
> core mailing list
> core@ietf.org <mailto:core@ietf.org>
> https://www.ietf.org/mailman/listinfo/core <https://www.ietf.org/mailman/listinfo/core>