Re: [netconf] restconf collections

Martin Björklund <mbj+ietf@4668.se> Tue, 29 September 2020 18:57 UTC

Return-Path: <mbj+ietf@4668.se>
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 C14223A10DE for <netconf@ietfa.amsl.com>; Tue, 29 Sep 2020 11:57:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.101
X-Spam-Level:
X-Spam-Status: No, score=-0.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_NAKED_TO_NUMERO=1.997, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=VjUDkJSx; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=saxUjLmm
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 42jnSPrsb44e for <netconf@ietfa.amsl.com>; Tue, 29 Sep 2020 11:57:16 -0700 (PDT)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 992CD3A10DD for <netconf@ietf.org>; Tue, 29 Sep 2020 11:57:16 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 04F295C00B1; Tue, 29 Sep 2020 14:57:14 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 29 Sep 2020 14:57:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=date :message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm2; bh= IEUbirBii9aBvXM1v3VdeI7gH9eeCcTYXD3/WvtizWY=; b=VjUDkJSxJlCv8B0X EgtrNO2dQSleDHL9k41cTgyl5prV/gAa/5R96Jnw1hUQOPkvtbVQykMAs9I6jbtz TjjKOh2eZC48/HmhHSxZJgVNqpCjt8ifMuJnFS9kjOhnQgdzHwiN1zG+brCdtEI4 QpYcPKBdT5IcyL1ospp+H0vfP35Siffei55/+Q8Ae/oj8X0oAUJSyG13Q/TOchdd VHyK5CZ1FhDiZ/AxcjlDDKeNeZ82RlYbFD+vENudYadKEOf73B83cOc9QnWTGooP 7au6lh6lYqHBhMbd5aZ5mNJaBI/3mGuV0TwiyXpjxeiDS0S2TrehZ7aFRvs0wVRs LueIrw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=IEUbirBii9aBvXM1v3VdeI7gH9eeCcTYXD3/Wvtiz WY=; b=saxUjLmmNHOUDKWFJro/uO5xeSGD81jfgWFZ9Jx/5ek2CZQTRklTbxXAX r3MKSyFimd+ThQcdHjj/n/t3mEuTS7tcLptDOM27Jd0AYJkDj1wg5fUStauzA+M8 drI3zsbjcXtmlY3IcOJ5BxDcav5NVXNmf50go2Cqpfp2bevjEkSoSgSrQAZxMx4T ZL799Qqn9Nj4LnklQrYi+yNewRVrWgIPitQtoQENsYz6aaKSNZKb22/jroOc+yg4 N2MsA0xz4Jxa/sVxWZmhbPIICqVPnuvscrbQgfTOely3KLn/XcvobTjG7yrdoRVG DwZZYpASZS0shJj8JUVXtiXoGW+Gg==
X-ME-Sender: <xms:iINzXyPiKXNonukJRkiQ2GL6BxmkKnPPVeZRPCBwNwlC0snjQKyBNA> <xme:iINzXw_XOsQcdFsVDY5DxwKDXr1Qo3RDnD3002Q65AYIC08oPQkgrlMKf5ExlWn4d _FYXiaJHvl2vGgDte4>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdekgddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffkffvuffhjghfofggtgfgsehtsg ertdertdejnecuhfhrohhmpeforghrthhinhcuuehjnphrkhhluhhnugcuoehmsghjodhi vghtfhesgeeiieekrdhsvgeqnecuggftrfgrthhtvghrnhepheetgedtfffggeffkedvje ekveelteeuuddttdffhfelgfetvdevhedvgeeutddunecukfhppeduheekrddujeegrdeg rddvudehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgsjhdoihgvthhfseegieeikedrshgv
X-ME-Proxy: <xmx:iINzX5RjeaXLDWa3ToxIfkUjD3kM20sSJCFQyafnRe-RXZJibf0dtg> <xmx:iINzXyvKee1llpU3KX1jN7EoC2hLzh0A9aLP65mrz6anewgfT1qyuA> <xmx:iINzX6d6ZW56Ofwdcuo2_CE1ReRYyjM39N0vcVrFRngbAoYlQY0DSA> <xmx:iYNzX8o8F61Ut8VG5F1oy1tUph_hAOYgqfX-N7ND6nVv8J0e9ZtbWQ>
Received: from localhost (unknown [158.174.4.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 4E97A3064610; Tue, 29 Sep 2020 14:57:12 -0400 (EDT)
Date: Tue, 29 Sep 2020 20:57:10 +0200
Message-Id: <20200929.205710.165167541047857442.id@4668.se>
To: kent+ietf@watsen.net
Cc: netconf@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <01000174daf6ded3-0ba5564d-f1c7-4c65-90dc-d8a22f2f9395-000000@email.amazonses.com>
References: <CABCOCHTT=vQWNY9iTUG8Dy8s7qrA0sP5rKcRgsjZkWuXG+q78Q@mail.gmail.com> <01000174d5174af9-848a769d-ef3f-49a6-b1d6-1eb8349a489f-000000@email.amazonses.com> <01000174daf6ded3-0ba5564d-f1c7-4c65-90dc-d8a22f2f9395-000000@email.amazonses.com>
X-Mailer: Mew version 6.8 on Emacs 26.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/DqD-x6a5SE75FonYSQPQ3HvJ11s>
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: Tue, 29 Sep 2020 18:57:18 -0000

Hi,

Kent Watsen <kent+ietf@watsen.net> wrote:
> 
> Firstly, thank you to those that responded showing interest in working
> on these I-Ds.  If anyone else is interested, please send me a PM.
> 
> Regarding solution, I want to take one more stab at a sketch here, as
> a last-chance for comments before the authors dive into producing the
> I-Ds.
> 
> Already it is assumed that there will be an RPC for NC, and query
> params for RC…that not what this email is about.
> 
> Here’s my proposal:
> 
> 	For all lists;
> 
> 		a) “limit” or “count”
> 		b) “offset" or “skip”
> 		c) “direction”  (i.e., forward/backward)
> 
> 	For non “ordered-by user” lists, but only for indexable columns:
> 
> 		d) “sort-by” or “ordered-by” (single column max)
> 		e) “where” or “filter” (compound expression of some sort)

