[core] Re: PR submitted on pubsub: attribute usage

Carsten Bormann <cabo@tzi.org> Thu, 06 February 2025 17:14 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 18B17C1840D5 for <core@ietfa.amsl.com>; Thu, 6 Feb 2025 09:14:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id chBE8T5UoB74 for <core@ietfa.amsl.com>; Thu, 6 Feb 2025 09:13:59 -0800 (PST)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B5662C1D3DD4 for <core@ietf.org>; Thu, 6 Feb 2025 09:13:58 -0800 (PST)
Received: from [192.168.217.145] (p548dc3ec.dip0.t-ipconnect.de [84.141.195.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4YpkGX2Zx4zDCcT; Thu, 6 Feb 2025 18:13:56 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <DU0P190MB19785658A42E90AAE6CB48FDFDF62@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
Date: Thu, 06 Feb 2025 18:13:55 +0100
X-Mao-Original-Outgoing-Id: 760554835.7010961-1f4d174613d89ced11ad0f7118165a07
Content-Transfer-Encoding: quoted-printable
Message-Id: <C2570560-E8B7-4D50-B674-0599C42443CC@tzi.org>
References: <DU0P190MB19785658A42E90AAE6CB48FDFDF62@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
To: Esko Dijk <esko.dijk@iotconsultancy.nl>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Message-ID-Hash: 4B2BIUQDRNLFSXWAPSLK265RCBNWGGND
X-Message-ID-Hash: 4B2BIUQDRNLFSXWAPSLK265RCBNWGGND
X-MailFrom: cabo@tzi.org
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-core.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "core@ietf.org WG (core@ietf.org)" <core@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [core] Re: PR submitted on pubsub: attribute usage
List-Id: "Constrained RESTful Environments (CoRE) Working Group list" <core.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/PYgAO7j3JTYDcdNbxlhd9zBHTK8>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Owner: <mailto:core-owner@ietf.org>
List-Post: <mailto:core@ietf.org>
List-Subscribe: <mailto:core-join@ietf.org>
List-Unsubscribe: <mailto:core-leave@ietf.org>

Hi Esko,

what do our documents say today about eliding attributes from query results?
I wasn’t aware that we are considering eliding attributes based on some logic making use of what the query says.

Grüße, Carsten


> On 2025-02-06, at 15:21, Esko Dijk <esko.dijk@iotconsultancy.nl> wrote:
> 
> Hi Jaime,
>  
> I’ve just submitted a PR for pubsub: https://github.com/core-wg/coap-pubsub/pull/61
>  
> This aims to optimize the use of link format attributes in the examples, and adds some wording around that.
>  
> This is based on a few key ideas:
>  
> 	• When doing RFC 6690 link format querying on /.well-known/core , and the query parameter is “rt=<something>”, then it applies the convention that each link returned also has the “rt” attribute to be sure that the result is of the right type.
> This has been used as the convention over the past years, I think. One reason to do this is that a server may optionally not support querying and so it would return all the links (even those with wrong rt!).
> If every server always returns “rt” attributes, this issue of not supporting querying doesn’t interfere with the correctness of the result.
> 	• When doing a query (rt=<something>) on another resource, i.e. one defined in scope of the pubsub draft, the draft itself can define the rules for that.  For example the resource can be mandated (MUST) to support this query so we know that any and all results will have the correct rt type.
> There’s no need to include that rt type in each link result, thereby saving lots of bytes on the wire.
> 	• When doing a CoAP GET on a collection resource, such as topic collection, the specification itself can define the exact operation of that and what is returned and how.
> Because currently a topic collection can only contain topics as children, and not other types, we know that for each returned link in the link format document the default resource type of “topic” (core.ps.conf) must be applicable.  No other options possible. Therefore, we can define that if “rt” attributes are elided in those results, the default must apply.  So, no need to include “rt” attributes for each link there.
> 	• If the “rt” on a returned link is 100% known to the client parsing the links (whether rt is explicitly included or not), and there is no “ct” (content-format) attribute given, then the default “ct” as defined by this document is applied. Because it follows from “rt” there’s no need to add “ct” attributes where it follows the default. This also saves bytes on the wire.
> 	• The examples preferably need to guide the reader to the most typical, efficient implementation. Unless an example is explicitly marked as “exception case”. So this calls for only including attributes that we like to see in practical implementations.
>  
> Because this PR makes quite some changes, it might be good to discuss here on the list first if we agree to these principles. Or want to see something else?
>  
> Best regards
> Esko
> _______________________________________________
> core mailing list -- core@ietf.org
> To unsubscribe send an email to core-leave@ietf.org