Both are serialization libraries and are developed by Google developers. Is there any big difference between them? Is it a lot of work to convert code using Protocol Buffers to use FlatBuffers?
1 Answer
I wrote a detailed comparison of a few serialization systems, including Protobufs and FlatBuffers, here:
https://kentonv.github.io/capnproto/news/2014-06-17-capnproto-flatbuffers-sbe.html
However, the comparison focuses more on comparing the three new "zero-copy" serialization systems, and includes Protobufs mostly as a reference point. Also, I'm the author of Cap'n Proto, and also the author of Protobufs v2 (I was responsible for open sourcing Protobufs at Google), so the comparison may be biased.
(Updated in 2021:) Note that Protobufs was introduced at Google way back in 2001 or so and remains the "lingua franca" there today. FlatBuffers was introduced in 2014 and is used in some projects, but Protobuf remains Google's main data interchange format, and there is no intention to change that. To be fair, Google probably couldn't change this if they wanted to, there's just too much code.
8 Comments
flatbuffers are used quite a lot these days, such as in tensorflow lite, we have the tensorflow protobuf files, but also tensorflow lite flatbuffers with their smaller sizes, and it would help to know pros and cons here on SO to be able to understand, which one is more suited for a particular usecase and also a comparison with Cap'n Proto too, especially against flatbuffers for mobile devices, thanks!