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

Toerless Eckert <tte@cs.fau.de> Tue, 17 May 2022 18:42 UTC

Return-Path: <eckert@i4.informatik.uni-erlangen.de>
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 ABD9AC15E41C; Tue, 17 May 2022 11:42:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.869
X-Spam-Level:
X-Spam-Status: No, score=-0.869 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no 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 tHe1PrR5tql4; Tue, 17 May 2022 11:42:41 -0700 (PDT)
Received: from faui40.informatik.uni-erlangen.de (faui40.informatik.uni-erlangen.de [IPv6:2001:638:a000:4134::ffff:40]) (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 7107EC14F729; Tue, 17 May 2022 11:42:39 -0700 (PDT)
Received: from faui48e.informatik.uni-erlangen.de (faui48e.informatik.uni-erlangen.de [IPv6:2001:638:a000:4134::ffff:51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by faui40.informatik.uni-erlangen.de (Postfix) with ESMTPS id D616E58C4AF; Tue, 17 May 2022 20:42:31 +0200 (CEST)
Received: by faui48e.informatik.uni-erlangen.de (Postfix, from userid 10463) id CC5474EAEFD; Tue, 17 May 2022 20:42:31 +0200 (CEST)
Date: Tue, 17 May 2022 20:42:31 +0200
From: Toerless Eckert <tte@cs.fau.de>
To: Carsten Bormann <cabo@tzi.org>
Cc: core@ietf.org, dnssd@ietf.org
Message-ID: <YoPsl2g1ZJQpPIjD@faui48e.informatik.uni-erlangen.de>
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> <1B438E3C-57C9-41CE-8885-AF37EDDEE106@tzi.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <1B438E3C-57C9-41CE-8885-AF37EDDEE106@tzi.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnssd/uwdShUlxV4hbwJvHz9uAeXLiZzU>
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: Tue, 17 May 2022 18:42:45 -0000

On Sat, May 14, 2022 at 07:08:34PM +0200, Carsten Bormann wrote:
> 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.

Let me rephrase:
Multicast resource discovery was not inherited and adopted from rfc5988,
but was newly introduced by rfc6690.  Even though there do exist several
web-space multicast resource discovery mechanismens, such as WS-discovery.
None of those IETF defined though AFAIK...

> >> 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.

Right. It might help visibility to ask IANA to insert a pseudo entry
into the registrary "s." with a pointer to the description of the method. 
Which kinda means it is probably better to write a 2 page RFC about this instead of
embedding it into a larger technology spec..

> > 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 =).

Right.

> > 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.”

Right. except that it requires quoted strong, which is 2 character more
overhead... But would make life easier.

> 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).

";" is not a ptoken character either, so it would have to be a quoted string
too, as for " ", or ",".

But given how you say other rt's have already used quoted-strings, it
seems the resource overhead of quoted strings is considered fine.

Some more things:

a) https://www.iana.org/assignments/core-parameters/core-parameters.xhtml#if-link-target-att-value

The references to OIC Core specification v1.1.0 section 7.5.3 are wrong. No
such section. Maybe 7.6.3 was meant.  

b) I was looking this OIC stuff up to understand if/when an rt could/should use
an if parameter instead of a parameter of its own, such as proto= or p=

In case of ANIMA BRSKI, it seems that the protocols are all REST based, so
it seems an if= parameter would make sense, but in OIC core, the
if= and the rt= value are not only indicated in the core data, but then
they're also used in forming URLs, such as GET /oic/res?if=oic.if.baseline
or GET /oic/res?rt=oic.r.switch.binary, and so i wonder if/how there is
an assumption/expectation of if= and rt= values to be used in the
actual discovered REST URIs.

Cheers
    Toerless

> Grüße, Carsten

-- 
---
tte@cs.fau.de