FlatBuffers vs. Protobuf

276 views
Skip to first unread message

Arash Pourhabibi-Zarandi

unread,
Feb 1, 2019, 7:15:53 AM2/1/19
to FlatBuffers

Hi,


My question is if FlatBuffers is much faster than Protobuf, why isn't it more widely used compared to Protobuf?


It used to be an experimental thing but it seems to be mature enough now but isn't widely used yet. It seems people mostly use Flatbuffers for mobile apps/games. Why is that the case?


Arash

Arash Pourhabibi-Zarandi

unread,
Feb 4, 2019, 11:14:20 AM2/4/19
to FlatBuffers
 I understand the cost of switching to a new framework is high, but the benefit of this is also huge. Companies like Google or Facebook that provide latency-sensitive services gain a lot by doing this. Is there a more fundamental reason discouraging them to switch?

Wouter van Oortmerssen

unread,
Feb 4, 2019, 12:16:22 PM2/4/19
to Arash Pourhabibi-Zarandi, FlatBuffers

--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tao Jin

unread,
Dec 15, 2023, 1:35:18 AM12/15/23
to FlatBuffers
Sorry for bumping up this old thread.  

I am looking to choose between FlatBuffers and Protobuf for my project.  Wondering if there is new development about FlatBuffers adoption.  Seems PB is still a predominant choice in the field.  Why? 

Is it really mostly due to the Eng migration cost?  

Is there some technical limitation about FlatBuffers which it is not a good fit for? 

Thanks in advance!

mikkelfj

unread,
Dec 18, 2023, 9:22:40 AM12/18/23
to FlatBuffers
I can say how popular one is over the other. But for public facing interfaces where you would normally use JSON or XML, protobuf can be an alternative. FlatBuffers are less safe, although  they can be verified in some languages, and other languages are not very sensitive to buffer overruns.
Protobuf can take up less space than Flatbuffers when compressed, but Protobuf can use a lot more resources for parsing and allocation. JSON compresses relatively well. Normally I would recommend JSON for public APIs and FlatBuffers for internal message queues, or local file storage where you can trust the source, or perhaps sign the buffer. If your objective is performance use FlatBuffers. If your objective is safety and widest possible reach, use JSON. If undecided, use Protobuf. I think there is a case for using FlatBuffer schema to drive JSON and also Protobuf, so you can easily convert between these. But AFAIK there hasn't been much work on FlatBuffer / Protobuf interaction, although there has been some possibly not fully mature work on translating schemas between the two.

And reportedly, some find it easier to work with protobuf. At least there is a learning curve for using Flatbuffers correctly.
Reply all
Reply to author
Forward
0 new messages