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

"Wisotzky, Sven (Nokia - DE/Stuttgart)" <sven.wisotzky@nokia.com> Thu, 14 March 2019 12:14 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 90B8E1288AB for <netconf@ietfa.amsl.com>; Thu, 14 Mar 2019 05:14:22 -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 iBSUuDWTEPXF for <netconf@ietfa.amsl.com>; Thu, 14 Mar 2019 05:14:20 -0700 (PDT)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80135.outbound.protection.outlook.com [40.107.8.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ADD5012DF71 for <netconf@ietf.org>; Thu, 14 Mar 2019 05:14:19 -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=HbBCidErZGCT4LHQZFjKuIAyxcA2zhghRTusk3AdzCU=; b=V5fgxIK4HloxOhir10YWvfzoCr/eElyG8vO9fTTKrtwFUo9XH/nTxwIggCX+D6NsZnP9qbL0sGK2EkfcBnGdaCavGtwdOWcW7+XK7wSHVxWwLPKDu7sSP+fRmjiVzWsH/+rnNjrAruEjp/hgSVAyUPXMHXLSodfW2Wj+lwRklyg=
Received: from DB7PR07MB5386.eurprd07.prod.outlook.com (20.178.46.26) by DB7PR07MB5546.eurprd07.prod.outlook.com (20.178.45.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.8; Thu, 14 Mar 2019 12:14:16 +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 12:14:16 +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: AQHU2kekdlWyfgR30USJDGKLseBWaqYK3hEAgAAZnQD///sMAIAAKFuA
Date: Thu, 14 Mar 2019 12:14:15 +0000
Message-ID: <84900927-1EB4-4DD5-9020-1F17990D1285@nokia.com>
References: <C88A38CA-44B5-42A0-9DFA-A67AE5456951@nokia.com> <20190314093552.3pwa7ptrre4t2stk@anna.jacobs.jacobs-university.de> <9DE27BCF-61F3-4085-A1F8-0FEAD76F85A5@nokia.com> <20190314104948.db6tbadwgo74pbgz@anna.jacobs.jacobs-university.de>
In-Reply-To: <20190314104948.db6tbadwgo74pbgz@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
authentication-results: spf=none (sender IP is ) smtp.mailfrom=sven.wisotzky@nokia.com;
x-originating-ip: [188.97.190.16]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 1c15466e-32b0-4bd4-80f9-08d6a87693e7
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:DB7PR07MB5546;
x-ms-traffictypediagnostic: DB7PR07MB5546:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <DB7PR07MB5546D47170330206D018626BE94B0@DB7PR07MB5546.eurprd07.prod.outlook.com>
x-forefront-prvs: 09760A0505
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(39860400002)(376002)(346002)(396003)(366004)(199004)(189003)(6916009)(316002)(26005)(81166006)(6116002)(7736002)(446003)(11346002)(6246003)(81156014)(8676002)(93886005)(5660300002)(53936002)(36756003)(83716004)(97736004)(102836004)(99286004)(3846002)(71200400001)(6306002)(256004)(14444005)(58126008)(66574012)(6512007)(186003)(71190400001)(2906002)(229853002)(6486002)(82746002)(8936002)(2616005)(486006)(305945005)(14454004)(86362001)(76176011)(476003)(105586002)(106356001)(25786009)(66066001)(6506007)(68736007)(4326008)(33656002)(6436002)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB7PR07MB5546; H:DB7PR07MB5386.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: pUrN1xxnO+EqtW2FS12PvE84PEGEbBzdsk+Km9roEzIw16p+4wip4Jo8yoV2xuIcRM9kj57EReTn3WqIVzGRWqMAwCYx0XOvWJCQM2WxgKn5y3fKATx3Viu07y4Ls6VpNShTYQ2ycH8vbNnRVLTnvKQZAuuMvVzyW4Dr7KoYy/5Tb3LfdSJSVN5wV8qvFnSxm+7vsuTgwKRAytAuiyNkhGnzzojdVV6mt4TiblD0YxNibSFLPL4ghaaOzm7YQqWs0aHK2A6dWLBTdadWsF/2uvtvAw8n21gHRiyYH1rOlfjP4mUBjpQ5lbEfYqvzRopGlsYQQo9GEBXsMY6aNowCsmJI7+w3kVZoru/epxj94qnE8pRi2lfHdaQ5j1BWblyCrcH7vrd1FCT2+TRMXAr0vM4LzWlyNJXLe38rZpP1qrQ=
Content-Type: text/plain; charset="utf-8"
Content-ID: <14296DAEB3A0E44BAFAF3A3204E14049@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 1c15466e-32b0-4bd4-80f9-08d6a87693e7
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2019 12:14:15.9352 (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: DB7PR07MB5546
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/9aY7lihi8AGIKPIvPGX_wvt70Eo>
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 12:14:22 -0000

Depends on whatever we call here a crash. The challenging part of NETCONF/RESTCONF is, that the client would not know how big the get/get-config reply would become. Having a JS-based WebUI client running a RESTCONF query, you easily end up in situations, where you basically need to terminate the javascript because it runs out of memory. And I've even seen situations, where the browser itself did not respond anymore (swapping to disk, ...).

By introducing a protection mechanisms like max-count, the client can control to a certain extent how much data will be received. And by using paging for post loading in the background, the client could still decide if it is possible to load another page or not. So when running out-of-memory or when start swapping, the client could avoid loading any further pages. Generally I am thinking this is a very reasonable aka controlled  approach.

With NETCONF today, for sure one could terminate the NETCONF sessions if too much data is received and might try using a XML stream reader to process what has been received so far. But would claim that this is not a good approach at all and should be avoided.

/wiso




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

    On Thu, Mar 14, 2019 at 10:07:33AM +0000, Wisotzky, Sven (Nokia - DE/Stuttgart) wrote:
    > 
    > 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.
    
    Sorry, but if code crashes, then someone has to fix the code. Adding
    query parameters is not the right answer for this.
    
    /js
    
    -- 
    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/>