Live data from Hacker News

RFC 7049 - Concise Binary Object Representation (CBOR)

tools.ietf.org

21–30 of 53 posts

Re: RFC 7049 - Concise Binary Object Representation (CBOR)

#21

Serialization formats are like indentation styles. Dead easy to pick or invent one, nearly impossible to convince others to switch to it.

The significant thing about XML is not that it's any good, but that everyone switched to it. I predicted this meant XML would win forever... but JSON does seem to be catching up.

Re: RFC 7049 - Concise Binary Object Representation (CBOR)

#22
post #13
post #10

Earlier quoted context omitted.

It does seem an odd trade off. Having key value pairs is great for prototyping and the keys make it easier for people to interpret the messages and to write code to use them. On the other hand repeatedly sending readable key values seems a huge waste. I guess when streaming you could send a header with a map in it, but it then makes things complicated....

Could something like GZIP mask a lot of that repetition?

Definitely, but at the cost of requiring more memory and processing power. If its goal is to be compact and lightweight I think it would be helpful to have something in protocol itself.

Looking at the spec though, it does allow numeric keys in maps so you could use id's and provide the definitions elsewhere.

Re: RFC 7049 - Concise Binary Object Representation (CBOR)

#25

This looks like a fairly well-designed format. My main concern is that this seems to have suddenly appeared out of nowhere and gone directly to RFC. (Presumably there was an Internet-Draft, but I have never seen anything about this before.)

These kind of binary formats always have vulnerabilities. eg http://technet.microsoft.com/en-us/security/bulletin/ms04-00...

Re: RFC 7049 - Concise Binary Object Representation (CBOR)

#28
RFCs don't amount to much without adoption. The RFC database is full of protocols with grand designs and seemingly broad applicability. Look at the "Extensible Provisioning Protocol", EPP - http://tools.ietf.org/html/rfc5730 - a protocol "for the provisioning and management of objects stored in a shared central repository." - it reads as a marvelously generic protocol for client-managed key-value data storage - maybe it's suited for caching systems, or cloud BLOB storage, or as an abstraction of dropbox... but in reality it's just the protocol used by internet domain registrars to manage domain name registrations on a registry server - the nichiest of niche applications, yet the subject of a dozen RFCs. It's not going to be picked up and supported by Hadoop or Dropbox or anybody else who needs client managed obect storage, they're going to stick to HTTP REST.

This CBOR format is being proposed by the VPN Consortium - presumably there's some specific VPN interoperability application they have in mind for this. In the meantime, everybody else will continue to use compressed JSON, or protocol buffers, or whatever other standards have good library support and interoperability and - crucially - adoption in their domain.

Re: RFC 7049 - Concise Binary Object Representation (CBOR)

#29

Anyone care to comment on where we might use such a thing? Is it already in use? And does it compare favourably with BSON?

It looks closer to msgpack if anything, but with actual strings and bytes.

It is inspired by msgpack. If you read the RFC then you will see that the authors like msgpack but have some different requirements.

Re: RFC 7049 - Concise Binary Object Representation (CBOR)

#30
post #20
post #19

Earlier quoted context omitted.

I agree. I think CBOR trades off a bit too much efficiency of in-place data access for compactness of representation.

Isn't the whole point of binary serialization formats efficiency and ease of parsing? Otherwise you might as well use .json.gz and probably end up with smaller files anyway.

You are very right. I was actually not arguing in favor of more complicated compression, but instead for more efficient access to data. Certainly, iterating though array and map items to get to the next element is not efficient.
Post reply on HN