Re: [netmod] [core] js review of draft-ietf-core-yang-cbor-12

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Wed, 08 April 2020 06:57 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 F11EB3A08C4; Tue, 7 Apr 2020 23:57:46 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=jacobsuniversity.onmicrosoft.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 ajdnIa9YrSrn; Tue, 7 Apr 2020 23:57:42 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on060b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::60b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3256A3A08C3; Tue, 7 Apr 2020 23:57:42 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bHT5xHSURC/s6ozgLgTKltPQRhEzqEBJx4Px5vbAmlE3SG41K1wS+cmdVvo5ILHFMV+zDHHGjeNVdsFYxmmoAWj5wiPSoO3DnB34VSgbTrvGaWz3Zg9aXP2xM2ftk7ECMr/1tOTx6z1pG5Y2flpYOZY2QTZyZOqDx683oYKv3ZQv9FO0SqKYvjfL8iTaD+gVIpp9rbj/uZ5ah53zDTYOsYRfbX9i8jmpPS/ayATM/Rc4gRqTYy5v4Em2ttiRT4rgkJqLh+/NRYXPcY7dsMwc2vkpZgidj1MbIOOC/qkrXDmGMuWOgFPrZ9yWvB6Jd1ORbvf7vA1C2U2EtqlJO48BhA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z8XgdfU2qK3ubILSWkubFh815/rz2RYBg6m472ZQdVo=; b=H7ds9R/vQe6Xia/DxkuT7dKly+QAH8C9sq7trWaZ1+Yb9IczBy2E1TOipU+eb9uCYwLSCvR5KvoWAmMxV9/1SNjSbQhK/cxY5N+URSg0sTwmwoa5xuhGJy3xuvnp4NY+HqBpUCufnwgStWFIaS7ho64Vc/IL54uArOIB9W2k7L4IYDUs+r+s01u4YyzNiv7CQ32LQRsxXg3AYi4XrFKpTv+WB2GKA8D94dTkVaPv24DCYZavgE3Pg0fIm5JTB0Vr0zXERji/vRFn1bwUrz/quEa1O4qKYcon3OAW5XwQgGidqDWGFS9DWJbQpR83xKJXk254vQe0WqwblHoBX+q0Zw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jacobs-university.de; dmarc=pass action=none header.from=jacobs-university.de; dkim=pass header.d=jacobs-university.de; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z8XgdfU2qK3ubILSWkubFh815/rz2RYBg6m472ZQdVo=; b=j/cMLTBu+b8pjA1/nTdwOpLBMlMj/pqHS4Kr/j0WWAxEm8cx1VHZhIcT2kUFO7px6hMjqkn0bfR3WjGqNpheDJzrtLkm/gLt9G9Rv3HlZDL6XuWHNDCysePhk948V8h/okfnE3wUeNaDVkxTWzRXMP3nC5YWoN8ClFrfy0c0eBY=
Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=J.Schoenwaelder@jacobs-university.de;
Received: from AM0P190MB0707.EURP190.PROD.OUTLOOK.COM (10.186.129.88) by AM0P190MB0722.EURP190.PROD.OUTLOOK.COM (10.186.129.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Wed, 8 Apr 2020 06:57:39 +0000
Received: from AM0P190MB0707.EURP190.PROD.OUTLOOK.COM ([fe80::382f:f91c:26b5:a440]) by AM0P190MB0707.EURP190.PROD.OUTLOOK.COM ([fe80::382f:f91c:26b5:a440%8]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 06:57:38 +0000
Date: Wed, 08 Apr 2020 08:57:38 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Carsten Bormann <cabo@tzi.org>
Cc: Ivaylo Petrov <ivaylo@ackl.io>, NetMod WG <netmod@ietf.org>, core <core@ietf.org>
Message-ID: <20200408065738.l7jnht536vxzacse@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Carsten Bormann <cabo@tzi.org>, Ivaylo Petrov <ivaylo@ackl.io>, NetMod WG <netmod@ietf.org>, core <core@ietf.org>
References: <20200331110237.zbo3zw74xlccur3w@anna.jacobs.jacobs-university.de> <CAJFkdRwhxa2T-LVoYfwbMcjjo-dWhwonf_q4B6vGGLuWy5K+BA@mail.gmail.com> <20200407194758.luxnndxxsuixhzfo@anna.jacobs.jacobs-university.de> <16670AE8-DE0D-4444-9F64-ED6C67654886@tzi.org>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <16670AE8-DE0D-4444-9F64-ED6C67654886@tzi.org>
X-ClientProxiedBy: AM6P193CA0093.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::34) To AM0P190MB0707.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:196::24)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (2001:638:709:5::7) by AM6P193CA0093.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19 via Frontend Transport; Wed, 8 Apr 2020 06:57:38 +0000
X-Originating-IP: [2001:638:709:5::7]
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: e3ed2f1f-2e99-4ef2-9c60-08d7db8a202b
X-MS-TrafficTypeDiagnostic: AM0P190MB0722:
X-MS-Exchange-Transport-Forked: True
X-Microsoft-Antispam-PRVS: <AM0P190MB0722893EA95B5C48CA4DC460DEC00@AM0P190MB0722.EURP190.PROD.OUTLOOK.COM>
X-MS-Oob-TLC-OOBClassifiers: OLM:10000;
X-Forefront-PRVS: 0367A50BB1
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0P190MB0707.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(52116002)(8676002)(66946007)(186003)(53546011)(66556008)(1076003)(6486002)(66476007)(4326008)(6496006)(8936002)(86362001)(5660300002)(16526019)(54906003)(81156014)(498600001)(6916009)(3450700001)(2906002)(81166007); DIR:OUT; SFP:1101;
Received-SPF: None (protection.outlook.com: jacobs-university.de does not designate permitted sender hosts)
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: Ictc9m4lNmHzh5J2GakvcazivFZp5Ts14GYEqxTMqdOpNSjgefdaaO7IDv0pCFV+Fxd2BHFL72CFGC2EJKYrQsJQdwR9/itN7HfEoyTYiKrsJT/3uWXi0f+Y0RDZyLX7tEReqBDp0XDsSqkUNFl08gkhbutykmsof8YE5ZWefEAA/W5bPASkWaBfX97Dz/Lg27J/BpIXWX1n9xlp5C7sbC8xrlqUhI7Rl45IZj57uzlxFfP0QSEXX2ws9+p4o3CFedPulO988NBt8I5laXuG1mn58/aZpu5GlZf9ixaEYGHTDVBFMi+tvPj3npKtqsbUgP56KvwBsd3Hvs4jIBQRYwiZ7b69WFHR1mixhH1QV65K21oiWM+qydgawszI7noKET8d7pR1TRC//Q4fxa6vqr+S+vNo7nmo6UkdHOBJAz5P0Jv9E0TTaE5wI9/CktwA8kKq6Lp4zod7Y7KkT4bX2kGERKKyN+eRAjRVyaXuN1CMyUqTQZOzoYShNTusxw6cnLNMCGxi4pBUlVATaYi7nQ==
X-MS-Exchange-AntiSpam-MessageData: JT3kKuIbtpLtA7m4W4962BM+ylNZdateiWzZNtcRdnFAp5NWCdF2hN7+HM697gGQiFC0nRBS0qfHPF+BNKf50oSqAjydZs39SUJyOpIr9R69hP0HOFLhXmknadizYIPXwr1EjS+XfMcP5YXCbPYntX9HCPGW3qdnJWfBhkLP4pM=
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: e3ed2f1f-2e99-4ef2-9c60-08d7db8a202b
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 06:57:38.9088 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: ceZ8oovsTRuSqT1kWu9zF5JMgJSwNlj53RTdUe+ZYM1jr9t0iV2/R/wH2tZs4MSZFl3cSqa49V5oR8LNJOyY/0pshvMJhxqla/5cUudLYWY=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P190MB0722
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/VsU0yZPnQxN7Z4KwsPUFvChlJcU>
Subject: Re: [netmod] [core] js review of draft-ietf-core-yang-cbor-12
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: Wed, 08 Apr 2020 06:57:47 -0000

