Re: [core] CoAP: non-traditional response forms

Christian Amsüss <c.amsuess@energyharvesting.at> Mon, 13 November 2017 10:18 UTC

Return-Path: <c.amsuess@energyharvesting.at>
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 D30041293D9 for <core@ietfa.amsl.com>; Mon, 13 Nov 2017 02:18:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 1YelGfk8e2OA for <core@ietfa.amsl.com>; Mon, 13 Nov 2017 02:18:01 -0800 (PST)
Received: from prometheus.amsuess.com (alt.prometheus.amsuess.com [IPv6:2a01:4f8:190:3064::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EA9E1128B51 for <core@ietf.org>; Mon, 13 Nov 2017 02:18:00 -0800 (PST)
Received: from poseidon-mailhub.amsuess.com (095129206250.cust.akis.net [95.129.206.250]) by prometheus.amsuess.com (Postfix) with ESMTPS id 17D16488E5; Mon, 13 Nov 2017 11:17:59 +0100 (CET)
Received: from poseidon-mailbox.amsuess.com (poseidon-mailbox.amsuess.com [10.13.13.231]) by poseidon-mailhub.amsuess.com (Postfix) with ESMTP id A66D444; Mon, 13 Nov 2017 11:17:53 +0100 (CET)
Received: from hephaistos.amsuess.com (hermes.amsuess.com [10.13.13.254]) by poseidon-mailbox.amsuess.com (Postfix) with ESMTPSA id 6E85F37; Mon, 13 Nov 2017 11:17:53 +0100 (CET)
Received: (nullmailer pid 4099 invoked by uid 1000); Mon, 13 Nov 2017 10:17:52 -0000
Date: Mon, 13 Nov 2017 11:17:52 +0100
From: Christian Amsüss <c.amsuess@energyharvesting.at>
To: Carsten Bormann <cabo@tzi.org>
Cc: "core@ietf.org WG (core@ietf.org)" <core@ietf.org>
Message-ID: <20171113101752.nhk7zve7gauzhhpn@hephaistos.amsuess.com>
References: <A2CBB392-CD50-4572-A202-749B82FC0FDE@tzi.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="r7h7nrqkkcp2i22s"
Content-Disposition: inline
In-Reply-To: <A2CBB392-CD50-4572-A202-749B82FC0FDE@tzi.org>
User-Agent: NeoMutt/20170609 (1.8.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/OZ7f4hNoiHlFbqET4e0JOpXmoIM>
Subject: Re: [core] CoAP: non-traditional response forms
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: Mon, 13 Nov 2017 10:18:08 -0000

Hello Carsten and various original authors,

On Mon, Nov 13, 2017 at 11:33:11AM +0800, Carsten Bormann wrote:
> I expect these ideas to be controversial.
> (I myself am not convinced that any of these approaches should be pursued.) 
> But they would solve real problems.

as Response-For and Response-To are phrased, I'd first ask how this is
supposed to work over forward and reverse proxies and hops through
different protocols, and I frankly don't expect very concrete answers.

It occurrs to me that "draft-cao-core-delegated-observe" should probably
be reflected in this draft as well. (Not only because I'm feeling guilty
of not being constructive enough in my reviews of that document).


Kneejerk reaction: My approach to this would be something maybe best
described as CoAP over CoAP:

Define another transport for CoAP that does not use tokens and addresses
but one URI per exchange. (It is similar in that respect to OSCORE that
already provides such a layer, even with a similar backend but not the
options to mix and merge parties).

When a node (or multicast address) is configured to receive a response,
it grows a resource that can even be discoverable as

| </conf-resp/42>;rt="core.coap",
| <coap://config-server/configured-request>;rel="coap-request";anchor="/conf-res/42"

Anyone can then send a response to that as

| POST </conf-resp/42>
| Content-Format: application/coap-response
| Payload:
| +--------+-------------+------+-------------------------+
| |  Code  | Options ... | 0xff | Payload                 |
| +--------+-------------+------+-------------------------+

This has minimally more overhead than Response-To (1 Byte the outer POST
code, plus nibble shards for not having the identifier not in 8-bit-safe
opaque options but in UTF-8 path parts, and you don't really need to
send the Content-Format on rt="core.coap") and should cover all the
Section 3 cases without hacking up the mid/token/REST sublayers. (I'm
aware that CoAP was specified with the sublayers in one specification to
allow interlinking them more deeply and playing with them, but changes
at the level of core-response-00 options have too strict requirements of
using up to date infrastructure).

I wouldn't treat the responses as that get POSTed thusly as responses to
separate requests, but as multiple responses arriving for the same
request. This is a pattern that is already well established in multicast
and observation (which are very much alike on the Request-Response
sublayer).


I surmise one could do something similar for Response-For, but I think
that this option needs to be considered for two distinct applications:

* Used like Response-To, but just with ephemeral requests. Those can be
  sent to anything that can be addressed, and IMO should go to a
  discoverable resource there.

* Used to tack additional cache content onto a request a la HTTP/2. I
  wouldn't expect anything not actively fetched by the requester to go
  through here without all proxies and protocols collaborating.

  What I can well imagine for such a use case is something like
  "Constrained MIME" that doesn't returns the response together with an
  attached request/response pair in the body.


Best regards
Christian

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