← Back to context

Comment by ctz

12 years ago

Avoiding the need for protocol version negotiation might be a useful feature in some systems, but it seems to me that the things you lose makes it really not worth it. Particularly, a protocol without atoms invariably ends up like most JSON APIs -- very 'stringly typed', somewhat poorly defined, and verbose on the wire.

Which is strange for a thing calling itself 'concise'.

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.