Re: [netmod] submodules the hidden benefits

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Mon, 10 August 2020 20:08 UTC

Return-Path: <jason.sterne@nokia.com>
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 B549E3A0C57 for <netmod@ietfa.amsl.com>; Mon, 10 Aug 2020 13:08:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H2=-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=nokia.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 v1mZj7EfDf2i for <netmod@ietfa.amsl.com>; Mon, 10 Aug 2020 13:08:09 -0700 (PDT)
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2107.outbound.protection.outlook.com [40.107.244.107]) (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 DDEC53A0D0C for <netmod@ietf.org>; Mon, 10 Aug 2020 13:08:08 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RzN8VaYZVXFHyA+N/vPt4A90l0xOrkxx99mwmdD8SvFLqj4WuyZdOJ69hW1ZUnj0X9hUzMDWOnQTFlkHTkaGzAhursxOHptdsLtGbspbPr8SpLS3MovLY3dNxygZdsIkB9NIVIHJWdPHOKWu8cuTmJZ8Z9HlYdxkncSCT/VlArNkLrPxYjkC+fwIhJmyiSdNYzm3Yczt+7QXS954uVInmlns+V5bu6jAwqXWApwE8sUFttz9/GWacrtys+9z/cjFOT0IqzLpRB4Q+BgT5u69sV9jXJ+7SdCSq7ScivcjIn3AhL4bd00w8kbt/HXo7eEa2kJy8LBrcAyEZceVNPFmEA==
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=fqTdnurRu25+ZvYoGvuaaNoBFAOPJOWWBe6sJKq4AVo=; b=frvJ8v9mtFOuJwGo+xXOOt5gbQxSF9mHaxoDq3xV6czFtwu1M8EOkw+SWnlqlaDCIVaLhb7VutdXAbvDjdMIDFtMWup205aE5RfORQb7NSXzptB+tZxrhfnWsLktvNzPJ1oDt8kB7v+qTrP8xKEueeqdFwhn4yZyTG8r0N1jULh/T6vF196IoilE8jkAXGRbmWTeVxbm1K5WaxEZZxg20t9jAFqdxiVE+tS2bQbI8jDhZMZNkbtEYpNGR74P5lzR2hY1WQRK4hK9RWptNAVydCWz+A/iXA75cFd4vQDkW4+b4e90i6RpfxQDt5od0lbGb+qbx8LwmpetAK61bNMPYg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fqTdnurRu25+ZvYoGvuaaNoBFAOPJOWWBe6sJKq4AVo=; b=aT4Ai9s8PRGYeWw8R8rsF0+tw/v9Wv+idxZamLGtQEAsfnaqgM8DXKR0cO9+wpOo7jJSbOej4t8tbAofGksQl4y4Lr3PxRKvjRlEJRKQ+kgRAh7KRC3jngUUEQfd8MAB+wbFlb9NbgwU9ndjIXBclD5lq/J6v8FtKmasCQRjAh8=
Received: from CY4PR08MB2632.namprd08.prod.outlook.com (2603:10b6:903:f7::15) by CY4PR08MB3432.namprd08.prod.outlook.com (2603:10b6:910:78::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.19; Mon, 10 Aug 2020 20:08:02 +0000
Received: from CY4PR08MB2632.namprd08.prod.outlook.com ([fe80::a5fa:5071:d3be:81ec]) by CY4PR08MB2632.namprd08.prod.outlook.com ([fe80::a5fa:5071:d3be:81ec%4]) with mapi id 15.20.3261.024; Mon, 10 Aug 2020 20:08:02 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: tom petch <ietfc@btconnect.com>, Mahesh Jethanandani <mjethanandani@gmail.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] submodules the hidden benefits
Thread-Index: AQHWa3ndRKZrP6rOE06GdenbTbnogaktLuAwgAPp4oCAALInIA==
Date: Mon, 10 Aug 2020 20:08:02 +0000
Message-ID: <CY4PR08MB2632EEF50D014D7F0FB2FD8D9B440@CY4PR08MB2632.namprd08.prod.outlook.com>
References: <AM7PR07MB6248D2079B3637B626198C43A04B0@AM7PR07MB6248.eurprd07.prod.outlook.com> <20200805164820.rv35b74xhc4v7qrx@anna.jacobs.jacobs-university.de> <6125f3e3-0caf-ed25-92b7-bdb644c54d08@lightside-instruments.com> <9F39EC3C-CCEB-4079-BF83-D9C163773757@cisco.com> <FC05AC44-6BFF-49FC-85E0-BB9692C210AC@gmail.com>, <MWHPR08MB26371DDCCC2EDFB48B20E6389B490@MWHPR08MB2637.namprd08.prod.outlook.com> <AM7PR07MB6248EC738F85099B58FAAE82A0440@AM7PR07MB6248.eurprd07.prod.outlook.com>
In-Reply-To: <AM7PR07MB6248EC738F85099B58FAAE82A0440@AM7PR07MB6248.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: btconnect.com; dkim=none (message not signed) header.d=none;btconnect.com; dmarc=none action=none header.from=nokia.com;
x-originating-ip: [2607:fea8:e300:6d0:d7c:8e4b:209c:cb45]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: c6f16b39-82d0-4d99-2559-08d83d691621
x-ms-traffictypediagnostic: CY4PR08MB3432:
x-microsoft-antispam-prvs: <CY4PR08MB343218232D86D14D25EE18CE9B440@CY4PR08MB3432.namprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 13JbSJYaTNospfVyaebUKkiL4vCD15C35C5bEaYHmX0aLceWxfL8x3fQQYRIePADoXfDH4eIgXsvtLiEGTE/OcSluCboOx7Dnptbtz0My1GPhc4kiM7saQTyxiHrJNHIPHZH/YmoUkevnEaIEeY9l60ennEVaxrlcVmOtJcuY7L84DZQhcSPsNHdfhEn1YdbtynSCwfrW4J3P/5ZG0IWF+VCXmaawRvhHcuyDhoh1TGan5t9BTr4UNr1N9MzUzS/9s3+9yEOn1ulKwlNYZ/LKGfcuA2KU+eOxJu8hCwwgpzDym5HzE0Lw9Ix7ZXe0+dZ6CfEErVdbWcaeFdT42mqfUblx+c8QDt9Bcmq5x4umAHxmm6qD9Of85xebxpIKdTekqfpc18b2/5CFprgpPRDnA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR08MB2632.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(396003)(136003)(366004)(376002)(39860400002)(66476007)(33656002)(296002)(316002)(76116006)(66946007)(966005)(64756008)(66446008)(9686003)(66574015)(66556008)(6506007)(53546011)(55016002)(478600001)(86362001)(110136005)(83380400001)(7696005)(71200400001)(52536014)(186003)(8676002)(8936002)(2906002)(5660300002); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: eNquGzSoQE+CjK+cUldj8CS0rUMsMqFanW6QmfWOinAymCs83VrlKjaiTdbbNjhvs/MUf6K/h5o3bkKxP7tlZ8K3vC0UIIk7cUgv2gY/FhB+xyDGF+jdM0QA36K+YsRSsqXJAxIGFo6CgVVM14cC+nmKxXIs0x0J4S3mFUM5PaYZIYupBBsa7mGNJr9Nofbht2u9wzdbY0T3JYSrKsvd3dhbaP+Sgwanix4XqGKSu860pVeWWPEU+s7j7x7Rn1S1dMwC9L7ic4r8trkzyQc88kF0C8vFcNWEQOVxHeQ6h2pj2Hyx7LS8KvA8MAU7FAbvgkDaunRe4BIq3O+YNb7+dI2J5bjvaFTjPNqhRe6FS8Pc0sryKp3XHCy7I4Itybn1iafKdxgQQ8cgIvfMgHBYb/a+y/eLv6krPON65jExVJeh7H2OcvratvxUoSCRGZKFr4BNITA+X4er6aySdjw37tbV0WfEe2yAy2GnIJTr1z9njcqB6TNZ2dYZR4Bra8+4vhkc/2Dm3O3Rfjnux1nqlDN0VIKGIBHJ5TugzG4dGUvxVozJNmo0mnckPw49fuMtTLOqTaIOPPe621XaoLUKUJdBcul9zYCmFjym0XY3VettWfHpbYWFO59LlxvVJbxbGks+/7J43pm1KwDlwuFq2rK/FOqBUX48bLEEKgQxqhjVymtSEYxqFaByD1GA6yNXdLvHbONs3en71jsFhpLhBQ==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CY4PR08MB2632.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c6f16b39-82d0-4d99-2559-08d83d691621
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2020 20:08:02.2307 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: vUBFDstGGzwnKeXB79RDIAaIP5m21C0Xb52hMSCnY+jWa7v1ZxM2xkcJ+6zJ/g6uBWrmq/L5v2KZ2G6YSTGXCA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR08MB3432
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/05lwX2LJ9KbZwQ7GFgNsx1o3DF8>
Subject: Re: [netmod] submodules the hidden benefits
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: Mon, 10 Aug 2020 20:08:12 -0000

Thanks Tom.

Versioning in current YANG specs and in the new versioning work has independent versioning available for modules and for sub-modules. The module version will always bump when something changes in a submodule, but each submodule has its own revision. So it can help consumers quickly see which parts of a large schema have and haven't changed.

I agree that certain ways of dividing up modules, using groupings, etc can help or hinder readability. But I think that is orthogonal to submodules. YANG authors can make good or bad (*) readability decisions in a schema with submodules or a schema without submodules.  If a schema is divided up at the top level of a tree into submodules, then that is just as readable IMO as a large data model being divided up the same way into individual modules.  i.e. you can have your bgp module, your interfaces module, etc OR you can have your bgp submodule, your interfaces submodule, etc.

(*) good vs bad is often pretty subjective and there are sometimes tradeoffs amongst readability, consistency, maintainability, etc. But again that is all orthogonal to submodules vs modules IMO.

Rgds,
Jason

> -----Original Message-----
> From: tom petch <ietfc@btconnect.com>
> Sent: Monday, August 10, 2020 5:23 AM
> To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>; Mahesh
> Jethanandani <mjethanandani@gmail.com>; netmod@ietf.org
> Subject: Re: [netmod] submodules the hidden benefits
> 
> From: netmod <netmod-bounces@ietf.org> on behalf of Sterne, Jason (Nokia -
> CA/Ottawa) <jason.sterne@nokia.com>
> Sent: 07 August 2020 22:40
> 
> I agree submodules can cause confusion, but I also agree with Mahesh that
> they can be useful to partition things for people using the modules. Especially
> for huge models (e.g. router vendor models). You can jump right to a
> subsection of the data (a bit like a document with chapters rather than one
> huge chapter).
> 
> It can also be useful for consumers of the models for versioning (when you
> want to avoid multiple namespaces). If a model is made up of 30 sub-modules,
> it might be useful to know that the "bgp" part changed while the other parts of
> the model didn't.
> 
> <tp>
> 
> Jason,
> 
> Jan commented earlier that versioning happens at the module/namespace level
> in which case it would seem to me that all submodules will by definition have
> the same version so you cannot tell which submodules have changed,,
> 
> I think too that there is a fallacy in the belief that dividing up something large
> makes it easier to use, understand etc.  Divide up code by procedure,
> subroutine etc and if you can provide a parameter or two input, and one or two
> results output, and all the complexity of data structures, validation, algorithms
> etc and hidden out of sight, then you have simplified.   But DDL is not like that.
> With a grouping or submodule, you need to know the internals, of what objects
> there are, how they are structured, what semantics they have, pretty much
> everything inside; it is just harder to find, to reference, to access because it has
> been wrapped up in something that gets in the way and tucked out of sight in
> some part of the I-D,
> Rather simplification comes from having the right structure in the model, which
> some WG are good at,
> 
> Tom Petch
> 
> Jason
> 
> From: netmod <netmod-bounces@ietf.org> On Behalf Of Mahesh Jethanandani
> Sent: Wednesday, August 5, 2020 6:43 PM
> To: netmod@ietf.org
> Subject: Re: [netmod] submodules the hidden benefits
> 
> A contrarian view:
> 
> I find the use of sub-modules helpful when I want to use separate files to
> maintain part of the module that is logically separate, while
> maintaining/restricting the use of them to a single namespace.
> The fact that tools have a problem with trying to compile a sub-module can be
> addressed in the tools themselves.
> 
> 
> On Aug 5, 2020, at 2:44 PM, Reshad Rahman (rrahman)
> <rrahman=40cisco.com@dmarc.ietf.org<mailto:rrahman=40cisco.com@dmarc.i
> etf.org>> wrote:
> 
> Indeed
> https://github.com/netmod-wg/yang-next/issues/26
> 
> On 2020-08-05, 5:22 PM, "netmod on behalf of Vladimir Vassilev" <netmod-
> bounces@ietf.org on behalf of vladimir@lightside-
> instruments.com<mailto:netmod-
> bounces@ietf.org%20on%20behalf%20of%20vladimir@lightside-
> instruments.com>> wrote:
> 
>    On 05/08/2020 18.48, Juergen Schoenwaelder wrote:
> 
> 
> I personally meanwhile believe that sub-modules add complexity with
> little extra value but this view surely is not shared by others.
> 
>    +1. IMO removing sub-modules from YANG 2.0 should be on the list of
>    proposed changes.
> 
>    /Vladimir
> 
>    _______________________________________________
>    netmod mailing list
>    netmod@ietf.org<mailto:netmod@ietf.org>
>    https://www.ietf.org/mailman/listinfo/netmod
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org<mailto:netmod@ietf.org>
> https://www.ietf.org/mailman/listinfo/netmod