← Back to context

Comment by craftit

12 years ago

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.