In previous blog posts I’ve introduced three ways of encoding message data: raw binary in the payload, some form of structured text such as JSON or structured data types. The last option I’d like to cover is making use of a third party data serialization system such as Apache Avro or Google Protocol Buffers (GPB).
These third party serialization systems offer some advantages that aren’t available with any of the other options: they give you an independent source for the structure of data. This source can be versioned and controlled just like any other source, but the changes are localized to the structure of the data, so changes can be made without changing or breaking any other code. Accessing the data is abstracted, providing a layer of automation which reduces the chances of errors in data access. For any large project with multiple developers using the same data format, this single source of data structure can have considerable benefits.… Read the rest