Re: [core] Link target attributes in CoRAL (was: Review of CoRAL)

Klaus Hartke <hartke@projectcool.de> Thu, 08 November 2018 14:29 UTC

Return-Path: <hartke@projectcool.de>
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 29BA8128CF2 for <core@ietfa.amsl.com>; Thu, 8 Nov 2018 06:29:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_FAIL=0.001, URIBL_BLOCKED=0.001] autolearn=no 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 c_Qs2YPeg8UK for <core@ietfa.amsl.com>; Thu, 8 Nov 2018 06:29:29 -0800 (PST)
Received: from wp382.webpack.hosteurope.de (wp382.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8597::]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9F2EF126CB6 for <core@ietf.org>; Thu, 8 Nov 2018 06:29:29 -0800 (PST)
Received: from mail-qk1-f179.google.com ([209.85.222.179]); authenticated by wp382.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1gKlJH-0004uE-1Q; Thu, 08 Nov 2018 15:29:27 +0100
Received: by mail-qk1-f179.google.com with SMTP id m5so3024003qka.9 for <core@ietf.org>; Thu, 08 Nov 2018 06:29:26 -0800 (PST)
X-Gm-Message-State: AGRZ1gJyJw2RR1eg1FEvjLyuAAk4Jf1/ryTVdFiz9ic0boSeWR82wW8A 1T2EWjrKj7n5uYUrYcaSvGg3ryd/rym9+nS/wMg=
X-Google-Smtp-Source: AJdET5cQYdYNl4JsFSOjVic8ctvHn2/H1xlEFrkcl7BCqF5kOn39/N2ve5BdI8fq7AG6kEHynCpCmNAhvf0O9jMKEQg=
X-Received: by 2002:ac8:16d8:: with SMTP id y24mr4594107qtk.253.1541687365910; Thu, 08 Nov 2018 06:29:25 -0800 (PST)
MIME-Version: 1.0
References: <CAAzbHvYk9dUvGmYsX1U=0qcU7330bYO6YjGAa51gFKMGGoy-Dg@mail.gmail.com> <20181105123604.GA9680@hephaistos.amsuess.com> <CAAzbHvZ=4GaPH6FXj4ZuOzMLrQbWUo-Oc6CUmiA4O2b3PhK-rA@mail.gmail.com> <CAAzbHvaSDzc62-dY-ALQxW6bGKS7avCv795-DUMh0PVRF+yaqw@mail.gmail.com> <20181108113103.GB13498@hephaistos.amsuess.com>
In-Reply-To: <20181108113103.GB13498@hephaistos.amsuess.com>
From: Klaus Hartke <hartke@projectcool.de>
Date: Thu, 08 Nov 2018 15:28:48 +0100
X-Gmail-Original-Message-ID: <CAAzbHvYVUFEgqUNvOLfwNDZ34LJvFwn5+MrOC9_R69hTbkT-bw@mail.gmail.com>
Message-ID: <CAAzbHvYVUFEgqUNvOLfwNDZ34LJvFwn5+MrOC9_R69hTbkT-bw@mail.gmail.com>
To: "Christian M. Amsüss" <christian@amsuess.com>
Cc: "core@ietf.org WG" <core@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-bounce-key: webpack.hosteurope.de; hartke@projectcool.de; 1541687369; fa14b81d;
X-HE-SMSGID: 1gKlJH-0004uE-1Q
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/6hlUktypoFbwdmJTEYEclXkiUnA>
Subject: Re: [core] Link target attributes in CoRAL (was: Review of CoRAL)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 08 Nov 2018 14:29:31 -0000

Christian Amsüss wrote:
> It's a trade-off, though: While making the resulting data semantically
> more palatable, it makes link filtering odder (a `GET
> /.well-known/core?ol=coap://x/`  CoRAL response one'd need to
> think `GET /.w-k/c?anchor=coap://x/&rel=attr:ol`). I still think it's
> worth it (speaking as someone who'll have to implement the lookups).

The lookup interface is indeed an interesting topic.

I would assume that ?anchor=coap://x/&rel=attr:foobar selects all
links with the link context <coap://x/> and link relation type
<http://TBD2/foobar> (using attr = <http://TBD2/>). But I think you
want to select all links where there is a nested link with the link
relation type <http://TBD2/foobar> and link target <coap://x/>.

My idea would be to use CoRAL to express this:

    FETCH /.well-known/core
    Content-Format: text/coral

    #using iana = <http://www.iana.org/assignments/relation/>
    #using attr = <http://TBD2/>

    iana:hosts _ { attr:foobar <coap://x/> }

Klaus