3 ms·
We already have FlatBuffers, which allow you to send structs on the wire without reinventing anything. It sounds like it's a good match here. Protobuf is better
by fwsgonzo 6y ago
We already have FlatBuffers, which allow you to send structs on the wire without reinventing anything. It sounds like it's a good match here. Protobuf is better if you care about the byte count on the wire and less about the CPU time to pack and unpack it.
- simonh 6y agoI'd not come across FlatBuffers before, but they do seem interesting for some use cases, especially when you're highly performance sensitive. https://codeburst.io/json-vs-protocol-buffers-vs-flatbuffers-a4247f8bda6f https://codeburst.io/json-vs-protocol-buffers-vs-flatbuffers...
- twic 6y agoAFAIK, the three main options in this subspace are FlatBuffers, Cap'n Proto, and SBE. Here's a comparison from a Rust perspective: https://speice.io/2019/09/binary-format-shootout.html https://speice.io/2019/09/binary-format-shootout.html And from the Cap'n Proto author: https://capnproto.org/news/2014-06-17-capnproto-flatbuffers-sbe.html https://capnproto.org/news/2014-06-17-capnproto-flatbuffers-...
- tyingq 6y agoIt also appears to be 236kb and 23 classes for the java api, versus 1.6MB and 700 classes for protobufs.