Services Evolution: Required is Forever

By Natalia Pryntsova

With more and more systems moving into microservices architecture we often find ourselves designing new integration endpoints and scrutinizing message schemas. As we design new service API one thing can be said for certain – at some point it will need to change, preferably without breaking every service around it. And this is where backward compatibility matters. This talk is about schemas versioning and different options to consider when designing services – binary serialization or JSON? Shared schemas or schema-less? We will start by a brief overview of backward and forward compatibility and why both are important but tricky to achieve in practice. Next we will dive into details of JSON and binary serialization issues. For binary serialization we will use Apache Avro and Google Protobuf as examples and will look into implementation details of integer packing and usage of field IDs. Finally we will summarize how encoders drive compatibility and, eventually, services evolution.