3 ms·
1. It's not easier to use them than JSON when just getting started. However, the pay off is the strong typing and zero-copy access that they offer to folks that
by politician 4y ago
1. It's not easier to use them than JSON when just getting started. However, the pay off is the strong typing and zero-copy access that they offer to folks that need to support clients on multiple architectures.
2. No, writers can directly embed structs and primitive data types into binary buffers at runtime through an API generated from an IDL file. Readers use direct memory access to pull values out of the buffers. If you set it up right, this can result in a massive perf boost by eliminating the encoding and decoding steps.
3. Facebook uses them in their mobile app. Another commenter mentioned use of the in the Arrow format. The flatbuffers website isn't the best, but clearly documents the flatbuffers IDL.
- wzvici 4y agoIs there any good writeup about using them that is easy to follow? With drawbacks on using them in prod?
- politician 4y agoThe google documentation has a minimal tutorial. There are implementations for all of the major languages. The level of documentation in the ecosystem, though, is poor. My best recommendation for you is to jump in and get the tutorial/hello world example working in a language you're comfortable with. They aren't hard to use, but they aren't the easiest thing either. Once you get the gist of the API through the tutorial, the other important topics that come up immediately are version control; git repo design; headers and framing. In production, they've been bulletproof. As long as you account for the compile time issues (schema versioning, repo, headers and framing, etc.).