Re: [netconf] restconf collections

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

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2C8F13A1030 for <>; Thu, 1 Oct 2020 06:36:42 -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 JJcDSfa7mOAa for <>; Thu, 1 Oct 2020 06:36:40 -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 5F25D3A1056 for <>; Thu, 1 Oct 2020 06:36:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono;; t=1601559399; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=fnQNj64pj0GqOdOM4hUlAJP29I0fiiktCwWytHqIiGM=; b=Of0iQjYYViAXxzKepEPMT9kqKXjrgm0fx/IVMkL9Yc4wCqIrdmwWoRUrlFneipzv 5yucXVAwNMHP3gNUR1eiglHaLQgyJ4NrfhWY4mGujanoycV6ZU51gKrP2Uma2SzTAn5 67nLbuLb0clvjh0opeUb+Vkn1mdZfvrlwwgsGhh8=
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:36:39 +0000
Cc: Olof Hagsand <>, "" <>
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:36:42 -0000

Hi Martin,

>> A couple messages I sent yesterday alluded to defining an extension
>> statement that could be added to nodes in the YANG modules.
>> Now I’m thinking that one-size doesn’t necessarily fit all, and
>> something like a server-specific “node-tag” would be more flexible.
>> (
>> <>)
>> Maybe the answer is somewhere in-between, i.e., an extension that acts
>> like a “hint” and a node-tag indicating if the server delivered it.
>> Bad news w/ an extension is that legacy modules would need to be
>> revved or augmented.
>> One thing, though, filtering on non-indexed nodes is guaranteed to
>> have slow performance, thus it seems that we need to enable indexing
>> for more than just a list’s keys.
> I disagree with both these statements.  This is an implementation
> issue.

Which two statements?   And how do you come to that conclusion, unless you’re suggested that all queries from particular server are equally slow?  ;)

>> My conjecture is that, once we have the indexes for filtering (e),
>> they can be used for sorting (d).  At least, that’s the way it works
>> with some DB-backends I’m familiar with...
> This is one implementation strategy.  We should not design the
> standard around one implementation.

Please elucidate how this isn’t the case.

While a true statement, it’s an unfair implication, as pretty much *everything* I’ve written on this thread has been about trying to enable servers with various DB-backends to express which parts of the solution they can support.   Apparently some backends don’t support “sorts” while others do; some backends can support full Xpath while other can’t, etc.   All this means to me is that we need to define the necessary features and/or node-tags or whatever to enable each to advertise what it can do best, or at all.

If the WG wants the lowest-common denominator, we will likely end up with just ‘a', ‘b', and a heavily redacted Xpath for ‘e’.  I’m hoping that we can do better than that, but I’m also okay with leaving it to each solution can then create proprietary extensions/node-tags, if that is the WG consensus.

> I agree that this can be useful.  But as has been pointed out earlier
> in this thread, sorting implies a stateful solution which will consume
> more resources and probably comes with some additional complexity.

True, except I think the augment was in *favor* of doing that, at least in some cases.

Also note that the “more resources” augment needs to be amortized over the number of queries.  There must be a break-even point whereby preparing a (resource-intensive) snapshot actually uses less resources over time, after it's been queried a certain number of times, than a server doing a fresh (lower-resource) query for each request.

> At Cisco/tail-f we implemented such a solution; a more generic "query"
> mechanism, for both NETCONF and RESTCONF.  Perhaps Per A can share
> some details.

That would be helpful.  The analysis can only take into account that which is known.  I know the Tail-f products used a custom database, but few know anything about it.  

Creating a custom database is not easy.  I know, as I personally wrote a very-fast logging system, complete with indices, for a logging database taking in logs at the rate of 50,000 logs per second, with the total number of logs retained measured in the billions.  

I personally do not wish for a *basic* server to have to go through that pain, hence the interest in supporting common DB-backends (NoSQL, SQL, etc.), while also enabling systems with special abilities to present that which can.