Re:RFC 7049 - Concise Binary Object Representation (CBOR)
by craftit on Tuesday October 29, 2013 @07:02AM
(#6633158)
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....
[ Parent
| on HN ]
Re:RFC 7049 - Concise Binary Object Representation (CBOR)
by eli on Tuesday October 29, 2013 @08:56AM
(#6633666)
Could something like GZIP mask a lot of that repetition?
Re:RFC 7049 - Concise Binary Object Representation (CBOR)
by craftit on Tuesday October 29, 2013 @10:13AM
(#6634215)
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.