Re: [core] pubsub short-review

Carsten Bormann <cabo@tzi.org> Mon, 01 April 2019 18:31 UTC

Return-Path: <cabo@tzi.org>
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 EDD8412054E; Mon, 1 Apr 2019 11:31:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 DTKar3t0NO2k; Mon, 1 Apr 2019 11:31:06 -0700 (PDT)
Received: from smtp.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 21CE71204FE; Mon, 1 Apr 2019 11:31:05 -0700 (PDT)
Received: from [192.168.217.120] (p54A6CE73.dip0.t-ipconnect.de [84.166.206.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.uni-bremen.de (Postfix) with ESMTPSA id 44Y1BG6rbHz101J; Mon, 1 Apr 2019 20:31:02 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <20190401161239.GC28400@hephaistos.amsuess.com>
Date: Mon, 01 Apr 2019 20:31:02 +0200
Cc: draft-ietf-core-coap-pubsub@ietf.org, core@ietf.org
X-Mao-Original-Outgoing-Id: 575836260.457303-2028de0c9ce0eaf2c096c54b37c96d48
Content-Transfer-Encoding: quoted-printable
Message-Id: <C30CA800-40FF-4BFF-808C-49C03CA6BC90@tzi.org>
References: <20190401161239.GC28400@hephaistos.amsuess.com>
To: Christian Amsüss <christian@amsuess.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/But0H7itM44nibwP0bIbxGFNZW8>
Subject: Re: [core] pubsub short-review
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: Mon, 01 Apr 2019 18:31:11 -0000

Hi Christian,

Thank you for this review.  The below comments focus on architectural and editorial issues in specifying CoAP applications like this; I might have a separate response on the pubsub application itself later.

>  (Following parallel discussion in RD, it might be worth reconsidering
>  whether listing error codes for each operation really has value, given
>  the list can not be exhaustive anyway, and regular CoAP processing
>  needs to be applied).

Indeed.  However, if it is the normal result of an application state that results in an error response, it probably is worth to point that out in the definition of the application.

> * The create-on-publish operation is executed using PUT, which MUST be
>  idempotent according to RFC7252 Section 5.1. Returning 2.01 Created on
>  first put and 2.04 Changed on the second put is not exactly
>  idempotent.

Idempotency in a REST context is with respect to the state on the server, not with respect to the response code.  Trivially, doing a DELETE will get you a 2.02 only on the first request and a 4.04 on all following ones.

> A client behind an optimized intermediary or library may
>  receive a 2.04 even on creation if one of the components forgoes
>  message deduplication as given license to do in RFC7252 Section 4.5.

This is indeed an idiosyncrasy of CoAP over UDP, but note that something related happens with HTTP if the TCP connection breaks and you just don’t know whether the first request in an idempotent series was actually executed.

> [don’t do] phrasing requirements from
>  other places into normative languages and IMO overspecifying.

+1
It is not always wrong to remind the reader of a requirement already posed by a standard that is being used as a dependency, but this always MUST be clearly identified as a reminder and as following from the other standard.
Re-specifying bears the danger of creating something different, which forks the original standard.  (Compare the way ABNF was used in RFC 5988 and is used in RFC 8288 for an example of avoiding the problem.)

Grüße, Carsten