From the course: gRPC in Python

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Protocol buffers

Protocol buffers

- [Instructor] Protocol buffers is a serialization format coming from Google. Protocol buffers has a schema. Here, we define a location message, which has two fields, a latitude and a longitude, both of them doubles, which will be converted to Python floats. Protocol buffers works by using the protoc compiler which is going to convert this schema definition to Python files that will handle serialization. The protocol buffers format is fast. It's about four times faster than JSON, from my experience, and takes about fourth of the bytes when serializing data.

Contents