4 ms·
Why msg.proto? Why not json? This seems like an odd dependency to me, and it seems like it adds no value.
by VikingCoder 8y ago
Why msg.proto? Why not json?
This seems like an odd dependency to me, and it seems like it adds no value.
- pknopf 8y agoPerformance.
- VikingCoder 8y agoThat seems highly unlikely. I'm going off of what I've seen myself, and what I've seen in the xi editor: https://github.com/google/xi-editor https://github.com/google/xi-editor "The protocol for front-end / back-end communication, as well as between the back-end and plug-ins, is based on simple JSON messages. I considered binary formats, but the actual improvement in performance would be completely in the noise. Using JSON considerably lowers friction for developing plug-ins, as it’s available out of the box for most modern languages, and there are plenty of the libraries available for the other ones."
- dwetterau 8y agoDoes the xi editor use a JSON transport layer for all syscalls though? Low-friction interfaces for developers are great but I'm not sure I agree with the comparison here.
- VikingCoder 8y agoYes, it does. The frontend and the backend only speak JSON.
- inimino 8y ago"Performance" in a text editor means latency, and it's not going to matter there when the text editor also has to edit the text, update the display, etc. "Performance" in a server also means throughput. There's a reason why protobufs exist and it is all about performance (and type safety which is related) and there's no way JSON serialize/deserialize overhead, in both directions every time, is going to be a good choice here.