3 ms·
Protobuffers have one major advantage over JSON: the schemas are versioned. When your requirements for the payload inevitably change, Protobuffers can handle th
by falcolas 9y ago
Protobuffers have one major advantage over JSON: the schemas are versioned. When your requirements for the payload inevitably change, Protobuffers can handle that with a lot less muss and fuss than JSON can.
Plus, the byte count over the wire is much smaller - something that matters even in today's world of gigabit ethernet.
- ninjakeyboard 9y agoYou have to compile the protocol buffers so there is overhead. Also the messages aren't human readable eg through kafka so you need to write something to look through the messages. JSON is faster if your dev team need to get from A to B in a hurry, but protocol buffers are a generally a better long term choice if you can put in the effort up front. Both have pros and cons.
- pegasuscollins 9y ago> Protobuffers can handle that with a lot less muss and fuss than JSON can. Are you speaking from personal experience? FWIW it doesn't match mine.
- skybrian 9y agoNot sure what you mean by "schemas are versioned". Protobufs have backward compatibility rules so you can add fields without changing versions. I don't think there's anything about explicit versioning in the spec?