@rkenmi - Google Protocol Buffers

Google Protocol Buffers


Google Protocol Buffers


Back to Top

Updated on June 3, 2018

From Wikipedia:

Protocol Buffers are a method of serializing structured data. It is useful in developing programs to communicate with each other over a wire or for storing data.

Here are some key characteristics of protobuf:

  • Serialization into bytecode means that data is condensed -- small in size. This is good for transient data, where size improvements can improve data transfer performance.

  • protobuf is great for interoperability with multiple languages or systems; it allows you to compile schemas for your data in popular languages such as Python, C++, Go, Java, etc.

  • protobuf is backwards-compatible, meaning that your program can still use deprecated data without breaking anything.

  • protobuf is forwards-compatible, meaning that your schema can be made to work with newer versions of your program

How protobuf works (from a developer perspective):

  1. Create your protobuf definition files (.proto)
  2. Define your messages (data structures) and services.
  3. Compile the .proto files with protobuf, generating .protoc files, which can be used by various recipient or sender programs.

Article Tags:
protobufserialization