Reader small image

You're reading from  Protocol Buffers Handbook

Product typeBook
Published inApr 2024
PublisherPackt
ISBN-139781805124672
Edition1st Edition
Right arrow
Author (1)
Clément Jean
Clément Jean
author image
Clément Jean

Clément Jean is the CTO of Education for Ethiopia, a start-up focusing on educating K-12 students in Ethiopia. On top of that, he is also an online instructor (on Udemy, Linux Foundation, and others) teaching people about diff erent kinds of technologies. In both his occupations, he deals with technologies such as Protobuf and gRPC and how to apply them to real-life use cases. His overall goal is to empower people through education and technology.
Read more about Clément Jean

Right arrow

Disabling field names – reserved names

Important message

For the sake of simplicity, I will be using Go for this example. If you are not familiar with this language, don’t worry. The example is small, and Go is a simple language. I am 100% confident that you can understand what’s going on.

We previously saw the need for reserved tags and how they can help with backward and forward compatibility. In this section, we will focus on the impact of the schema’s evolution on the code we are writing.

As we know, Protoc is mostly used to generate code out of proto files. This generated code is then used in our application to abstract the Protobuf encoding/decoding. While this is great, this creates some problems when the schemas evolve. Some of these problems can only be solved by going through the code manually and updating it but others are preventable.

Let’s see an example of a preventable problem. As you may recall, we now have v1, v2, and...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Protocol Buffers Handbook
Published in: Apr 2024Publisher: PacktISBN-13: 9781805124672

Author (1)

author image
Clément Jean

Clément Jean is the CTO of Education for Ethiopia, a start-up focusing on educating K-12 students in Ethiopia. On top of that, he is also an online instructor (on Udemy, Linux Foundation, and others) teaching people about diff erent kinds of technologies. In both his occupations, he deals with technologies such as Protobuf and gRPC and how to apply them to real-life use cases. His overall goal is to empower people through education and technology.
Read more about Clément Jean