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

Jim Schaad <ietf@augustcellars.com> Fri, 03 November 2017 03:57 UTC

Return-Path: <ietf@augustcellars.com>
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 C46E813FB52; Thu, 2 Nov 2017 20:57:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=augustcellars.com
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 Jfp-LMFqzCl7; Thu, 2 Nov 2017 20:57:02 -0700 (PDT)
Received: from mail4.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B0C5113FB4C; Thu, 2 Nov 2017 20:57:02 -0700 (PDT)
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Language: en-us
DKIM-Signature: v=1; a=rsa-sha256; d=augustcellars.com; s=winery; c=simple/simple; t=1509681422; h=from:subject:to:date:message-id; bh=CpuVPq/m8esTY4NU0M7hsgO6jPaMHc70vEKG9OQKqtI=; b=g8d01ZSxCEd8gUNDit7Dxh6QWrsR8GxZekPDCUkO+wZFFkTq8Qf8nSh3vB1vJzoHgX11a7cs9cZ 0qSm12jR4QGR5HNNuW9O1DQ27CSe9u+PoG2Q0HEUZ64EPktnVgiK0GXpCjRaEZVU4EPWag5IcS2+5 /EV9b7LyDWYe0h4Etvug2Jx6dCy8I1ureso+Y53ACmBqa9XcHxDeB8v8SuYeFodZSmH6tGJmeVYPw IDEyMT2DrJrQiXoi2GsgrdSkAKxepnqpO0s4alxUyC1kNT9RxYe9VSmPQgpf8Bz3quGIarFfIOVh0 k3ABmHToepREeIBDSnXGtahmm2jkw0VoKwDg==
Received: from mail2.augustcellars.com (192.168.1.201) by mail4.augustcellars.com (192.168.1.153) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 2 Nov 2017 20:57:01 -0700
Received: from Hebrews (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 2 Nov 2017 20:55:56 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'Christian Amsüss' <c.amsuess@energyharvesting.at>
CC: draft-ietf-core-resource-directory@ietf.org, 'core' <core@ietf.org>
References: <01e301d352a7$fa605670$ef210350$@augustcellars.com> <20171102092710.ofnzgqtrgkagd2c5@hephaistos.amsuess.com>
In-Reply-To: <20171102092710.ofnzgqtrgkagd2c5@hephaistos.amsuess.com>
Date: Thu, 02 Nov 2017 20:56:53 -0700
Message-ID: <02d101d35457$cae687f0$60b397d0$@augustcellars.com>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQI2wro6bo3A21QBybHZKsa9hXq9QAHVHnO5oix+HDA=
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/yi7Pp_41Ogu2buCvKOHOF7GVrU0>
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 03:57:05 -0000


> -----Original Message-----
> From: Christian Amsüss [mailto:c.amsuess@energyharvesting.at]
> Sent: Thursday, November 2, 2017 2:27 AM
> To: Jim Schaad <ietf@augustcellars.com>
> Cc: draft-ietf-core-resource-directory@ietf.org; 'core' <core@ietf.org>
> Subject: Re: Questions/Review on draft-ietf-core-resource-directory-12
> 
> Hello Jim,
> 
> responses inline:
> 
> On Tue, Oct 31, 2017 at 05:25:50PM -0700, Jim Schaad wrote:
> > 1.  When creating a group registration, can the link to an endpoint be
> > on a different resource directory?  This second RD could be either on
> > a different machine or on the same machine (i.e. coap vs coaps).  If
> > the answer is no, then do we need to think about some type of relation
> > attribute in the case that multiple are listed somewhere?
> 
> I like to think so (having a more distributed model in mind), but we
haven't
> discussed it yet.
> 
> As for the specification, I think we should say that the CTs operating on
the tool
> working on the group "SHOULD refer to the endpoint registrations either as
a
> path-absolute relative reference (if it obtained the reference from the
Location
> option when it conducted the registration itself), or use the reference as
> serialized when it obtained the location from an endpoint lookup from the
> same RD origin".
> 
> This leaves the door open for federating RDs (where some endpoint
> registrations are located at another RD host, but still available for
lookup at the
> closest host), but discourages blind mixing of registration entities from
> unrelated RDs.
> 
> (Discussion about this can go continue on-list, but for tracking purposes
it's
> tracked at [85] too).

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.  

> > 4.  Should have text on what happens to a group when an endpoint which
> > ages out of existence.
> 
> Good point, taken up ([86]).
> 
> > 5.  When registering groups, is there a requirement that all of the
> > endpoints be in the same domain as the group is?
> 
> That's the idea implied in the hierarchy, but probably answered better by
> Michael or Peter who use the domain concept more than I do.
> 
> > 6.  In section 7.3 - First it would be better to be much more explicit
> > on the set of items to be matched than the one statement that is
> > current present.  From what is there, it is not clear to me that one
> > would return a group if one of the resources of an endpoint in the
> > group has the desired attribute.  However, based on everything else, it
would
> appear to be true.
> > Thus the search would be to go up the model (Figure 2) to all ancestor
> > notes and down the tree to all descendent notes.  Is this a correct
> understanding?
> 
> That is a good point and an open issue[82], and indeed the `/rd-
> lookup/gp?ep=node1` example contradicts the current text that only covers
> going "up" in Figure 2.
> 
> I'm leaning strongly toward allowing both directions, ie. a query
parameter
> matches a candidate result entity if it matches on its parameters or the
link
> parameters of any of its containers or its contents, transitively.
> 
> 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.

> 
> > 7.  In section 7.3 - If doing a compound search criteria - Does all of
> > the criteria need to be matched on ANY node in the search or ALL of
> > the criteria on one node in the search?  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).
> 
> The quantifier sequence is "for each query parameter, there exists a
(suitably
> related) entity that matches the parameter". Each query parameter can be
> satisfied by a different entity.
> 
> I don't fully understand the part after 'Consider', but
> `?d=exmaple.com&rt=foobar` could give a single endpoint in an EP lookup
> (which is the only endpoint to contain rt=foobar resources), but give both
its
> two rt=foobar resources in a resource lookup.

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.

> 
> A query `?rt=foobar&rt=fnord` lookup could match on the endpoint lookup
> interface (finding an endpoint that contains both a foobar and a fnord),
but
> might not give any result on the resource lookup interface if no single
resource
> has both types.
> 
> I'll try to make that clearer when addressing the abovementioned issue of
> going up and down -- but did that answer your question?

Yes, I think I understand the current desires.

Jim

> 
> 
> Thank you for your comments
> Christian
> 
> [82]: https://github.com/core-wg/resource-directory/issues/82
> [85]: https://github.com/core-wg/resource-directory/issues/85
> [86]: https://github.com/core-wg/resource-directory/issues/86
> 
> --
> To use raw power is to make yourself infinitely vulnerable to greater
powers.
>   -- Bene Gesserit axiom