Re: [Cbor] draft-bormann-cbor-sequence-00 and Big Data

Sean Leonard <> Mon, 22 July 2019 21:06 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 0F8491200A3 for <>; Mon, 22 Jul 2019 14:06:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.597
X-Spam-Status: No, score=-2.597 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id ddyvA2tbqnnt for <>; Mon, 22 Jul 2019 14:06:22 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 743631200B8 for <>; Mon, 22 Jul 2019 14:06:22 -0700 (PDT)
Received: from [] ( []) (Authenticated sender: by (Postfix) with ESMTPSA id 591671BF205; Mon, 22 Jul 2019 21:06:18 +0000 (UTC)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\))
From: Sean Leonard <>
In-Reply-To: <>
Date: Mon, 22 Jul 2019 14:06:16 -0700
Cc: Burt Harris <>, "" <>
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <>
To: Carsten Bormann <>
X-Mailer: Apple Mail (2.3445.104.8)
Archived-At: <>
Subject: Re: [Cbor] draft-bormann-cbor-sequence-00 and Big Data
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 22 Jul 2019 21:06:25 -0000

I agree with Carsten that “CBOR sequence” is fine as-is.

I think it is inspired by JSON sequences, with the same semantics: the order is the order that the sender put them in as the sender was outputting them into the data item. I.e., “preserve the sequence” at zero cost. Whether there is some greater meaning depends on the application.

The order is something that should be preserved from one sequence to another sequence (streaming in, streaming out), but I do not believe that this needs to be called out in the draft. If you reorder the elements in the sequence, the hash of the cbor-sequence would be expected to change.


> On Jun 22, 2019, at 10:43 PM, Carsten Bormann <> wrote:
> Hi Burt,
> thanks for your kind words on RFC 8610 and CBOR sequences!
> Whether the sequence-preserving property of CBOR sequences is useful for your application or not depends on the application.  CBOR sequences do not take a position on this, they just preserve the sequence (because they can, at approximately zero cost).  This is exactly as with CBOR arrays, where it also depends on the application whether the actual sequence means something or not.  For serialization, they need to be in a specific sequence, so we might as well make that available to the application.  There are applications that use CBOR sequences in a way that cannot really be called a stream, so I think we are better off with the “sequence” name.
> Tagging a CBOR sequence as such is a bit difficult because logically a CBOR tag would be tagging the first item in the sequence.  CBOR sequences are best used in a context where it is clear what they are (e.g., via a media type); I tend to think of them like CBOR arrays that have been taken out of their package…
> Any special split markers can be provided by simply putting CBOR data items for those markers into the CBOR sequence.  And, yes, such an application might be a good reason to allocate a CBOR Simple value or two.  We don’t need an equivalent for YAML “…”, though, because the CBOR data items themselves are self-delimiting.
> Grüße, Carsten
> _______________________________________________
> CBOR mailing list