Re: [Cbor] Packed CBOR and dictionaries

Jim Schaad <ietf@augustcellars.com> Fri, 28 August 2020 19:21 UTC

Return-Path: <ietf@augustcellars.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3315F3A094F; Fri, 28 Aug 2020 12:21:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] 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 V2edO84GCI51; Fri, 28 Aug 2020 12:20:58 -0700 (PDT)
Received: from mail2.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4DE8B3A093C; Fri, 28 Aug 2020 12:20:57 -0700 (PDT)
Received: from Jude (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 28 Aug 2020 12:20:51 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'Carsten Bormann' <cabo@tzi.org>, 'Michael Richardson' <mcr+ietf@sandelman.ca>
CC: draft-bormann-cbor-packed@ietf.org, cbor@ietf.org
References: <008c01d67c47$aaf73be0$00e5b3a0$@augustcellars.com> <28732.1598638838@localhost> <80C336B5-2A10-44BF-B214-7CFA1B159923@tzi.org>
In-Reply-To: <80C336B5-2A10-44BF-B214-7CFA1B159923@tzi.org>
Date: Fri, 28 Aug 2020 12:20:50 -0700
Message-ID: <013501d67d70$58fa34d0$0aee9e70$@augustcellars.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-us
Thread-Index: AQEWrwsIZUXc1W2qApLXh9kZsjj9lAK3TH/EAmZ0d36qpI94gA==
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/SsgWYwddxPQbc7_e3MJA7-B7ecA>
Subject: Re: [Cbor] Packed CBOR and dictionaries
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Aug 2020 19:21:02 -0000


-----Original Message-----
From: Carsten Bormann <cabo@tzi.org> 
Sent: Friday, August 28, 2020 11:40 AM
To: Michael Richardson <mcr+ietf@sandelman.ca>
Cc: Jim Schaad <ietf@augustcellars.com>; draft-bormann-cbor-packed@ietf.org; cbor@ietf.org
Subject: Re: [Cbor] Packed CBOR and dictionaries

OK, I think we need to answer a few questions first.

Is there only ever one dictionary that is being referenced?
Or can you reference multiple?
[JLS] I believe that the correct answer is either one or two.  The ability to reference more than two seems to be more problematic than it is worthwhile.  Allowing for the ability to reference two allows for the option of using "the" global CoRAL dictionary plus a more application specific dictionary containing lots of problem details information.  Two also allows for easy identification as you can use negative vs non-negative as the differentiation between them. 

[JLS] I have a (currently) slight preference for allowing two, but it is definitely not a hill I would die on.
 

(An alternative to referencing multiple is creating a way to merge dictionaries, however that might also create combinatorial explosion.)

How are shared items/prefixes from the packed data items merged with the ones from the dictionary/ies to the number space actually used for referencing?
[JLS] I was not planning on packing dictionaries.  Hmmmmmmm  Seems slightly problematic as items are added to the dictionary.

How are dictionaries identified (URI, hint pulling from context, digest, any combination of that)?
[JLS]  For cryptographic purposes it needs to be a digest.  That does cause problems with versioning however. One of the interesting question is does an application need to be able to pull down a new dictionary or does it only deal with dictionaries that it is pre-loaded with.   Not doing so means that dictionary version negotiation is needed (see previous mails on dictionaries in CoRAL -- https://mailarchive.ietf.org/arch/msg/t2trg/oVWf3x2ighHiU7b7K-xJte7jC_c/ is an example).  Doing so means that you might get surprises about not being able to get the dictionary that you need.  Naming for use and naming for negotiation might be different identifiers. 

I have a design that is based on specific answers for all these questions, but I’d like to hear what others think before pushing that.
[JLS] Sounds good 
Jim


Grüße, Carsten