An sdfType for Links
Internet-Draft draft-bormann-asdf-sdftype-link-03
Carsten Bormann
Universität Bremen TZI
Postfach 330440
Bremen
D-28359
Germany
+49-421-218-63921
cabo@tzi.org
04 June 2024
Applications and Real-Time
ASDF WG
IoT
Link
Web Linking
This document defines and registers an sdfType "link" for the Semantic Definition Format (SDF) for Data and Interactions of Things (draft-ietf-asdf-sdf).
About This Document
Status information for this document may be found at https://datatracker.ietf.org/doc/draft-bormann-asdf-sdftype-link/.
Discussion of this document takes place on the A Semantic Definition Format for Data and Interactions of Things Working Group mailing list (mailto:asdf@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/asdf/. Subscribe at https://www.ietf.org/mailman/listinfo/asdf/.
Source for this draft and an issue tracker can be found at https://github.com/cabo/sdftype-link.
Introduction
The Semantic Definition Format for Data and Interactions of Things (SDF, [I-D.ietf-asdf-sdf]) is a format for domain experts to use in the creation and maintenance of data and interaction models in the Internet of Things.
A common data type that occurs in the modeling of IoT devices is the link. [RFC8288] defines the concept of Web Linking, which complements the target URI that any link will contain, with additional parameters, such as the "link relation type" that explains the relationship expressed by the link, as well as "target attributes" that provide additional information about the target of the link (without a need to "dereference", i.e., follow, the link).
This document defines and registers an sdfType "link" for the Semantic Definition Format. This type models an abstract "serialization" [RFC8288] of a link, in a way that is compatible with the way SDF maps information models to its data modeling language.
Conventions and Definitions
The definitions of [RFC6690], [RFC8288], and [I-D.ietf-asdf-sdf] apply.
The sdfType "link"
The sdfType "link" is intended to be used with the SDF "type" of "object". The members of that object are strings that are named the same as the link parameter (attribute) names. The special parameter name "href" is used to express the link target. (Parameter names specific to the Constrained RESTful Environment (CoRE) are also discussed in [RFC9423].)
An example for the instance of a link is provided in Section 5 of [RFC6690]:

   </sensors/temp>;rt="temperature-c";if="sensor",

An sdfProperty that is used to describe an SDF affordance that is intended to hold a link like this (without getting specific on the actual link to the link target) could look like:

{
 "sdfProperty": {
  "temp-c-link": {
   "type": "object",
   "sdfType": "link",
   "properties": {
     "href": { "type": "string"},
     "rt": { "type": "string", "const": "temperature-c"},
     "if": { "type": "string", "const": "sensor"}
   }
  }
 }
}

Discussion
Links play an important role in SDF modeling both during definition time (for adding information to a model, such as in sdfRef) and during run time (for making links to instances into a subject of data and interaction modeling). The present document is an early attempt at addressing the run-time usage of links, in particular links that fit the Web Linking [RFC8288] abstractions. A related draft [I-D.laari-asdf-relations] addresses definition-time links, but does seem to touch modeling run-time use of links as well (e.g., by discussing "writable" link relations).
Not all links used in ecosystems are based on URIs. E.g., OMA has "object links", which are pairs of numbers (object/instance). These ecosystem links may have some structure that should be modeled in the SDF model (e.g., where the object id part of a link always has to have a specific value). This structure can be mapped into URI strings using some convention, e.g., an OMA object link could be oma-object:3303:0 (where oma-object is placeholder for a URI scheme to be defined). However, burying structural components of the ecosystem-specific link in a string syntax makes it hard to access and control those components from the model.
TODO: Examples are needed to show how the OCF collection pattern is addressed by the current specification.
Security Considerations
The security considerations of [RFC8288] apply in a general way, although modeling a link as a datatype does not incur all of the security considerations that will apply to actually interchanging these links.
(TODO)
IANA Considerations
// RFC Ed.: please replace RFC XXXX with this RFC number and remove this note.
IANA is requested to register the sdfType "link" in the "sdfType Values" sub-registry in the "SDF Parameters" registry, with the following completion for the registration template:
Registration for sdfType "link"
Name | Description | type | JSON Representation | Reference
link | A Web Link [RFC8288] | object | object members for link attributes | RFCXXXX
References
Normative References
[I-D.ietf-asdf-sdf]

Semantic Definition Format (SDF) for Data and Interactions of Things
Michael Koster
KTC
Carsten Bormann
Universität Bremen TZI
Ari Keränen
Ericsson
28 February 2024
Internet-Draft draft-ietf-asdf-sdf-18
[RFC8288]

Web Linking
M. Nottingham
October 2017
RFC 8288
DOI 10.17487/RFC8288
Informative References
[RFC6690]

Constrained RESTful Environments (CoRE) Link Format
Z. Shelby
August 2012
RFC 6690
DOI 10.17487/RFC6690
[I-D.laari-asdf-relations]

Extended relation information for Semantic Definition Format (SDF)
Petri Laari
Ericsson
13 September 2023
Internet-Draft draft-laari-asdf-relations-02
[RFC9423]

Constrained RESTful Environments (CoRE) Target Attributes Registry
C. Bormann
April 2024
RFC 9423
DOI 10.17487/RFC9423
Acknowledgments
Discussions in the OneDM liaison organization shaped this proposal.