Re: [core] PubSub - Questions round 1

Christian Amsüss <christian@amsuess.com> Tue, 20 March 2018 23:24 UTC

Return-Path: <christian@amsuess.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 095C7120727 for <core@ietfa.amsl.com>; Tue, 20 Mar 2018 16:24:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01] 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 M4SE_dC9m-f7 for <core@ietfa.amsl.com>; Tue, 20 Mar 2018 16:24:13 -0700 (PDT)
Received: from prometheus.amsuess.com (alt.prometheus.amsuess.com [IPv6:2a01:4f8:190:3064::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D434F1200B9 for <core@ietf.org>; Tue, 20 Mar 2018 16:24:12 -0700 (PDT)
Received: from poseidon-mailhub.amsuess.com (095129206250.cust.akis.net [95.129.206.250]) by prometheus.amsuess.com (Postfix) with ESMTPS id E35284962C for <core@ietf.org>; Wed, 21 Mar 2018 00:24:10 +0100 (CET)
Received: from poseidon-mailbox.amsuess.com (hermes.amsuess.com [10.13.13.254]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 0916861 for <core@ietf.org>; Wed, 21 Mar 2018 00:24:10 +0100 (CET)
Received: from hephaistos.amsuess.com (host217-34-38-220.in-addr.btopenworld.com [217.34.38.220]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 7C2A23A for <core@ietf.org>; Wed, 21 Mar 2018 00:24:09 +0100 (CET)
Received: (nullmailer pid 27027 invoked by uid 1000); Tue, 20 Mar 2018 23:24:08 -0000
Date: Tue, 20 Mar 2018 23:24:07 +0000
From: Christian Amsüss <christian@amsuess.com>
To: core@ietf.org
Message-ID: <20180320232407.GA18172@hephaistos.amsuess.com>
References: <000001d32d0f$6ba39b80$42ead280$@augustcellars.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI"
Content-Disposition: inline
In-Reply-To: <000001d32d0f$6ba39b80$42ead280$@augustcellars.com>
User-Agent: Mutt/1.9.4 (2018-02-28)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/LS0ccxtH8nEVuy73iZoRkkfBpmw>
Subject: Re: [core] PubSub - Questions round 1
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: Tue, 20 Mar 2018 23:24:15 -0000

Hello working group,

On Wed, Sep 13, 2017 at 09:10:34PM -0700, Jim Schaad wrote:
> This would be rule c
> of section 2.1 of RFC6690.  This rule seems to have been modified for the
> /.well-known/core to say only use the scheme + authority and ignore the path
> to the resource.  However, I do not believe that this rule is suspended in
> this case.  This means that the return value for figure 4 would be
> "</currentTemp>;rt=temperature;ct=50".   Do you believe that I am wrong?

There's nothing special about .well-known/core, but Jim did discover
something nasty that I did not spot before:

RFC6690 link-format not only resolves the target relative to the link's
Context, but also has the default Context depend on the target
reference and strips any implicit base URI using the Origin concept of
RFC6454; something known neither from RFC5988 nor the current RFC8288.

This breaks the examples and convenient representations of
core-interfaces, core-coap-pubsub, and contradicts the mental model of
link-format semantics of everyone I have ever talked to about it. Unless
you have an anchor, links need to be absolute or path-absolute to behave
as expected. (resource-directory is largely safe because it exports
absolute URIs in resource lookups due to an already known part of those
issues).


So when you see

  GET coap://host/123/456/ returning
  <789/abc>;rel=member,<777/569>;rel=description

  it expresses links

  coap://hosts/ --(has member)--> coap://host/789/abc
                --(has member)--> coap://host/777/569

  where you would have expected (also in accordance to RFC8288)

  coap://hosts/123/456/ --(has member)--> coap://hosts/123/456/789/abc
                        --(has member)--> coap://hosts/123/456/789/569
  .

On the other hand,

  GET coap://host/123/999/ returning
  <789>;rel=boundto;anchor="coap://other/567/"

  expresses per RFC6690

  coap://other/567/ --(bound to)--> coap://other/567/789

  where a more intuitive interpretation would be

  coap://other/567/ --(bound to)--> coap://host/123/999/789

  .

Also, the rules make it impossible to express the respective RFC8288
links at all in a relative fashion; to make these statements, the server
producing the representation needs to be aware of the host name it is
queried as (and to draw the right conclusions, needs to agree with the
client on this). This is prone to misunderstandings when reverse proxies
are in use, and means that links that can be statically known (and thus
served directly from flash) need to be needlessly assembled by
constrained devices.


There is no motivation for this deviation from web linking in the
document.

It is my impression (and please PLEASE reply if I'm wrong) that nobody
has implemented those rules as they are laid out, at least not in a
system that deals with links where it makes a difference.

6690 is a request for comments. My I comment that its href/anchor
component is broken, and I propse that we do an RFC6690bis that
redefines ct=40 into to be closer to RFC8288.

If my impression about the state of deployment is wrong, my next best
suggestion is to deprecate it in favor of something that has better
defined semantics like CBOR-link-format (it does ... right?).


Best regards
Christian

-- 
Ceterum censeo Carthaginem delendam esse.
  -- M. Porcius Cato