FlatBuffers Serialization Library

From GM-RKB
Jump to navigation Jump to search

A FlatBuffers Serialization Library is a efficient cross-platform serialization library.



References

2018

2018

In computer programming, FlatBuffers is a free software library implementing a serialization format similar to Protocol Buffers, Thrift, Apache Avro, SBE, and Cap'n Proto, primarily written by Wouter van Oortmerssen and open-sourced by Google. Like Cap'n Proto and SBE, it supports “zero-copy” deserialization, so that accessing the serialized data does not require first copying it into a separate part of memory, which makes accessing data in these formats much faster than data in formats requiring more extensive processing, such as JSON, CSV, and Protocol Buffers. It is the data serialization format used internally in Facebook's Android client, replacing JSON; in that role, they credit it for dramatic performance improvements in the client.[1] Cocos2d-x, the most popular free-software 2-D game programming library, also uses FlatBuffers to serialize all of its game data.[2] FlatBuffers is a very popular project on GitHub, with 7915 stars, 175 contributors, 1203 forks, and 503 watchers on GitHub as of 2017-06-15.[3] The FlatBuffers discussion mailing list has 440 members as of 2017-06-15.[4]

FlatBuffers can be used in software written in C++, C#, C, Golang, Java, JavaScript, PHP, and Python. The schema compiler runs on Android, Microsoft Windows, Mac OS X, and Linux, but games and other programs using FlatBuffers for serialization work on many other operating systems as well, including iOS, Amazon's Fire OS, and Windows Phone.[5]

Oortmerssen originally developed FlatBuffers for game development and similar applications.[6][7]

Although FlatBuffers has its own interface definition language to define the data to be serialized with it, it also supports schemas defined in the Protocol Buffers .proto format.

  1. George Xie (2015-07-31). "Improving Facebook’s performance on Android with FlatBuffers". https://code.facebook.com/posts/872547912839369/improving-facebook-s-performance-on-android-with-flatbuffers/. Retrieved 2017-06-15. "Story load time from disk cache is reduced from 35 ms to 4 ms per story. Transient memory allocations are reduced by 75 percent. Cold start time is improved by 10-15 percent. We have reduced storage size by 15 percent." 
  2. http://www.cocos2d-x.org/reference/native-cpp/V3.5/d7/d2d/namespaceflatbuffers.html
  3. "GitHub — google/flatbuffers: Memory Efficient Serialization Library". GitHub. https://github.com/google/flatbuffers. Retrieved 2017-06-15. 
  4. https://groups.google.com/forum/#!aboutgroup/flatbuffers
  5. "FlatBuffers for Unity". eXiin. 2015-09-21. http://exiin.com/blog/flatbuffers-for-unity-sample-code/. Retrieved 2017-06-15. "We tested flatbuffers [sic] on all major mobile platforms (iOS, Android, Amazon Os [sic], Windows Phone ) we’re building on[,] and it works pretty well." 
  6. "FlatBuffers Documentation". https://google.github.io/flatbuffers/. Retrieved 2017-06-21. "FlatBuffers is an efficient cross platform serialization library for C++, C#, C, Go, Java, JavaScript, PHP, and Python. It was originally created at Google for game development and other performance-critical applications." 
  7. Wouter van Oortmerssen (2014-06-17). "FlatBuffers: A Memory-Efficient Serialization Library". https://android-developers.googleblog.com/2014/06/flatbuffers-memory-efficient.html. Retrieved 2017-06-15.