On Tue, Apr 07, 2020 at 10:55:28PM +0200, Carsten Bormann wrote:
> On 2020-04-07, at 21:47, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> > 
> > For me, the question is whether this ID defines SIDs and the other ID
> > details how they are managed or this ID imports the definition of SIDs
> > from the other document, which also details how they are managed.
> > Right now, it seem something in between, i.e., it is not clear what
> > the dependencies between these specifications is.
> 
> Thank you for that feedback.
> 
> So I think we need to be a bit more radical/precise:
> 
> -YANG-CBOR should explain that SIDs are 63-bit unsigned integers and how the delta encoding in the CBOR map keys works.  I.e., define the concept, but not the number space management.
> 
> -sid does the latter.
> 
> The document that defines the media types (comi) gets to bind YANG-CBOR, for these media types, to the specific SID concept defined in -sid.
> 
> -YANG-CBOR can still refer to -sid as a preferred way to manage the number space.
> But you can implement -YANG-CBOR without understanding -sid, so this is not a normative reference.
> Any other document using -YANG-CBOR can refer to -sid as well (or, exceptionally, to something specific for that usage).
>

This makes sense, but I prefer to have the media types defined in
YANG-CBOR. If I use CBOR with RESTCONF, I love to depend on YANG-CBOR
only and not in addition on COMI just for the media type definition.
The serialization format is defined in YANG-CBOR, hence it makes sense
to me to define the corresponding media-type(s) there as well.

Note, I did not manage to review COMI due to a lack of time. So I am
digging into the type definitions now. RESTCONF (RFC 8040) defines:

application/yang-data+json
application/yang-data+xml

COMI defines:

application/yang-data+cbor
application/yang-identifiers+cbor
application/yang-instances+cbor

It seems that yang-data+cbor really is yang-data+cbor+sid and it seems
there is no media type for yang-data+cbor+names (i.e., the CBOR
encoding that uses names instead of SIDs as keys). The other two media
types yang-identifiers+cbor and yang-instances+cbor seem to be COMI
specific. Hence, me preference would be to define something like

application/yang-data+cbor+sid
application/yang-data+cbor+name

in YANG-CBOR and to leave the other two

application/yang-identifiers+cbor
application/yang-instances+cbor

for COMI. There is a certain interest to stream binary encoded YANG
data and having a self-contained YANG-CBOR document would be desirable
to minimize dependencies and maintenance headache down the road.

/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/>