[T2TRG] Extensibility of link attributes

Klaus Hartke <hartke@tzi.org> Mon, 28 November 2016 18:01 UTC

Return-Path: <hartke@tzi.org>
X-Original-To: t2trg@ietfa.amsl.com
Delivered-To: t2trg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B3FEF129F76 for <t2trg@ietfa.amsl.com>; Mon, 28 Nov 2016 10:01:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.7
X-Spam-Level:
X-Spam-Status: No, score=-3.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SORBS_SPAM=0.5] 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 Vgm4PVzM80ZW for <t2trg@ietfa.amsl.com>; Mon, 28 Nov 2016 10:01:25 -0800 (PST)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3BDF5129F89 for <T2TRG@irtf.org>; Mon, 28 Nov 2016 10:01:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::b]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id uASI1Bp4009290 for <T2TRG@irtf.org>; Mon, 28 Nov 2016 19:01:11 +0100 (CET)
Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 3tSDxz4YRsz8LWb for <T2TRG@irtf.org>; Mon, 28 Nov 2016 19:01:11 +0100 (CET)
Received: by mail-wm0-f47.google.com with SMTP id c184so42418882wmd.0 for <T2TRG@irtf.org>; Mon, 28 Nov 2016 10:01:11 -0800 (PST)
X-Gm-Message-State: AKaTC02MfA2voiJtA6RkOmDBONrSTu0CvFnYbL0FyixHZZ3WjGSCI+ARdcPkkGKALGuMzJm4EcjxiMlVzYZfhQ==
X-Received: by 10.28.45.142 with SMTP id t136mr22596859wmt.110.1480356071066; Mon, 28 Nov 2016 10:01:11 -0800 (PST)
MIME-Version: 1.0
Received: by 10.194.23.5 with HTTP; Mon, 28 Nov 2016 10:00:30 -0800 (PST)
From: Klaus Hartke <hartke@tzi.org>
Date: Mon, 28 Nov 2016 19:00:30 +0100
X-Gmail-Original-Message-ID: <CAAzbHvbG0EZuH8x6T5rvW9in+Po8KiaK8E5-2sXO7uhakpxRFg@mail.gmail.com>
Message-ID: <CAAzbHvbG0EZuH8x6T5rvW9in+Po8KiaK8E5-2sXO7uhakpxRFg@mail.gmail.com>
To: T2TRG@irtf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/t2trg/6RwuY0YELPVDYO-pD2YsuoOV-OA>
Subject: [T2TRG] Extensibility of link attributes
X-BeenThere: t2trg@irtf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "IRTF Thing-to-Thing \(T2T\) Research-Group-in-creation" <t2trg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/t2trg>, <mailto:t2trg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/t2trg/>
List-Post: <mailto:t2trg@irtf.org>
List-Help: <mailto:t2trg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/t2trg>, <mailto:t2trg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 28 Nov 2016 18:01:28 -0000

There is a number of RFCs that define link attributes for use with RFC
5988-style links. I've compiled a list of what I found below. There
may be more, though, as there is no registry for link attributes.

RFC 5988 [1]
    - rel
    - anchor
    - rev
    - hreflang
    - media
    - title
    - title*
    - type

RFC 6690 [2]
    - rt
    - if
    - sz

RFC 7252 [3]
    - ct

RFC 7641 [4]
    - obs

draft-ietf-core-resource-directory [5]
    - ins
    - exp
    - d
    - ep
    - gp

Link attributes generally fall in one of two categories: those that
describe the link itself (like 'rel' and 'anchor') and those that
describe the link target (like 'type' and 'sz').

There are many use cases where it makes sense to have additional
metadata that describe the link target. For example, if a resource
directory [5] links to a temperature sensor, it might be useful to
provide the physical location of the sensor (like "room 5230 in the
MZH building") along with the link in the resource directory. Or, if a
data hub [6] stores a collection of RFCs, it might be useful provide
the title, author and publication date along with the links in the
data hub.

So I was thinking if it'd make sense to use link attributes in CoRAL
[7] only to describe the link itself and use RDF predicates to
describe the link target.

For example, links to sensor resources could look like this:

    |
    +-- link rel='hosts' href='/sensors/temp'
    |   |
    |   +-- rfc6690:if "sensor"
    |   |
    |   +-- rfc6690:rt "temperature-c"
    |   |
    |   +-- example:location "room5230.floor5.mzh.uni-bremen.de"
    |
    +-- link rel='hosts' href='/sensors/light'
        |
        +-- rfc6690:if "sensor"
        |
        +-- rfc6690:rt "light-lux"
        |
        +-- rfc7641:obs "true"

And a collection of RFCs could look like this:

    |
    +-- link rel='item' href='/rfc/rfc2119.txt'
    |   |
    |   +-- dc:title "Key words for use in RFCs"
    |   |
    |   +-- dc:creator "S. Bradner"
    |   |
    |   +-- dc:date "March 1997"
    |
    +-- link rel='item' href='/rfc/rfc5988.txt'
        |
        +-- dc:title "Web Linking"
        |
        +-- dc:creator "M. Nottingham"
        |
        +-- dc:date "October 2010"
        |
        +-- rfc5988:hreflang "en"
        |
        +-- rfc5988:type "text/plain"

The disadvantage of this extensibility is that it adds a lot of
complexity (namespaces, prefixes, ...) compared to the really, really
simple RFC 5988-style links.

Thoughts?

Klaus

[1] https://tools.ietf.org/html/rfc5988
[2] https://tools.ietf.org/html/rfc6690
[3] https://tools.ietf.org/html/rfc7252
[4] https://tools.ietf.org/html/rfc7641
[5] https://tools.ietf.org/html/draft-ietf-core-resource-directory-09
[6] https://tools.ietf.org/html/draft-hartke-t2trg-data-hub-00
[7] https://tools.ietf.org/html/draft-hartke-t2trg-coral-01