Maintaining Wire Compatibility

Nisarga P February 22, 2024 #General #Blog

In a production software engineering environment, often times one needs to add fields to a proto (protobuf); which is a lightweight message payload format. What is often easy to overlook is that the proto may be in use by a number of downstream customers. Services also may not be fetching the latest version for that proto and therefore may not have access to the most up-to-date format.

In this type of situation there are a number of ways to handle the addition of a new field(s):

Essentially, the goal of due-dilligence here is to avoid a situation where there is a wire incompatibility. We do not want a downstream service to break because they are calling an endpoint without a newly required parameter. Wire incompatibility is quite a commonplace issue and as an engineer one needs to be careful when rolling out new features to ensure that they are also backwards compatible.

Related Readings: