Subject: Re: [core] Links, hosts, and resource directories

From: Klaus Hartke <[email-masked]>
Date: Sun, 4 Nov 2018 16:07:13 +0100

Peter van der Stok schrieb:
> Christian Amsüss schreef:
>> Klaus Hartke wrote:
>>>   [A Resource Directory (RD)] hosts registrations of
>>>   resources held on other servers, allowing lookups
>>>   to be performed for those resources.
>>>
>>> Is this a lie?
>>
>> Without more context, yes it is, and we should ensure that the wording
>> does not lead to the conclusion that resources (and not links) would be
>> stored.
>
> Sorry to react to this, but
> I cannot imagine how "registrations of resources" can be equated with "resources".
>
> But if it creates confusion it needs to be adapted.

Don't get too hung up on this particular sentence. The issue is more
the overall impression I got after skimming the current draft version
combined with the interop spec, which felt inconsistent. Maybe the
introduction is fine and just some legacy examples need fixing. I'll
make suggestions when I can pinpoint exactly what trips me up. Let me
ask a few more dumb questions first to make sure I get things right.

Klaus

---

From: Michael Koster <[email-masked]>
Date: Sun, 4 Nov 2018 07:28:37 -0800

It is a common mis-perception that resource representations can be obtained from a Resource Directory.

Best regards,

Michael

> On Nov 4, 2018, at 7:07 AM, Klaus Hartke <[email-masked]> wrote:
> 
> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core

---

From: Klaus Hartke <[email-masked]>
Date: Mon, 5 Nov 2018 15:03:09 +0100

Christian Amsüss wrote:
> >     <coap://example.com/foo>;rt=a,<coap://example.com/bar>;rt=b,<coap://example.com/baz>;rt=a
> >
> > This means, there are three links [6]:
> >
> >    <coap://example.com/.well-known/core>  hosts
> >           <coap://example.com/foo>  which has type "a" .
>
> Actually it is `<coap://example.com> hosts ...` due to the wording of
> RFC6690 Section 2.1 b).

Good point! For some reason, I was convinced that only the "hosts"
relation type would do weird things to the link context. I missed that
RFC 6690 defines the anchor for *all* links without an anchor
attribute to be the root resource of the origin.

So, for example, the links in this Link Format representation of
<coap://example.org/.well-known/core>...

    <foo>;rel=hosts,<bar>;rel=icon

...are resolved to...

    <coap://example.org/> hosts <coap://example.org/foo> .
    <coap://example.org/> icon <coap://example.org/bar> .

...which, to me, have the following meaning:

    (coap, example.org, 5683) has a resource <coap://example.org/foo> .
    The shortcut icon for <coap://example.org/> - but not immediately
        any other resource hosted by (coap, example.org, 5683) - is
        <coap://example.org/bar> .

RFC 6690 is really interesting.

> I'm not sure that this interpretation of 'hosts' necessarily follows
> from the definition ("hosted by the server indicated by the link
> context").

Isn't that exactly what "hosted by the server indicated by the link
context" means? See also the text in
<https://tools.ietf.org/html/rfc6690#section-5>:

    Thus,
    the links in this example tell that the Origin server from which
    /.well-known/core was requested (the context) hosts the resources
    /sensors/temp and /sensors/light (each a target).

It's probably not worth discussing the exact semantics, though, as
those have little relevance in practice.

Klaus

---

From: Klaus Hartke <[email-masked]>
Date: Mon, 5 Nov 2018 15:08:53 +0100

Michael Koster wrote:
> It is a common mis-perception that resource representations
> can be obtained from a Resource Directory.

Feel free to point people who want to obtain resource representations
from a Resource Directory to Data Hubs [1] :-)

But, yes, maybe a disclaimer could be added to the introduction of the
RD draft, saying that an RD doesn't store resource representations.

Klaus

[1] https://tools.ietf.org/html/draft-hartke-t2trg-data-hub-02

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 5 Nov 2018 22:53:55 +0700

> RD draft, saying that an RD doesn't store resource representations.

+1

(And +1 on the data hub, too.)

Grüße, Carsten