Protocol Buffers

About

It is a language-neutral, plataform-neutral, extensible mechanism for serializing structured data, although it can be used with other data formats like JSON.

The data is serialized to binary.

The first step is to define the structure for the data to serialize in a proto file .proto.

circle-info

The number right after the fieldname is an index used by gRPC for the serialization.

Once the data structures are defined, you use the protocol buffer compiler protoc to generate data access classes in whatever language it will be used.

Versions

Most recent version is proto3 (Version 3), which has simplified syntax, new features and support more languages.

Last updated