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

wangzitao <wangzitao@huawei.com> Fri, 15 March 2019 01:54 UTC

Return-Path: <wangzitao@huawei.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 B5665130F29 for <netconf@ietfa.amsl.com>; Thu, 14 Mar 2019 18:54:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] 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 OFgH1LN0OVZs for <netconf@ietfa.amsl.com>; Thu, 14 Mar 2019 18:54:51 -0700 (PDT)
Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) (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 1EE0F124B16 for <netconf@ietf.org>; Thu, 14 Mar 2019 18:54:51 -0700 (PDT)
Received: from lhreml702-cah.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 05D7174E7E5BE1FF5D46 for <netconf@ietf.org>; Fri, 15 Mar 2019 01:54:49 +0000 (GMT)
Received: from DGGEMM401-HUB.china.huawei.com (10.3.20.209) by lhreml702-cah.china.huawei.com (10.201.108.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 15 Mar 2019 01:54:43 +0000
Received: from DGGEMM527-MBX.china.huawei.com ([169.254.6.77]) by DGGEMM401-HUB.china.huawei.com ([10.3.20.209]) with mapi id 14.03.0415.000; Fri, 15 Mar 2019 09:54:37 +0800
From: wangzitao <wangzitao@huawei.com>
To: Douglas Hubler <douglas@hubler.us>, "Wisotzky, Sven (Nokia - DE/Stuttgart)" <sven.wisotzky@nokia.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] Current activities on RESTCONF/NETCONF to support paging
Thread-Index: AdTa0NoVunCd1tZJRWC3RA+1mlX0vQ==
Date: Fri, 15 Mar 2019 01:54:36 +0000
Message-ID: <E6BC9BBCBCACC246846FC685F9FF41EA2D9703A5@DGGEMM527-MBX.china.huawei.com>
Accept-Language: en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.134.142.117]
Content-Type: multipart/alternative; boundary="_000_E6BC9BBCBCACC246846FC685F9FF41EA2D9703A5DGGEMM527MBXchi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/8aiQS0t8cVS6UZcimWYJepntyiU>
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: Fri, 15 Mar 2019 01:54:54 -0000

发件人: netconf [mailto:netconf-bounces@ietf.org] 代表 Douglas Hubler
发送时间: 2019年3月15日 4:09
收件人: Wisotzky, Sven (Nokia - DE/Stuttgart) <sven.wisotzky@nokia.com>
抄送: netconf@ietf.org
主题: Re: [netconf] Current activities on RESTCONF/NETCONF to support paging



On Thu, Mar 14, 2019 at 5:24 AM Wisotzky, Sven (Nokia - DE/Stuttgart) <sven.wisotzky@nokia.com<mailto:sven.wisotzky@nokia.com>> wrote:
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, …

speaking from experience, RESTCONF is very usable straight from interactive user-frontends and this is one of the key things missing.  I did add a custom parameter to FreeCONF's RESTCONF implementation to support this.  Maybe I took this took far, but I decided that because data is in a hierarchy you might have multiple lists you need to page thru so I came up this this parameter

   range=b/c!N-M

returns rows N thru M inclusive in list under path b/c.  And that you can specify multiple ranges for multiple paths.  Front ends usually have no problem remembering what number they are on to track N and M.

As brought-up, for lists that are highly dynamic, this strategy is bit naive and maybe etags can help the clients that need to know when list has changed and they might need to start over.  For my backend, I could start iteration at row N without have to manage a cursor.


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.

+1
Agree with you. Actually, there are some discussions in this WG. And there is an expired<https://datatracker.ietf.org/drafts/draft-ietf-netconf-restconf-collection> draft that try to address these issues (https://tools.ietf.org/html/draft-ietf-netconf-restconf-collection-00).
IMO, these problems also exist in NETCONF, therefore, a common solution is required.

Best Regards!
-Michael