Re: [core] Dynlink observation attributes

Christian Amsüss <> Tue, 09 April 2019 11:18 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 551D612077B for <>; Tue, 9 Apr 2019 04:18:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id pAzYNupBZaMp for <>; Tue, 9 Apr 2019 04:18:01 -0700 (PDT)
Received: from ( [IPv6:2a01:4f8:190:3064::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 284D1120778 for <>; Tue, 9 Apr 2019 04:18:01 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTPS id 5C2E343819; Tue, 9 Apr 2019 13:17:58 +0200 (CEST)
Received: from ( []) by (Postfix) with ESMTP id A854E26; Tue, 9 Apr 2019 13:17:56 +0200 (CEST)
Received: from (unknown [IPv6:2a02:b18:c13b:8010:8877:7422:b795:852a]) by (Postfix) with ESMTPSA id 5174574; Tue, 9 Apr 2019 13:17:56 +0200 (CEST)
Received: (nullmailer pid 11512 invoked by uid 1000); Tue, 09 Apr 2019 11:17:48 -0000
Date: Tue, 9 Apr 2019 13:17:48 +0200
From: Christian =?iso-8859-1?Q?Ams=FCss?= <>
To: Michael Koster <>
Cc: Bill Silverajan <>, "" <>,
Message-ID: <>
References: <> <>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GZVR6ND4mMseVXL/"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <>
Subject: Re: [core] Dynlink observation attributes
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 09 Apr 2019 11:18:05 -0000

Hello Michael,

On Tue, Nov 06, 2018 at 12:05:57AM -0800, Michael Koster wrote:
> I am convinced that we need to support observe attributes as query
> parameters to an observe request, and include them in the request
> caching. This makes sense as an application pattern and as a
> sub-pattern for dynlinks (below).

Glad you agree.

> The modified URI may be thought of as a newly defined resource that
> exposes a coarser grained dynamic representation of the same variable
> indicated by the other URI parameters. I haven't fully thought through
> the caching issue with etags and lifetimes, but it seems like there
> will be ony one set of parameters feeding any given cached resource.
> The notifications should be cacheable.

Maybe even a bit better: I think that a proxy that has learned (eg. by
having seen interface type information earlier) that a resource supports
query attributes[1] could, when receiving a second observation on the
same "resource" with different filters, pick a more generic one and
serve the more specific ones after applying its own filtering.

[1]: I think it'd make sense to define an interface type for that, for
otherwise no client can be sure that /t?pmin=5 is actually a view on /t
and not something completely different.

> On that, I believe that the use of target attributes in a dynlink is
> quite reasonable if we consider that the target of the link is always
> the source of the transfer when rel=boundto, and that we always use
> the observe mechanism as an architectural model => they are always
> observe attributes, and they apply to the target of the link which is
> hte source of the transfer.

It also makes it very hard to move those links over to the semantic web
world for reasoning, as those target attributes are per-link and not

If there's a statement like


then that can be processed on easily in RDF or any other information
model that does not carry information per-link in the way we had
sketched for JSON-LD enrichted links-json during IETF96 in Berlin.

If the statement is


then all semantic-web style processing needs to be aware of all those
attributes, and can't wrap the information in a set of statements that
includes `/monitor is boundto coap://sensor/temp` as the step
information can't hook onto that statement.

(Also, having the parameters in the target makes the binding site easier
to implement, as it won't have to do URI fiddling but just takes a URI
and observes it).

> The "native" case is simply an optimization and not an architecture
> permutation. A practical implementation may re-use the observe
> mechanism for local transers. 
> Note also that the "bind" attribute is not strictly needed if we apply
> these other constraints, as you point out. We may always assume
> observe as an architectural model. This can be generalized to allow
> the link to be stored anywhere that a client function can be
> implemented, especially useful if we don't want to modify existing
> servers. 

I'm not saying it is very special, I'm more saying that GET/observe and
PUT are not.

> Not sure if we need polling but if we do, it's probably not the same
> relation as "boundto". The transfer would likely be from source to
> target like rel=polls, as in "target polls context". Only one
> attribute of poll interval could be supported, and of course the
> others could be modeled on observers of the target resource after the
> polling, using the algorithm. 

The binding site may not have control over whether what actually happens
is polling or observation (and thus the distinction is of limited use);
per RFC7641 Section 5, intermediaries could make the same observation
polling-based over one hop and actually observing on the next one.

> In the draft we can describe the observe attribute first, then
> describe the use in dynlinks, then describe a link table example
> implementation. I think a lot of the confusion can be alleviated this
> way, and we can focus on preferred patterns.

That's certainly a structure that will help, even now that both
components stay in the same document.

> Note that using a dynlink makes the observe parameters visible and
> gives the observe relationship an affordance.
> Does this all make sense?

The affordance part does not, possibly because I've heard the term only
in the context of high-level usefullness. As I understand the term, he
affordance would be informing a heating valve of a room temperature, and
that affordance can be implemented in the CoRE ecosystem by placing a

> Does this make sense? I could write up a rough strawman draft with the
> changes.

I'd be happy to read that.

Best regards

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