4 ms·
I was recently working on an API where we decided to use protobuf. I remember the first time I saw the message as encoded by protobuf; it really made me aware o
by VBprogrammer 8y ago
I was recently working on an API where we decided to use protobuf. I remember the first time I saw the message as encoded by protobuf; it really made me aware of how wasteful JSON can be. I know that usually that all comes out in the gzipping but there is nothing quite like seeing half a page of JSON become 1 line of gibberish to demonstrate the point.
- XCSme 8y agoProtobuf is really slow with encoding/decoding and also does unnecessary validation of the data. If you are just starting out with binary data serialization I recommend FlatBuffers instead of protobuf.
- Matthias247 8y agoReally slow compared to what? Json? A handwritten binary encoding? For most use cases protobuf should be fast enough. I also don’t understand the unnecessary validation part. If you receive data over the network you should always validate it. Even if it’s from within the same company network
- moogly 8y agoMaybe things have improved since, but the last time I tried FlatBuffers (about 2 years ago), I found the API (generated C#) to create the FlatBuffers cumbersome, inelegant and quite error prone.