Re: [netmod] [CCAMP][TEAS][NETMOD] Efficiency issues with YANG model data in integration

tom petch <ietfc@btconnect.com> Thu, 17 March 2022 16:32 UTC

Return-Path: <ietfc@btconnect.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 283443A116F for <netmod@ietfa.amsl.com>; Thu, 17 Mar 2022 09:32:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.91
X-Spam-Level:
X-Spam-Status: No, score=-6.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=btconnect.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 QFoc1x6_g0tN for <netmod@ietfa.amsl.com>; Thu, 17 Mar 2022 09:32:22 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on071b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::71b]) (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 E03EF3A115A for <netmod@ietf.org>; Thu, 17 Mar 2022 09:32:21 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MNrODx+4JBDVJFSMJuqOL27f5zTwZwTF73PaaShhVRjlh0LmEZGtYcRdjYuCRz5KYqs5WgCDtzVFjqPpr+xljJB0L6qN2JhCsso+M646OX37eCyJcitoYwmGF1yKkKQSM9zIvJ8mAiHmegKuQZv1xkbk7rVKP0c+f2IQrKyWc6wERmJDepDAW10XnH6gEoH2L6iTTLJPF0uNG5Vl4GbhlA2I6BFN4wCe8GeRgxfHIVLmiljMuNh0fo7S/Y8QhPo4D+RjQeQHvOsiDe57Ys2ybu4dEx7EDTtRtNOVmxBZ+fWSg9IDTOFAfW696Ev4VuPbek/3MjD6NCI1HkMNfdqyJA==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UVa528CQXSUdQVJzkcPdy2OV4whCS2fBHgof0wF2qXE=; b=kzWJTEL4el32KwQUxJtQxhuhsDQ0gq2euvIhP6bSjCd8HKxz45T2IBmLaUlv4JLTJurVDLJQmt3JTH9qFh/La1/Yh28PC+pWjJWtHB2OtF48aPMc8y8lCRaP+ivZBQQ8gcD1an3F9LJ72A+/u82KiJn7RbTTG6ItkiNTob7J3c0rB2vXnrtiULW6pPaxQv4EvqVjxK7ARx1yG1wZfHMurgnyTCiyk+E4MxYa/gT+SnCmdHzEOj7v0czX1zhxn3zKEMbMYWsbDbEWRzG6xzVFO0+5gFjTW9xJuWMhd+O8Y0xX5dsPQCU9qU6a6V6gDXGuZotr9ah8O8kCPgtgKdz+hA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=btconnect.com; dmarc=pass action=none header.from=btconnect.com; dkim=pass header.d=btconnect.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btconnect.onmicrosoft.com; s=selector2-btconnect-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UVa528CQXSUdQVJzkcPdy2OV4whCS2fBHgof0wF2qXE=; b=gjPGdA8EUGWWbOwkfTYD5qBFRD1wKstFc00969yOerUJncpu169yxJtyU8C7Jg83gmTj3qsLaVu50cDZKTwwuRCI8lJvBreZsoREs4bEKf98ZvB/iWwa0/DTCXlIk/BG2APGntG3/JWxun6CZZ48R5em9bfEdX0KqhPojW2xf+8=
Received: from AM7PR07MB6248.eurprd07.prod.outlook.com (2603:10a6:20b:134::11) by HE1PR0702MB3660.eurprd07.prod.outlook.com (2603:10a6:7:8d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.12; Thu, 17 Mar 2022 16:32:17 +0000
Received: from AM7PR07MB6248.eurprd07.prod.outlook.com ([fe80::2191:760c:dde5:29c6]) by AM7PR07MB6248.eurprd07.prod.outlook.com ([fe80::2191:760c:dde5:29c6%5]) with mapi id 15.20.5081.015; Thu, 17 Mar 2022 16:32:17 +0000
From: tom petch <ietfc@btconnect.com>
To: yuchaode <yuchaode=40huawei.com@dmarc.ietf.org>, "'netmod@ietf.org'" <netmod@ietf.org>
CC: Fatai Zhang <zhangfatai@huawei.com>
Thread-Topic: [CCAMP][TEAS][NETMOD] Efficiency issues with YANG model data in integration
Thread-Index: Adg4C6bs+BE/9XP/Tve41P2kUU3BewCD9RHZ
Date: Thu, 17 Mar 2022 16:32:17 +0000
Message-ID: <AM7PR07MB62483C667188F5EBBE26F6B4A0129@AM7PR07MB6248.eurprd07.prod.outlook.com>
References: <67664d6fff3e4125a1ac026030ef067c@huawei.com>
In-Reply-To: <67664d6fff3e4125a1ac026030ef067c@huawei.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
suggested_attachment_session_id: 3de7647f-ed63-4bfb-5401-874f80df53dd
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=btconnect.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: bb03c19a-583c-42ea-0ac8-08da0833b367
x-ms-traffictypediagnostic: HE1PR0702MB3660:EE_
x-microsoft-antispam-prvs: <HE1PR0702MB3660FFF89E6C21D2D6CCF6EBA0129@HE1PR0702MB3660.eurprd07.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: XI/Y5sfZs+CjepjPmrfIUYOiYo0vkfrQ0XM7WcEATH+WEagEjzknaOsJFnR1DRuQuXr9z//kKjjHNKeNHXgBGO3GE5nD0npPpXpkYejS/w5NvuBuzyUVk/lP7yg5lAxhH0HpaH53P1b44jLFAjXADMW4blkCjluRbvhGuGTE9igrizWWTT9NYy6IXpuxPlLa9VpUsgl0vEhxaoQTFV/K8M/6AV2jxzV1wtDiH2Em44RGJWKoZhg1qOmXQCc6vkrb96TIBsbzqNuXyeU5/PYH952PdzP+fTbIUJknZoWi/Ar6emxx53fWEUFQ8NWo8XE+s/g0wVDhxJy2o8R6Iz4VDYlK3l0yqfsIZVGheualIwEHvq7PGI1PTW2G4MjpFCgnuU5pxD2SegSUKxBIksNNzCdpafnG+bWQbL+JHIv/VyFEh6U+HgY153RDLTYeeJXh8LJ/gsWIMygCDTezVicMQbKnJrWexeP/X6qXbRLkr312plK4dhu74SPCw3xduJr0WQoyYA29vUjG/qwpnfyg4XM7JvZT4o81BivWplvQkDZnOr8EDbtIocTO+3zSvupJg0maEiXgTmuy976uKqCZtJNqPxDKAxpMd8u7lkuOow74zKd6Zg7KZbOUzoFAyQc/oLeB7s0rPNXhUcyKgnpjVdaYT9rhaGkvqChZPIIvVpBrXkjHvYlcAt+hFDVfjjTiHNOcYkuVfJnhgRfffTgttiW2OjAcWE2WKRsLdfSKYQoSr93nL0EdiVpFAZ0/w6bhQZithEuvDVit9wLF4Bvnkg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR07MB6248.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(86362001)(55016003)(122000001)(8936002)(508600001)(5660300002)(38070700005)(82960400001)(91956017)(76116006)(38100700002)(66946007)(64756008)(83380400001)(71200400001)(66446008)(66556008)(66476007)(2906002)(316002)(9686003)(6506007)(7696005)(4326008)(110136005)(53546011)(8676002)(26005)(186003)(52536014)(33656002)(491001); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: TB1tVR8xI6qc7dkP4r5GYLADGzlok9XSsJc9kQoywKYnbuvA/p3kMYjZijpZ2AS/1sdie+NQeegAPkTSY9bjBlnsFSc3aREjCFqkiFq4k1AJFja19A+puENVJbrpd7d/oWlvwbhaN7gdenKaIppg7mbNmMQplfuGDf3wkVgg+3iYdT/BPdU5f7bmspW4cmSXm++Rhd7MhVcw1T3z/VwdaQZpGH+yCaNjJMkS19hw1jQUGYgYozo88fXmkeN2iERNrrnxB1LqQN63cPbu5aEIf563kDkGt2vuf8QdBVJxbLfpE6IGHd+Z+PHrLALFzyycC4dp1Er5Q5YVTZmRfrF8s3rC/dGoKSHuNzB7fmlY7+NGDG8HzWt8sBKI3X3UEDqNnbwKEl69EyBlvmnPD+DiwSQjrMtUFJ9puOgdJXZedbrO3VU3OnnQ2SSx33AnlCxc8q/n1CmSOU4Pku9l9bO3t/wb7sPdKNKwTSpYlvpwF1lWd0LDeYIFOn6NTKTLnlwGk7k3XqdNpQHWxgIFwnNaVgMGFWGa6frCQenGxfgH3+Bo47SNed2wtJQYInO9ExfS4mvpW1mqzteJ3ifwpUgC+NXpHlbDqPl1EbrbZy7fbS7JGCuz/RJ3+RD4jIsHW3f6Ckwj96guhGiBXqNjaE9Hvj7V01cHnFPRqutLPacriTatf+cIpPFXNhjWbmT7jsHzdd2z5BGD4UQyz6ygK+eBL3+8thtF40rMdTibHayJir2mLpg8be/1H+zFySXeLdfTVDGodObqpNYu7j/juSt4jED5WVbmqY7vKpxNfDjCVu0dBNzfhIIQ1abWiVoXdn9bg3DwrzKb8EMcuXAd1hdjpagGZBWgbIL9d/z4CbTu9/CHRZ5AEaQuHjrGE2BpHlQrBytZlNVr1yY5tWDzwfYV2lS/nfr3G3KeY6y9n4HLsXaTpn7ILf1PosDTCsTqObY3VGx3UCDuq5PebuMNB53U8HRoZwE4oO76IXYDOpHDIMEmNQIng5SdDQ6BQTIQRQf8xlKHnSB1Lv3X4lLR9qBdgMk4Leg06rI4C4pruUv2ewmdk7IZ39Ow6v6VZI7pDPKq0MiTAY7aZ0wUFver7rPXVx/amDx2w3kpMekYD2TTd8u3u6ZAQUyCAnwfb1AREvTsdpevW3/Pz2gGM0n5GamZdJj+QR1hWTHrxtvTaPMtfbxuec0FGEKNaXrjGQm74Ix85fLEpRkDIG2HtWXDGsbt8I8Il3h4F9V/iPI/Pap0v+6wAqWET+zONI3dQHQ6gKTzBLF1USGP6Q/h8O04/ozBkqHv1PJKt1uo/OYMsxsf/oN8LcFoZWR5PmPiNYNBs+bqoi1xXhs3J+sfaJ+e1MfyKDqWa91DwkLizKS2zv6ze0QVWbGiJ6V7KhxSFd013Y1E3MRSgne49LhmaLlrGjKBdmeC5v+iQZqBM/RSRiZ0M2A/vq5GArPeMQ/bZ56/JmN0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: btconnect.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM7PR07MB6248.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: bb03c19a-583c-42ea-0ac8-08da0833b367
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Mar 2022 16:32:17.1637 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: cf8853ed-96e5-465b-9185-806bfe185e30
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 1/AZsD9NtxqnYmeMnEsKyi0bTcQVo8oFAnQ1jBUpSIPuzKWCdBL8MSC6U+d67jlYtUuf68KhgytlvJhJeKzL7w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0702MB3660
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/DtL8o8k-HIAuQL2LSx2ULS23tuM>
Subject: Re: [netmod] [CCAMP][TEAS][NETMOD] Efficiency issues with YANG model data in integration
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: Thu, 17 Mar 2022 16:32:25 -0000

Trimming the distribution to NETMOD (if I send a query to everyone then everyone may think that everyone  else will respond so no-one does)

From: netmod <netmod-bounces@ietf.org> on behalf of yuchaode <yuchaode=40huawei.com@dmarc.ietf.org>
Sent: 15 March 2022 01:30
To: 'ccamp@ietf.org'; 'teas@ietf.org'; 'netmod@ietf.org'
Cc: Fatai Zhang

I have a question about YANG data model efficiency issues discovered during integration with OSS.
This issue is also mentioned in section2.2 of draft-yg3bp-ccamp-network-inventory-yang that we are planning to present at the CCAMP WG during IETF 113.

YANG data models define schema trees such as:

module: example
   +--rw root
      +--rw leaf-a?   string
      +--rw list-b* [leaf-c]
      |  +--rw leaf-c    string
      |  +--rw list-d* [leaf-e]
      |     +--rw leaf-e    string
      |     +--rw list-f* [leaf-g]
      |        +--rw leaf-g    string
      |        +--rw leaf-h?   string
      +--rw list-i* [leaf-j]
         +--rw leaf-j    string
         +--rw leaf-k?   string

From the point of view of data model definition, it is convenient to define objects and their relationship using a tree structure.

However, from a practical perspective, relational databases, in which these objects are saved in different tables, are widely used by network controllers and OSS/BSS. In this type of implementations, the model data need to be cut into several pieces of small object data for management and this is causing some efficiency issues with the integration between systems.

<tp>
When the data definition language that we know as YANG was being specified, the question did arise of how object-oriented it should be and the consensus was that it should not be.  Seeking to retrofit such a concept might be a bit like finding late in the day that the class definitions that have been chosen do not go high up enough the tree:-(

An interesting idea but I am not sure how feasible it will prove to be.

Tom Petch

For example, in full data synchronization scenario, the YANG server needs to assemble the data of each small object into a tree structure based on the YANG model defined for the communication with its YANG client(s). The YANG client then disassembles the data into its own storage structure. This assembly-disassembly process is actually time consuming, especially when the storage structures between the upper and lower system are consistent, they don’t need this assembly-disassembly process at all. This efficiency issue is more prominent in large scale networks.

RESTCONF can also support querying small objects. For example, in the above YANG model, the YANG server can provide the list of list-f instances ({{restconf}}/data/example:root/list-b={leaf-c}/list-d={leaf-e}/list-f) to a YANG client, with no need to perform any assembly-disassembly process.

However, since list-f is a child list under list-d and list-b, if you want to get access the list-f list, the list-b’s identifier (leaf-c) and the list-d’s identifier (leaf-e) shall be specified in the URI. Therefore, in the full data synchronization scenario, a loop is required to get all the elements of list-f. If there are 100 list-b instances and there’re 100 list-d instances under each list-b instance, then 100*100 requests are needed to get all of the list-f instances.
Assume that there are only 10 instances by average in each list-d instance, there are totally 100,000 list-f instances. If, instead, it would possible to retrieve all the list-f instances without specifying the list-f’s parent and grandparent’s identifier, but using RESTFUL’s pagination, each RESTFUL request, can provide far more than 10 list-f instances, regardless of whether they belong to a same list-d or list-b instance or not. If RESTFUL interface can return 100 list-f instances per request, only 1000 requests are required, one tenth of RESTCONF interface. This approach will reduce the time taken by the integration.

So my question is whether, to address this efficiency issue, the only viable option is to define the YANG model with a more flat structure, as shown below:

module: example
   +--rw root
      +--rw root-summay-information
      |  +--rw leaf-a?             string
      |  +--rw contained-list-b*   string
      |  +--rw contianed-list-i*   string
      +--rw list-b* [leaf-c]
      |  +--rw leaf-c              string
      |  +--rw contained-list-d*   string
      +--rw list-d* [leaf-c leaf-e]
      |  +--rw leaf-c              leafref  (path "/exmp:root/exmp:list-b/exmp:leaf-c")
      |  +--rw leaf-e              string
      |  +--rw contained-list-f*   string
      +--rw list-f* [leaf-c leaf-e leaf-g]
      |  +--rw leaf-c    leafref  (path "/exmp:root/exmp:list-b/exmp:leaf-c")
      |  +--rw leaf-e    leafref  (path "/exmp:root/exmp:list-d/exmp:leaf-e")
      |  +--rw leaf-g    string
      |  +--rw leaf-h?   string
      +--rw list-i* [leaf-j]
         +--rw leaf-j    string
         +--rw leaf-k?   string

The leaf-list object contained-list-* is a list of identifier reference to list-* instance. With this kind of modeling, all the list-f instances in the whole network can be retrieved without the need to specify its parent’s and grandparent’s identifiers in URI.

We would appreciate receiving your comments and suggestions on whether there are other ways to resolve these integration efficiency issues.

Thank you!

B.R.
Chaode

玉朝德  Tel: +86-15002728675
华为技术有限公司
[Huawei]