I don't think d) and e) should be restricted to obu lists, and I don't
think they should be restricted to "indexable" columns.

And I think "expression of some sort" should be XPath.

Also, since the main objective is efficient retrieval, "sort-by"
can perhaps be removed.  Consider large lists in operational state
that also change often.

> 	Note: the lowercase “or” is just for the label selected (no semantic
> 	impact).
> 
> 
> The order of operation is “e —> a”.  That is, first the filter is
> applied (if any), then the sort is applied (if any), then the
> direction is applied (if any), then the offset/skip is applied (if
> any), and then the limit/count is applied (if any).
> 
> Now the tricky stuff.
> 
> 	- “key” and “unique” leafs are indexed by default, assuming
> 	  the leaf’s base type is indexable
> 	- a special extension is used to index other nodes
> 	- other indexable nodes must be a “leaf"
> 	- the leaf must be “mandatory true”
> 	- the leaf must not be under a “list” or “choice” node
> 	- the leaf must have an indexable base type
> 		- all built-in types supported except:
> 			- binary
> 			- instance-identifier
> 		- unions are indexable, but assumes all values stored
> 		   as a “string” in the DB.
> 		- “string” types may be coerced into more DB-friendly types
> 			- “yang:date-and-time” mapped to a DB “DateTime” type
> 
> Cons:
> 	- smart (e.g., netmask-based) filter/sorts is unlikely supportable
> 		- at least not without custom (not generic) code

We could define a few more XPath functions for such comparisons.



/martin

> 
> 
> Comments?
> 
> K.
> 
> 
>