Re: [core] Questions/Review on draft-ietf-core-resource-directory-12

'Christian Amsüss' <c.amsuess@energyharvesting.at> Fri, 03 November 2017 07:57 UTC

Return-Path: <c.amsuess@energyharvesting.at>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 649EF13FCD7; Fri, 3 Nov 2017 00:57:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 RcHLMNXDjUsn; Fri, 3 Nov 2017 00:57:07 -0700 (PDT)
Received: from prometheus.amsuess.com (prometheus.amsuess.com [5.9.147.112]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3C6C713FCD4; Fri, 3 Nov 2017 00:57:06 -0700 (PDT)
Received: from poseidon-mailhub.amsuess.com (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bd]) by prometheus.amsuess.com (Postfix) with ESMTPS id DC4B94747B; Fri, 3 Nov 2017 08:57:04 +0100 (CET)
Received: from poseidon-mailbox.amsuess.com (poseidon-mailbox.amsuess.com [10.13.13.231]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id C79352A; Fri, 3 Nov 2017 08:57:01 +0100 (CET)
Received: from hephaistos.amsuess.com (hermes.amsuess.com [10.13.13.254]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 7B45229; Fri, 3 Nov 2017 08:57:01 +0100 (CET)
Received: (nullmailer pid 9968 invoked by uid 1000); Fri, 03 Nov 2017 07:56:59 -0000
Date: Fri, 03 Nov 2017 08:56:59 +0100
From: 'Christian Amsüss' <c.amsuess@energyharvesting.at>
To: Jim Schaad <ietf@augustcellars.com>
Cc: draft-ietf-core-resource-directory@ietf.org, 'core' <core@ietf.org>
Message-ID: <20171103075658.d2sueg4hvkien62l@hephaistos.amsuess.com>
References: <01e301d352a7$fa605670$ef210350$@augustcellars.com> <20171102092710.ofnzgqtrgkagd2c5@hephaistos.amsuess.com> <02d101d35457$cae687f0$60b397d0$@augustcellars.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="d6z5x5o37go2es2b"
Content-Disposition: inline
In-Reply-To: <02d101d35457$cae687f0$60b397d0$@augustcellars.com>
User-Agent: NeoMutt/20170609 (1.8.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/4twokzCubBRvDgY9kcxPxVPdmXI>
Subject: Re: [core] Questions/Review on draft-ietf-core-resource-directory-12
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 03 Nov 2017 07:57:09 -0000

On Thu, Nov 02, 2017 at 08:56:53PM -0700, Jim Schaad wrote:
> I really like the idea of being able to have entries in a group be on a
> different server, right up to the point where I start trying to implement
> the search algorithm that you have specified.  At that point my code is
> suddenly making lots of potential queries to the other RD in order to find
> out if some parent/child is going to have the attribute that I am looking
> for.  

I was envisioning a cluster where each node keeps the data registered
with the other ndoes in an eventually consistent cache; maybe I'll find
time to sketch that out a bit further before the meeting.

> > What worries me a bit is the performance impact of looking for possibly
> > matching resource attributes in any group lookup, but probably it
> shouldn't.
> 
> It's interesting, I was sure there was an example along the lines of
> 
> GET /rd-lookup/ep?rt=temperature-c
> 
> But I don't see it there now.

The example that's there is /rd-lookup/gp?ep=node1

> > > Consider "?d=example.com&rt=foobar"  which would match the 'd' on
> > > the endpoint but the 'rt' on a resource.  So two questions - the
> > > first would be looking at two different items at two different
> > > levels (i.e. group and resource), the second would be two items at
> > > the same level (i.e. two different resources/endpoints which are
> > > children/grandchildren of me).
> 
> It would be clearer if I said I was looking for a group or an end-point with
> these parameters.  I probably should have used something other than d= to
> something that was clearly only set on a group.

I see. Both these questions (`WHERE ep.d=="example.com"` and `JOIN ...
WHERE group.d=="example.com"`) are, in the simple query language of
search parameters, expressed in the same way and returned as their
union.

We don't have a partitioning on the names to tell the intended query
apart. (d can be on both endpoint and group, and there's no registry for
link parameters so we can't rule out conflicts).

What we could do to mitigate that ambiguity is to make the query
language slightly more complext (so your endpoint queries might be
`?d=example.com&res→rt=foobar` vs. `?gp→d=example.com&res→rt=foobar`),
but that won't reduce the complexity but only make it more visible.

Do you think that the availability of search in both directions of the
tree is an issue for implementations (esp. distributed one), or is it
more a problem of specification or interface clarity that the meanig of
the query is not immediately obvious?

Best regards
Christian

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom