Re: [Cbor] Chunks with tags inside indefinite-length string (major type 2 and 3)

Carsten Bormann <cabo@tzi.org> Wed, 18 December 2019 05:44 UTC

Return-Path: <cabo@tzi.org>
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 D78A612011B for <cbor@ietfa.amsl.com>; Tue, 17 Dec 2019 21:44:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-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 UeEIwZ8NEQO0 for <cbor@ietfa.amsl.com>; Tue, 17 Dec 2019 21:44:56 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 12C1C120098 for <cbor@ietf.org>; Tue, 17 Dec 2019 21:44:56 -0800 (PST)
Received: from client-0017.vpn.uni-bremen.de (client-0017.vpn.uni-bremen.de [134.102.107.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 47d3qp1ph8zyjh; Wed, 18 Dec 2019 06:44:54 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <8736di2tpa.fsf@hobgoblin.ariadne.com>
Date: Wed, 18 Dec 2019 06:44:52 +0100
Cc: cbor@ietf.org, faye.github@gmail.com
X-Mao-Original-Outgoing-Id: 598340689.4383301-f07721f644ae3b28ca95c06a1be43f77
Content-Transfer-Encoding: quoted-printable
Message-Id: <85C20E2D-1FF5-4B2B-9D5D-0916B4D02EFF@tzi.org>
References: <8736di2tpa.fsf@hobgoblin.ariadne.com>
To: "Dale R. Worley" <worley@ariadne.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/BMTSNOu2zYTIRwc6RiLIpEe_4mY>
Subject: Re: [Cbor] Chunks with tags inside indefinite-length string (major type 2 and 3)
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: Wed, 18 Dec 2019 05:45:00 -0000

Hi Dale,

I completely agree that extensibility (and, more generally, evolvability) is what can make or break a protocol.  One of the big differences between JSON and CBOR is that JSON was designed to be “stable” (fixed, non-extensible), while CBOR has well-defined extension points.

Indefinite length strings are a syntactic feature of CBOR that was not designed to be extensible.  I have a hard time imagining why one would want to extend it.  I don’t think this is proof by lack of imagination, either; this mechanism already has more complexity than one would reasonably like; it just happens to be needed.  There are no data model extensions that would need to extend this mechanism.  If there ever is a need to extend it, this would be much like using additional information values 28..30: A revision of the standard, a new version of the format.  For the present format, indefinite length strings of major type N (2 or 3) are composed of definite length strings of the same major type, only.

Grüße, Carsten


> On Dec 18, 2019, at 04:33, Dale R. Worley <worley@ariadne.com> wrote:
> 
> Carsten Bormann <cabo@tzi.org> writes:
>> Why would we allow tags here?  Indefinite strings are a very limited
>> syntactical structure; there is no need to allow flexibility here (in
>> particular if there is no semantic gain from that).
> 
> The reason I argue is that having worked with SIP, I've become very
> respectful of extensibility.  SIP has taken over the internals of every
> major telecom company, it seems.  And that doesn't seem to be because
> SIP is wonderfully designed; it's sort of a running joke to list the
> things one would change in the next version of SIP if it didn't have to
> be upward-compatible.  But SIP has a number of very general
> extensibility mechanisms that make it possible to implement almost any
> telecomm feature in an upward-compatible way.  And there are dozens if
> not hundreds of SIP extensions.
> 
> And while I cannot guess what use might be made of tagging chunks of
> indefinite-length strings, it seems to me that as long as the
> fundamental structure of CBOR allows such a thing to be constructed
> unambiguously, the wisest course of action is to make it clear that such
> constructs can sensibly be made, but the current standard assigns no
> meaning to them.
> 
> Dale
> 
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor