Re: [core] Report on first Resource Directory plugtest

Christian Amsüss <christian@amsuess.com> Tue, 17 April 2018 16:40 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 AA9F9126B72 for <core@ietfa.amsl.com>; Tue, 17 Apr 2018 09:40:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.414
X-Spam-Level:
X-Spam-Status: No, score=-0.414 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FAKE_REPLY_C=1.486] 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 yYftnhFlm3k7 for <core@ietfa.amsl.com>; Tue, 17 Apr 2018 09:40:21 -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 6172F124B18 for <core@ietf.org>; Tue, 17 Apr 2018 09:40:21 -0700 (PDT)
Received: from poseidon-mailhub.amsuess.com (095129206250.cust.akis.net [95.129.206.250]) by prometheus.amsuess.com (Postfix) with ESMTPS id 5825B497AB; Tue, 17 Apr 2018 18:40:19 +0200 (CEST)
Received: from poseidon-mailbox.amsuess.com (hermes.amsuess.com [10.13.13.254]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id 817336F; Tue, 17 Apr 2018 18:40:18 +0200 (CEST)
Received: from hephaistos.amsuess.com (hephaistos.amsuess.com [IPv6:2a02:b18:c13b:8010::db8]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 3D93B31; Tue, 17 Apr 2018 18:40:18 +0200 (CEST)
Received: (nullmailer pid 23853 invoked by uid 1000); Tue, 17 Apr 2018 16:40:17 -0000
Date: Tue, 17 Apr 2018 18:40:17 +0200
From: Christian Amsüss <christian@amsuess.com>
To: Carsten Bormann <cabo@tzi.org>, Jim Schaad <ietf@augustcellars.com>
Cc: Core WG mailing list <core@ietf.org>
Message-ID: <20180417164016.GC28669@hephaistos.amsuess.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="NU0Ex4SbNnrxsi6C"
Content-Disposition: inline
In-Reply-To: <011601d3d4eb$0abcba20$20362e60$@augustcellars.com> <29B20CA2-4179-4BBA-A0A7-5365C5A2BE85@tzi.org>
User-Agent: Mutt/1.9.4 (2018-02-28)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/FOnTPGTN4RR0hrLbfa3FYZoJJso>
Subject: Re: [core] Report on first Resource Directory plugtest
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, 17 Apr 2018 16:40:25 -0000

Hello Carsten, hello Jim,

On Fri, Apr 13, 2018 at 03:01:05PM +0200, Carsten Bormann wrote:
> >> Well, the general feeling was that instead of going for a 6690bis, we
> >> maybe want to let the link-format just fade out (In favor of
> >> links-json/-cbor).
> > 
> > link-json/-cbor is not helping with the issue of [1].
> 
> No; the intention would be to develop links-json/-cbor in such a way that itself doesn’t have the issue.
> (I.e., decouple it a bit from the idiosyncrasies of RFC 6690.)

That means that a simple encoder like Appendix A becomes quite a bit
more complex (it needs to learn URI parsing), as do implementations like
Jim's. ("Doing this is going to make my life as an implementor really a
mess. [...] I think this would make more problems that it would solve.")

I'm not saying it should not be done, just pointing out that it's a big
step for a document at that stage.

To address the rest of Jim's text on that topic:

> What would this mean for serializing out /.well-known/core - are the
> meanings different if one serializes to cbor as opposed to
> link-format?  

I can't tell for links-json+cbor, but in general yes.

For example, what is serialized in link-format as

<coap://1.2.3.4/foo>;if="core.s";rel="x";anchor="coap://1.2.3.4/bar",
<coap://1.2.3.4/baz>;rel="baz";if="core.a";rel="x";anchor="coap://1.2.3.4/bar",

could be serialized equivalently in CoRAL(ish) as

[
  [2, // link
    ignore, // relation
    [ // target
      [1, 'coap'], // Scheme
      [3, h'01020304'], // IP literal,
      [6, "bar"], // path "bar"
    ],
    [
      [2, // link
        rel:hosts,
        [[5, 0], [6, "foo"]], // absolute path with one component "foo"
        [
          [2, attr:if, "core.s"],
        ],
      ],
      [2,
        rel:baz,
        [[5, 3]], // relative path "baz" constructed from name of the rel
        [[2, attr:if, "core.a"]],
]]]]

which is not at all alike the link-format serialization in that it even
constructs relative references in a completely different way.


As long as an RD only supports link-format and possibly strictly
link-format-compatible CBOR/JSON versions are around, the data model can
be an ordered string-valued multi-dictionary with special meaning but
only string handling for href and anchor. With other serializations,
those need to become URIs. The stable data model is annotated web links
between URIs; I hope that RDF is a suitable data model too (HSML and
CoRAL seem to indicate that). The href-and-anchor-as-strings model is a
simplification that can be suitable for link-format, but not the general
case.

Best regards
Christian

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