Re: [netconf] restconf collections

Qin Wu <bill.wu@huawei.com> Thu, 01 October 2020 04:33 UTC

Return-Path: <bill.wu@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 7B2783A0A6A for <netconf@ietfa.amsl.com>; Wed, 30 Sep 2020 21:33:26 -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, RCVD_IN_MSPIKE_H2=-0.001, 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 jPGc4-xwhw2M for <netconf@ietfa.amsl.com>; Wed, 30 Sep 2020 21:33:25 -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 E11003A0A2E for <netconf@ietf.org>; Wed, 30 Sep 2020 21:33:24 -0700 (PDT)
Received: from lhreml718-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id BC39B2A4BE4A37858B6B for <netconf@ietf.org>; Thu, 1 Oct 2020 05:33:22 +0100 (IST)
Received: from lhreml718-chm.china.huawei.com (10.201.108.69) by lhreml718-chm.china.huawei.com (10.201.108.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Thu, 1 Oct 2020 05:33:22 +0100
Received: from DGGEML403-HUB.china.huawei.com (10.3.17.33) by lhreml718-chm.china.huawei.com (10.201.108.69) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.1.1913.5 via Frontend Transport; Thu, 1 Oct 2020 05:33:21 +0100
Received: from DGGEML531-MBS.china.huawei.com ([169.254.5.245]) by DGGEML403-HUB.china.huawei.com ([fe80::74d9:c659:fbec:21fa%31]) with mapi id 14.03.0487.000; Thu, 1 Oct 2020 12:33:16 +0800
From: Qin Wu <bill.wu@huawei.com>
To: Kent Watsen <kent+ietf@watsen.net>, =?utf-8?B?TWFydGluIEJqw7Zya2x1bmQ=?= <mbj+ietf@4668.se>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] restconf collections
Thread-Index: AdaXqmqKAXfr1Ii5SXaCwhU6e4V5sQ==
Date: Thu, 1 Oct 2020 04:33:15 +0000
Message-ID: <B8F9A780D330094D99AF023C5877DABAADA3660D@dggeml531-mbs.china.huawei.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.46.72.214]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/aNPKBfi9rgvtQnYJv8qxiV-Gwr4>
Subject: Re: [netconf] restconf collections
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, 01 Oct 2020 04:33:32 -0000

>> Yes, XPath is the “right answer”, but we need to ensure it’s 
>> constrained enough to be mappable to common DB-backends.
> 
> So the client talks to the server, and the server talks to the "db"
> backend (note that in many implementations  operational state is 
> typically not stored in a real database).

Some opstate must be persisted, e.g., long-lived counters, logs, etc., but it’s a good point about other opstate not being persisted.   Perhaps “node-tags” can be used here, to differentiate which is which…and servers can indicate if/how they support the ephemeral opstate leafs in queries?

[Qin]:That's a good case for node tag, in earlier discussion, we discussed operation type, which distinguishs cumulative statistics value from current value. The case discussed here is very close to operation type proposal discussed earlier.

> So we have:
> 
>  client ->  server ->  backend
> 
> If we don't have any filter capabilities, the client has to get 
> everything, and then filter.  If we support XPath and the backend 
> doesn't support it, the server will have to filter.  This is still 
> more efficient than filtering in the client.

Probably, especially when assuming the server has better resources and/or the client <--> server bandwidth is constrained.


> In ConfD/NSO we moved more and more filtering logic towards the 
> backend, to speed up performance.

Ack.


> I think e) is way more important than c).  I suggest focus on a + b + 
> c.

Noted, but I think you meant a + b + e.

Note sure how others feel about “direction: (c), but my primary use-case revolves around time-series data (e.g., logs), where the interest is commonly on the most-recent entries, so "reverse-->offset—>limit” works nicely.  

Perhaps an alternative would be to lift a concept from Python with negative indexes so, for instance, offset=-N and limit=-N gives the last N entries?
[Qin]: Yes, that's what I thought as well, with negative indexes, (b) and (c) seems to me, can be combined.

>> Sure, but I wonder if, e.g., a netmask filter, is supportable by 
>> common DB-backends.  I’m hoping we have some DB-experts on the list!
> 
> See above.  It can be quite efficient even if the backend doesn't 
> support it.

I don’t see that above, but I don’t doubt that it can be so, it’s just a whole lot of implementation complexity.  It seems that we should/must support servers doing it, we just need to find a way (node-tags?) to enable them to express that ability.
[Qin]: My feeling is this efficiency more depends on the amount of data we need to request. If amount of data we request is huge, maybe, client-> server-> backend may be the better choice.

K.



_______________________________________________
netconf mailing list
netconf@ietf.org
https://www.ietf.org/mailman/listinfo/netconf