Re: [Cbor] Review: draft-bormann-cbor-packed-00 & SUIT

Michael Richardson <mcr+ietf@sandelman.ca> Tue, 04 August 2020 19:28 UTC

Return-Path: <mcr+ietf@sandelman.ca>
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 618C43A10EE for <cbor@ietfa.amsl.com>; Tue, 4 Aug 2020 12:28:17 -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 Z1wbUk6f9pej for <cbor@ietfa.amsl.com>; Tue, 4 Aug 2020 12:28:15 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [209.87.249.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CE4EE3A0CD6 for <cbor@ietf.org>; Tue, 4 Aug 2020 12:28:11 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id 5E2D138996; Tue, 4 Aug 2020 15:07:31 -0400 (EDT)
Received: from tuna.sandelman.ca ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HTBa6GBRaTKh; Tue, 4 Aug 2020 15:07:30 -0400 (EDT)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id EAB7F38991; Tue, 4 Aug 2020 15:07:29 -0400 (EDT)
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 2D7651F7; Tue, 4 Aug 2020 15:28:08 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Brendan Moran <Brendan.Moran@arm.com>, "cbor@ietf.org" <cbor@ietf.org>
In-Reply-To: <AEB72DC9-76BF-49CB-BE70-7ABE2E4D9C39@arm.com>
References: <5E28C6E2-DFEC-4AF5-96CE-75E8F0927818@arm.com> <01d901d66503$2bbd93c0$8338bb40$@augustcellars.com> <7216D806-3473-463E-B6F2-AD8724AC56C6@tzi.org> <021e01d66535$57827d90$068778b0$@augustcellars.com> <406B6702-3045-4490-8CD0-8E352F924714@arm.com> <24543.1596045216@localhost> <AEB72DC9-76BF-49CB-BE70-7ABE2E4D9C39@arm.com>
X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 26.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha512"; protocol="application/pgp-signature"
Date: Tue, 04 Aug 2020 15:28:08 -0400
Message-ID: <15800.1596569288@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/UrH4fQ-nNsbZ31v_dAYrdLxUax8>
Subject: Re: [Cbor] Review: draft-bormann-cbor-packed-00 & SUIT
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: Tue, 04 Aug 2020 19:28:17 -0000

Brendan Moran <Brendan.Moran@arm.com> wrote:
    >> Unless you mean that dictionaries should be sorted so that they always (can only)
    >> reference forward, and you can start at the current location in the current
    >> dictionary.

    > Possibly, but I’m not sure that’s universally advantageous. Remember
    > that we want high reference frequency items to be at the start. Suppose
    > that I have the prefixes [“https://“, “www.”, “files.”,
    > “domain.com”]. Clearly, I want to be able to compose these in one of
    > two ways:

I agree that sorting by frequency of us has CPU advantages.
I'm not sure that this is important enough ("premature optimization is the
root of all evil").

I think that I can put them together in any order in my CBOR, regardless of
the order.  The ordering just restrictions how the internal reference in the
dictionary can work, right?

    > I think we need to be very clear about what’s allowed because
    > otherwise, there will be a lot of varied implementations with varied
    > limitations.

Yes, as Carsten said, we need to tightly define the decoder :-)

    >>> - The compressor has to be aware of the dictionaries of packed CBOR
    >>> objects it traverses in order to pack anything that appears within an
    >>> already packed CBOR object.
    >>
    >> In the SUIT case, the compressor is "cloud" :-)

    > Yup. Let’s not make things hard for constrained nodes because it’s easier for unconstrained ones.

If you are saying that sometimes the compressor will be a constrained node,
because CBOR is used outside of SUIT (who knew?), then I would like to
retract my comment involving that five-letter word.

--
Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-