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

yuchaode <yuchaode@huawei.com> Tue, 15 March 2022 01:30 UTC

Return-Path: <yuchaode@huawei.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 321F53A15A8; Mon, 14 Mar 2022 18:30:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.907
X-Spam-Level:
X-Spam-Status: No, score=-1.907 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 a58F95seeh1a; Mon, 14 Mar 2022 18:30:14 -0700 (PDT)
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E84543A15AF; Mon, 14 Mar 2022 18:30:13 -0700 (PDT)
Received: from fraeml712-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KHbRW1VLhz67N2W; Tue, 15 Mar 2022 09:29:27 +0800 (CST)
Received: from canpemm100004.china.huawei.com (7.192.105.92) by fraeml712-chm.china.huawei.com (10.206.15.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 15 Mar 2022 02:30:09 +0100
Received: from canpemm500002.china.huawei.com (7.192.104.244) by canpemm100004.china.huawei.com (7.192.105.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 15 Mar 2022 09:30:08 +0800
Received: from canpemm500002.china.huawei.com ([7.192.104.244]) by canpemm500002.china.huawei.com ([7.192.104.244]) with mapi id 15.01.2308.021; Tue, 15 Mar 2022 09:30:08 +0800
From: yuchaode <yuchaode@huawei.com>
To: "'ccamp@ietf.org'" <ccamp@ietf.org>, "'teas@ietf.org'" <teas@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/Tve41P2kUU3Bew==
Date: Tue, 15 Mar 2022 01:30:07 +0000
Message-ID: <67664d6fff3e4125a1ac026030ef067c@huawei.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.117.175.195]
Content-Type: multipart/related; boundary="_004_67664d6fff3e4125a1ac026030ef067chuaweicom_"; type="multipart/alternative"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/99VTY4edlzqicn9mMbJfO809WLg>
Subject: [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: Tue, 15 Mar 2022 01:30:20 -0000

Hello Friends,

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.

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]