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

From: Sean Leonard <[email-masked]>
Date: Mon, 22 Jul 2019 14:06:16 -0700

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.

Sean

> On Jun 22, 2019, at 10:43 PM, Carsten Bormann <[email-masked]> 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
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cbor