Re: [Anima] New Version of draft-eckert-anima-grasp-dnssd

Toerless Eckert <tte@cs.fau.de> Wed, 02 August 2023 02:22 UTC

Return-Path: <eckert@i4.informatik.uni-erlangen.de>
X-Original-To: anima@ietfa.amsl.com
Delivered-To: anima@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CFB06C151AF1 for <anima@ietfa.amsl.com>; Tue, 1 Aug 2023 19:22:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.658
X-Spam-Level:
X-Spam-Status: No, score=-6.658 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 DRSkGdqZMleS for <anima@ietfa.amsl.com>; Tue, 1 Aug 2023 19:22:44 -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 8D259C14F73F for <anima@ietf.org>; Tue, 1 Aug 2023 19:22:42 -0700 (PDT)
Received: from faui48e.informatik.uni-erlangen.de (faui48e.informatik.uni-erlangen.de [131.188.34.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by faui40.informatik.uni-erlangen.de (Postfix) with ESMTPS id 4RFwjk6pxgznkTC; Wed, 2 Aug 2023 04:22:34 +0200 (CEST)
Received: by faui48e.informatik.uni-erlangen.de (Postfix, from userid 10463) id 4RFwjk6Fxfzkwbx; Wed, 2 Aug 2023 04:22:34 +0200 (CEST)
Date: Wed, 02 Aug 2023 04:22:34 +0200
From: Toerless Eckert <tte@cs.fau.de>
To: Brian E Carpenter <brian.e.carpenter@gmail.com>
Cc: anima@ietf.org
Message-ID: <ZMm96pGz6pK1F58D@faui48e.informatik.uni-erlangen.de>
References: <DB9PR10MB63549176EF0E405161B85649F33BA@DB9PR10MB6354.EURPRD10.PROD.OUTLOOK.COM> <1808d3ce-c03a-6871-a208-0845ad691427@gmail.com> <4024.1689630438@localhost> <DB9PR10MB63543A608EA0141A9860F65EF302A@DB9PR10MB6354.EURPRD10.PROD.OUTLOOK.COM> <6c2888e7-a2bd-b5ba-2aea-04dc26e95173@gmail.com> <2512.1690290441@localhost> <1C974DB3-2FCA-4B41-83E7-A9C095D7512B@tzi.org> <ZMEjTHl41WmjELL5@faui48e.informatik.uni-erlangen.de> <08b559ce-7903-1887-f51d-a3dcb49c0d36@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <08b559ce-7903-1887-f51d-a3dcb49c0d36@gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima/LK44dqXD725_LSJyYOt3tLZp5p8>
Subject: Re: [Anima] New Version of draft-eckert-anima-grasp-dnssd
X-BeenThere: anima@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Autonomic Networking Integrated Model and Approach <anima.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima>, <mailto:anima-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima/>
List-Post: <mailto:anima@ietf.org>
List-Help: <mailto:anima-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima>, <mailto:anima-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 02 Aug 2023 02:22:49 -0000

On Sat, Jul 29, 2023 at 10:17:38AM +1200, Brian E Carpenter wrote:
> On 27-Jul-23 01:44, Toerless Eckert wrote:
> > DNS-SD TXT RR's are a sequenze of zero limited strings "key1=value1" ... "keyn=valuen"
> > 
> > In my current grash/dsn-sd draft i have just proposed to encode this in
> > CBOR with as little as possible changes, e.g.:
> > 
> > [ "key1=value1", ...  "keyn=valuen" ]
> 
> You have? That's not what I see in draft-eckert-anima-grasp-dnssd-05

I guess the draft is missing an example, but the definition:

*( &(kvpairs:7)      => { *(tstr: any) },

is meant to be that... and now writing it, i am again showing my ignorance of CDDL...

*( &(kvpairs:7)      => [ *(tstr: any) ],

Sigh.. what's the difference...

> > Thinking that one needs to be able to parse this when using DNS-SD, so why
> > parse differently. But of course that logic was flawed, only e.g.: a
> > GRASP/DNS-SD proxy would need to be able to parse both encodings. And you
> > obviously want to use the maximum of CBOR and minimum or none of
> > application parsing.
> 
> Exactly. And the way you use maps is well suited to any programming
> language that knows how to use JSON maps, and much easier than
> parsing the rather primitive formats in DNS records.

Right. 

> > [ [ "key1", "value1" ], ...  [ "keyn", "valuen" ] ]
> 
> (N.B. That is lists, not maps. Not that it matters much.)

Right. Btw.: In DNS-SD, valueI is optional, and if left out, the assumed value is "1",
that need to be in our encoding.

> > And given how DNS-SD also has the shortening option "key1" implying "key1=1",
> > this could also be
> > 
> > [ "key1",  ...  "keyn" ]
> > 
> > If all the keys only had values 0 or 1. Which is what Esko proposed.
> 
> You can define that the *absence* of a key means False, 0, or "" (empty string),
> *presence* of a key alone means True, and *presence* of [key, value] means
> a value. I'm sure that's parsable.

I thought the alternatives for each element would be:

    [ [ "key1" ], ...
    [ [ "key1", "value1" ], ...
    [ [ "key1", [ "value1", ... "valueN" ], ...

The last one is kinda inofficial "," concatenated key1=value1,...,valueN

> But I still like maps.

I am lost right now about pro/cons... Need to find the 8" tape with my CBOR/CDDL braindump ;-)

Cheers
    Toerless

>    Brian
> > 
> > Chers
> >      toerless
> > 
> > On Tue, Jul 25, 2023 at 03:46:11PM +0200, Carsten Bormann wrote:
> > > On 25. Jul 2023, at 15:07, Michael Richardson <mcr+ietf@sandelman.ca> wrote:
> > > > 
> > > > I have resisted suggestions that we put an array for the objective-value, and
> > > > also that it have a string that needs to be parsed like "mode=prm,foo=1,bar=2"...
> > > 
> > > You give a good reason not to do this at all.
> > > But if you want to do this, do resist the urge to do a parsable string by all means.
> > > 
> > > (I need to write that draft, CBOR anti-patterns :-) (*)
> > > 
> > > Grüße, Carsten
> > > 
> > > (*) Yes, anti-pattern drafts are now a thing:
> > > https://www.ietf.org/archive/id/draft-bormann-restatement-00.html
> > > 
> > > _______________________________________________
> > > Anima mailing list
> > > Anima@ietf.org
> > > https://www.ietf.org/mailman/listinfo/anima
> > 
> _______________________________________________
> Anima mailing list
> Anima@ietf.org
> https://www.ietf.org/mailman/listinfo/anima

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