Re: [netmod] yang next issue #46 binary encoding support
Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Fri, 29 March 2019 16:17 UTC
Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0346912003E for <netmod@ietfa.amsl.com>; Fri, 29 Mar 2019 09:17:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] 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 7MB5Yp4z9La9 for <netmod@ietfa.amsl.com>; Fri, 29 Mar 2019 09:17:27 -0700 (PDT)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AD33412001B for <netmod@ietf.org>; Fri, 29 Mar 2019 09:17:26 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 4D55D747; Fri, 29 Mar 2019 17:17:25 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id 0YnmYCCRDmPL; Fri, 29 Mar 2019 17:17:25 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Fri, 29 Mar 2019 17:17:25 +0100 (CET)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by hermes.jacobs-university.de (Postfix) with ESMTP id 36ED9200A8; Fri, 29 Mar 2019 17:17:25 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10028) with ESMTP id gKofj_xB-a-t; Fri, 29 Mar 2019 17:17:24 +0100 (CET)
Received: from exchange.jacobs-university.de (sxchmb03.jacobs.jacobs-university.de [10.70.0.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "exchange.jacobs-university.de", Issuer "DFN-Verein Global Issuing CA" (verified OK)) by hermes.jacobs-university.de (Postfix) with ESMTPS id C88C9200A7; Fri, 29 Mar 2019 17:17:24 +0100 (CET)
Received: from anna.localdomain (10.50.218.117) by sxchmb03.jacobs.jacobs-university.de (10.70.0.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1591.10; Fri, 29 Mar 2019 17:17:24 +0100
Received: by anna.localdomain (Postfix, from userid 501) id D986D3007A3A47; Fri, 29 Mar 2019 17:17:23 +0100 (CET)
Date: Fri, 29 Mar 2019 17:17:23 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Andy Bierman <andy@yumaworks.com>
CC: NetMod WG <netmod@ietf.org>
Message-ID: <20190329161723.xuh3avyrdepdw3px@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Andy Bierman <andy@yumaworks.com>, NetMod WG <netmod@ietf.org>
References: <20190329111930.k2dt6wctsazxa7rp@anna.jacobs.jacobs-university.de> <CABCOCHS=VhfpKHYhB_eQ8Y9i5FK6+R1q4a8Soc=z=HRYJLV5OA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CABCOCHS=VhfpKHYhB_eQ8Y9i5FK6+R1q4a8Soc=z=HRYJLV5OA@mail.gmail.com>
User-Agent: NeoMutt/20180716
X-ClientProxiedBy: SXCHMB04.jacobs.jacobs-university.de (10.70.0.156) To sxchmb03.jacobs.jacobs-university.de (10.70.0.155)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/f2O2vQYSv1F6ZPLWpzwu3fvD4V8>
Subject: Re: [netmod] yang next issue #46 binary encoding support
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Mar 2019 16:17:31 -0000
On Fri, Mar 29, 2019 at 09:07:18AM -0700, Andy Bierman wrote: > On Fri, Mar 29, 2019 at 4:19 AM Juergen Schoenwaelder < > j.schoenwaelder@jacobs-university.de> wrote: > > > Hi, > > > > this is issue is closed but I wonder whether this is correct. I have > > several questions looking at the issue on github: > > > > - Why is this not a YANG issue? > > - Which workaround is better? > > - Why is this tagged as a NETCONF issue? > > > > > Did you mean this should be NETCONF issue? > It is more of a protocol problem then a modeling problem. > The goal is to use the model unaltered. I think it would be valuable if say the definition of ipv4-address could state that a canonical binary representation is of type binary { length 4; }. Doing this is only meaningful for some types but it would allow to add more binary representations over time. > > If we want to support binary encodings, we need to allow modelers to > > define which types map to a canonical binary representation in > > addition to the canonical string representation. As stated in the > > issue description, hard-wiring some types in the encoding > > specifications is very limited. > > > > In terms of backwards compatibility, this issue should IMHO be tagged > > high (adding binary encoding for some types does not cause any > > backwards compatibility problem since so far we have only strings). > > > > > Not so sure. > The base64 encoding could look like a valid string. > The receiver must know a binary type is being sent (XML and JSON both fail > here, but not CBOR). I am talking about CBOR, not about XML or JSON. I want to provide hints to CBOR (or similar binary encodings) that values can be represented in a different format. I do not expect these hints to be used by XML or JSON. If you need binary encoding efficiency, use CBOR instead of JSON. > > While I do not have a solution proposal, I think this issue is worth > > to look at and we should not close it right now. > > > > > I have a solution proposal, but I have not implemented it yet, so it it not > detailed... > > Both sender and receiver need to agree on the binary encoding and how the > data is tagged as binary. > > This expired draft should address that problem: > https://tools.ietf.org/html/draft-mahesh-netconf-binary-encoding-01 > > For every type T that they agree on, there are standard T.b2y() and T.y2b() > conversion functions. > There are also some extensions to define conversion templates so vendors > can add their own types. > > The YANG modules do not need to actually be altered. The peers will > negotiate the > set of types that will be sent as binary when the session starts. > The receiver knows T and the SID for each object, and will accept either > the YANG or binary encoding. Sounds complex for me to negotiate this. I rather say once that a binary encoding can ship an IPv6 address as type binary { length 16; } and then CBOR will simply do the right thing. /js -- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany Fax: +49 421 200 3103 <https://www.jacobs-university.de/>
- [netmod] yang next issue #46 binary encoding supp… Juergen Schoenwaelder
- Re: [netmod] yang next issue #46 binary encoding … Andy Bierman
- Re: [netmod] yang next issue #46 binary encoding … Juergen Schoenwaelder
- Re: [netmod] yang next issue #46 binary encoding … Andy Bierman
- Re: [netmod] yang next issue #46 binary encoding … Juergen Schoenwaelder
- Re: [netmod] yang next issue #46 binary encoding … Andy Bierman
- Re: [netmod] yang next issue #46 binary encoding … Mahesh Jethanandani
- Re: [netmod] yang next issue #46 binary encoding … Rob Wilton (rwilton)
- Re: [netmod] yang next issue #46 binary encoding … Kent Watsen