Re: [netconf] restconf collections

Kent Watsen <> Thu, 01 October 2020 13:32 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 7D0083A103D for <>; Thu, 1 Oct 2020 06:32:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.895
X-Spam-Status: No, score=-1.895 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id pO_yUY1w1-C2 for <>; Thu, 1 Oct 2020 06:32:06 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 28E7B3A1053 for <>; Thu, 1 Oct 2020 06:32:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono;; t=1601559125; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=J1f8yfPfh46eBp9SJI97AjGbP79BphHyI0UenX1CFZk=; b=bROcyD5zO8Y83Ea+4qw5YveeCoB0wotfiYD9C5DnJzJZTFw0ULLp7h0oy5iRpTLH LQwtCXMFp7OE/HO5khSuM6RzgUXumhjCBc4NuNg8M3lq2QHufjJKyqgTZiMceTO+NiH XK4DNtNCd/y0R5u+qwKBJLXXIT/rDd/3/Dsc2/HM=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.\))
From: Kent Watsen <>
In-Reply-To: <>
Date: Thu, 01 Oct 2020 13:32:04 +0000
Cc: Qin Wu <>, "" <>
Content-Transfer-Encoding: quoted-printable
Message-ID: <>
References: <> <> <>
To: Martin Björklund <>
X-Mailer: Apple Mail (2.3608.
X-SES-Outgoing: 2020.10.01-
Archived-At: <>
Subject: Re: [netconf] restconf collections
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 01 Oct 2020 13:32:08 -0000

> On Oct 1, 2020, at 9:23 AM, Martin Björklund <> wrote:
> Kent Watsen <> wrote:
>> Hi Qin,
>>> 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.
>> Yes.  Thank you for pointing that out.  I meant to make the same
>> observation before.  Indeed, such node-tags could have dual-purpose:
>> to guide a streaming-strategy and a querying-strategy for certain
>> nodes.
>>> 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.
>> Can others comment on this?
> Isn't this just another syntax for the same function?

No, it is not.


> /martin
>> Presumably, we could eliminate “direction” (c) with this approach.  
>> Without “direction”, I think that UIs can still support the ability to
>> do column-sorts, whereby the user clicks on a column’s header to
>> toggle ascending vs. descending presentation, but they’ll have to do
>> it client-side.
>> That is, if wanting to see the 2nd page of results sorted by a column,
>> something like:
>> 	sort(column-name) --> offset(-2*pagesize) --> limit(pagesize)
>> Followed by the client then flipping the results to present the
>> results in the user-selected order, right?
>> That said, given that DB-backends that support sorts commonly also
>> support direction, it's unclear what this buys us.
>>>>> 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.
>> Is it the amount of data requested or the number of entries in the
>> list?  At least, in my worldview, clients are always requesting a
>> “page” of data, so that part is rather consistently small.
>> If the intention is to get a complete dump, then maybe the comment
>> from yesterday applies, whereby streaming to an external repository
>> that can be queried offline makes more sense?  - especially
>> considering that the number of on-box logs is likely to be only the
>> most recent (e.g., days), whereas the complete-dump type queries
>> likely wish to extend well-past that.
>> K.