Re: [netconf] Current activities on RESTCONF/NETCONF to support paging

"Wisotzky, Sven (Nokia - DE/Stuttgart)" <sven.wisotzky@nokia.com> Thu, 14 March 2019 10:07 UTC

Return-Path: <sven.wisotzky@nokia.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 24A92129441 for <netconf@ietfa.amsl.com>; Thu, 14 Mar 2019 03:07:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 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_DNSWL_NONE=-0.0001, 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 B7L8vX1zsY_0 for <netconf@ietfa.amsl.com>; Thu, 14 Mar 2019 03:07:36 -0700 (PDT)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on072a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::72a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E5A441288AB for <netconf@ietf.org>; Thu, 14 Mar 2019 03:07:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aGsHviQmee4Bxk/mqp4LuNeW2d/RumiRl2XBGCC4sS4=; b=JMcK78rpN3RyjdXtjtCICo26k7BgKUu7mIaVRPuCJPAZim3ftYq/GJlRSnnH5HHmPuLs1gN0oOZCDJSoLYMR4yWBrXbn24vM7+pUdcC/ZlaiXWDSjdzMk6D0gJatrogKVxQ7zXdzfEwGajsuB9itlr828+swIssy/B/Zx9M57GM=
Received: from DB7PR07MB5386.eurprd07.prod.outlook.com (20.178.46.26) by DB7PR07MB3977.eurprd07.prod.outlook.com (52.134.100.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.9; Thu, 14 Mar 2019 10:07:33 +0000
Received: from DB7PR07MB5386.eurprd07.prod.outlook.com ([fe80::181c:32c6:16f2:7433]) by DB7PR07MB5386.eurprd07.prod.outlook.com ([fe80::181c:32c6:16f2:7433%3]) with mapi id 15.20.1709.011; Thu, 14 Mar 2019 10:07:33 +0000
From: "Wisotzky, Sven (Nokia - DE/Stuttgart)" <sven.wisotzky@nokia.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] Current activities on RESTCONF/NETCONF to support paging
Thread-Index: AQHU2kekdlWyfgR30USJDGKLseBWaqYK3hEAgAAZnQA=
Date: Thu, 14 Mar 2019 10:07:33 +0000
Message-ID: <9DE27BCF-61F3-4085-A1F8-0FEAD76F85A5@nokia.com>
References: <C88A38CA-44B5-42A0-9DFA-A67AE5456951@nokia.com> <20190314093552.3pwa7ptrre4t2stk@anna.jacobs.jacobs-university.de>
In-Reply-To: <20190314093552.3pwa7ptrre4t2stk@anna.jacobs.jacobs-university.de>
Accept-Language: de-DE, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.17.0.190309
x-originating-ip: [188.97.190.16]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: c370b8c9-40c5-492f-9403-08d6a864e060
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:DB7PR07MB3977;
x-ms-traffictypediagnostic: DB7PR07MB3977:
x-ms-exchange-purlcount: 2
authentication-results: spf=none (sender IP is ) smtp.mailfrom=sven.wisotzky@nokia.com;
x-microsoft-antispam-prvs: <DB7PR07MB3977E24E6C6FC071B084E7BCE94B0@DB7PR07MB3977.eurprd07.prod.outlook.com>
x-forefront-prvs: 09760A0505
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(346002)(376002)(366004)(396003)(39860400002)(189003)(199004)(6306002)(105586002)(6512007)(14444005)(81166006)(3846002)(99286004)(6486002)(6116002)(97736004)(14454004)(8676002)(58126008)(8936002)(106356001)(305945005)(86362001)(256004)(6506007)(6246003)(7736002)(53936002)(76176011)(229853002)(71190400001)(83716004)(71200400001)(36756003)(66574012)(102836004)(186003)(26005)(82746002)(316002)(66066001)(6436002)(68736007)(446003)(2616005)(2906002)(486006)(476003)(11346002)(478600001)(6916009)(5660300002)(81156014)(25786009)(4326008)(966005)(33656002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB7PR07MB3977; H:DB7PR07MB5386.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: y6vqSo/wFcfoCFCGIsBgfbRERawVoHzn8ujSFATvX623VN5fGAMmU+JkMBdEmT1jrBCsawzNgNrN5rkDMrUe31o7fJcliSIahcrMpxh0JApyEFDxc0Mep32Rv1TiHAYvU+wGCEpEPDtKGC+809TWzzPsBKJGnofEerqwdvB7YrIxUyIqMYeKEacJd9L/xgg0qgqDUD2MBnK2xfWgG2RRJppnfj8qAP6OGUKdyn1aV3WduAJRAeppz0CyU/DjbWDBp7NvISVE8KAeYe5dRc1Pp98YIk5z3BFDsrcST+60kpxAQ6zvQdsESrXuNO1t5Ud4rQXt2BvRTJuZ+BS3sGI/acCRXtLMOeFFodas+mqAAGTqJyCXjztlEZx8QSzRHp0iqUPuprR5qf0WZCLKwhsbM3UVhokw/uV5yiHMZj1fdyA=
Content-Type: text/plain; charset="utf-8"
Content-ID: <6FA052BAF9EF0A47967DAC562FF52553@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c370b8c9-40c5-492f-9403-08d6a864e060
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2019 10:07:33.2654 (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-Transport-CrossTenantHeadersStamped: DB7PR07MB3977
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/GkWi1CUWTv4AGsKNQqRztObplns>
Subject: Re: [netconf] Current activities on RESTCONF/NETCONF to support paging
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Mar 2019 10:07:40 -0000

Hi Jürgen,

I am not sure if this is so much different from retrieving huge lists using get or get-config today. Capturing information, XML rendering and transmission will take time - so nobody would be surprised, that receiving a list with +100k entries easily takes several minutes. In such situation, it really depends on the server implementation - if concurrent changes impact the result of get/get-config operation on-the-fly, making the result inconsistent.

Clearly a NETCONF/RESTCONF server could avoid such problems by taking a short-term log while capturing and caching all the information, while the XML rendering and transmission would use that snapshot which would be fully consistent. But to implement a NC/RC server that way, comes at some expense of memory footprint which is typically quite limited on network equipment and is likely one of the reasons why NETCONF XPATH support is rarely supported in the industry.

That being said, the only way for a multi-vendor NETCONF client to ensure data consistency is to lock the running datastore while executing a get-config operation.

Based on this, the same could easily be applied to paging. So if paging is simply used to make the user-interface showing tables faster while loading the remaining table in the background, the netconf server could lock the datastore for the entire operation to enforce a better level of consistency.

However, as per my initial post below, just defining a limit (aka max-count) is a very efficient initial step to improve loading time and avoid crashes. And the user-interface could be implemented in a way to first just ask for 100 entries to have something to show, while after this asking the entire list in the background. Just not a big fan of this, because if would cause some overhead.

About the number of list entries, clearly one could put this number for any list into the state model. But again, I believe it is much better to have a generic approach for this.

/wiso

On 14.03.19, 10:35, "Juergen Schoenwaelder" <j.schoenwaelder@jacobs-university.de> wrote:

    One of the issues to consider is that depending on the datastore
    accessed, the data can change more or less rapidly and it is unclear
    whether you want servers to maintain potentially big amounts of state
    between requests. If you retrieve data in chunks, the question is
    whether you can simply put the data back together or the client side
    or whether this may lead to data that never really existed in that
    form on the server. With RESTCONF, etags may help to check whether the
    resource queried remains consistent (but then the server still has to
    be able to decide etag changes).
    
    But backing up for this discussion of details, I agree that this is a
    problem worth solving by standardizing a common solution.
    
    /js
    
    On Thu, Mar 14, 2019 at 09:23:53AM +0000, Wisotzky, Sven (Nokia - DE/Stuttgart) wrote:
    > All,
    > 
    > There was some discussion in earlier days (back in 2012/2014) to support paging for extra-long lists. The main use-case is clearly to improve support for interactive user-frontends, as loading entire lists with potentially more than 100.000’s objects easily can become a nightmare: loading time, memory consumption, crashes, …
    > 
    > For the sake of implementation, one would simply provide an attribute called “max-count”, “max-entries”, “max-elements” or “limit” – which basically defines the upper limit of list entries to be returned. Asking for limit=10 – even if the list contains a 100k the result would simply show 10. From an user-interface point of view, this might be enough – as users would see how the list entries look like to narrow down the search by adding additional search/filter criteria. So to protect the client system and improvements on loading time/memory consumptions – this might be just enough.
    > 
    > More advanced implementations might allow the NETCONF client to specify the “offset” which is basically the index of the first list entry to be returned. In such case, the client could continue to load further pages on customer demand (like dynamically while scrolling down the list or pressing on the next button). Even if people are not curious that much about memory consumption, even it should be possible to continue loading the remaining list in the background – while showing the first X items faster on the user-interfaces.
    > 
    > To make such paging solution even more complete, following use-cases are to be reviewed from a RESTCONF/NETCONF API point of view:
    > /1/ How to figure out the number of list entries matching the given criteria for a given list, without the need to poll the entire list? This could be helpful to operators straight away, but also allows easier implementation for things like progress bars.
    > /2/ Define a sorting criteria for search results
    > /3/ Improve filtering capabilities for subtree filters (e.g. contains operator)
    > 
    > I did not found any active DRAFT or RFC for this. That said, we can see various vendors implementing proprietary solutions for this in their RESTCONF stacks.
    > Would really like to see an IETF defined approach for this, to avoid multi-vendor clients need to deal various vendors implementations.
    > 
    > /wiso
    
    > _______________________________________________
    > netconf mailing list
    > netconf@ietf.org
    > https://www.ietf.org/mailman/listinfo/netconf
    
    
    -- 
    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/>