Re: [dnssd] [core] CoAP resource discovery and DNS-SD

Carsten Bormann <cabo@tzi.org> Sat, 14 May 2022 17:08 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: dnssd@ietfa.amsl.com
Delivered-To: dnssd@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0E1A4C14F74D; Sat, 14 May 2022 10:08:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] 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 ohfyyV-XZbAX; Sat, 14 May 2022 10:08:44 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C6C02C14F73E; Sat, 14 May 2022 10:08:39 -0700 (PDT)
Received: from [192.168.217.118] (p5089ad4f.dip0.t-ipconnect.de [80.137.173.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4L0sRR0VMczDCbR; Sat, 14 May 2022 19:08:35 +0200 (CEST)
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: <Yn+8iu6vpWiqnIQU@faui48e.informatik.uni-erlangen.de>
Date: Sat, 14 May 2022 19:08:34 +0200
Cc: core@ietf.org, dnssd@ietf.org
X-Mao-Original-Outgoing-Id: 674240914.603623-d81cb0666ff864dba764acec36f51591
Content-Transfer-Encoding: quoted-printable
Message-Id: <1B438E3C-57C9-41CE-8885-AF37EDDEE106@tzi.org>
References: <Yn7nnX096f0LdonI@faui48e.informatik.uni-erlangen.de> <C813906A-E7EB-4A69-9E94-14528E49E607@tzi.org> <Yn7rThJtz+VhJsa0@faui48e.informatik.uni-erlangen.de> <9AB469D2-FC4B-4BE2-A8D8-265378B85328@tzi.org> <Yn7xUaU4yzVz+qkd@faui48e.informatik.uni-erlangen.de> <510DBA42-6057-417E-9613-BD18C37E9EE8@tzi.org> <Yn+8iu6vpWiqnIQU@faui48e.informatik.uni-erlangen.de>
To: Toerless Eckert <tte@cs.fau.de>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnssd/hl5odUKARAuWi6Kw1troSBIzAT0>
Subject: Re: [dnssd] [core] CoAP resource discovery and DNS-SD
X-BeenThere: dnssd@ietf.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: "Discussion of extensions to DNS-based service discovery for routed networks." <dnssd.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnssd>, <mailto:dnssd-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnssd/>
List-Post: <mailto:dnssd@ietf.org>
List-Help: <mailto:dnssd-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnssd>, <mailto:dnssd-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 14 May 2022 17:08:46 -0000

On 2022-05-14, at 16:28, Toerless Eckert <tte@cs.fau.de> wrote:
> 
> On Sat, May 14, 2022 at 02:08:00AM +0200, Carsten Bormann wrote:
>>> Likewise, for other parameters, the client gets replies from multiple
>>> instances, but they resource differs in some details and those are expressed
>>> in those additional parameters.
>> 
>> RFC 6690 is based on web linking, and that is quite flexible with request to defining target attributes.
> 
> Except that rfc5988 didn't have the element of discovery or multicast, but rfc6690
> came up with them - and then did not inherit whats good about DNS-SD, which
> arguably was the best and most widely deployed discovery mechanism we had defined.

I don’t know what’s “except” about that — RFC 6990 truly is quite flexible with request to defining target attributes.

>> If we think this is a use case we want to address, we could define these target attributes.  I’d assume it would be pretty much up to the querier to interpret them, but the attribute definitions should be well-defined.
> 
> Sure. How about this definition:
> 
> REQ: GET /.well-known/core?rt=<resource>
> 
>     RES: 2.05 Content
>     Content-Format: 40
>     Payload:
>     </b>;rt=s.service-name;p=num;w=num;key=value;
> 
> If service-name is an rfc6335 registered service name, then it
> can be mapped into a resource type by using the s.service-name notation.
> The prefix s. is reserved for this purpose, no other resource types shall
> use it.

We don’t really have a way to insert one registry into another, but technically, this makes a lot of sense.

> p(riority) and w(weight) have the semantic defined in rfc2782 and
> are used by the requester to select which discovered instance to select.

Works for me.

> If the service-name uses rfc6763 key-value property pairs (encoded in
> DNS TXT RR), those are represented equally as key=value.

These of course can conflict with other target attribute names.
As the namespace for target attributes is not controlled at the moment, a trick like the s.servicename above could work here, too (on the left side of the =).

> Given the likely slightly different string rules in coap and dns-sd,
> it is necessary anyhow to design the possible values such that they
> conform to dns-sd and coap rules. Hence it should also be easily
> possible to pick key names that do not conflict with pre-existing
> coap target attribute names.

Doing this manually works, too.

> This should be all there is to it.

Right; it should not be complicated.

> Actually a Q: In DNS SD, we might have a key=val1,val2,val3
> Given how "," seems to be a reserved structure character (like ";'),
> what would be a good separator inside a value to structure it ?

Section 2 of RFC 6690:
"Note that commas can also
   occur in quoted strings and URIs but do not end a description.”

We used space separators or multiple instances of the attribute, i.e.

key=“val1 val2 val3” (e.g., for rt=, if=, rel=)
Or
key=val1;key=val2;key=val3 (can’t remember outright where we did this).

The fact that we didn’t encourage to always use *one* of these in RFC6690 is haunting us a bit.

Grüße, Carsten