When comparing Protocol Buffers vs Apache Avro, the Slant community recommends Protocol Buffers for most people. In the question“What are the best data serialization frameworks?” Protocol Buffers is ranked 1st while Apache Avro is ranked 3rd. The most important reason people chose Protocol Buffers is:
Unlike JSON and XML, because data is exchanged in binary, there is little to no parsing overhead, resulting in significant performance gains.
Ranked in these QuestionsQuestion Ranking
Pros
Pro No parsing overhead
Unlike JSON and XML, because data is exchanged in binary, there is little to no parsing overhead, resulting in significant performance gains.
Pro Reliable
As this technology's been used behind the scenes by Google for over 10 years, their native libraries can be considered highly robust.
Pro Open source
It's free, open source and licensed under BSD-3
Pro Composite type extensions
A range of addresses can be declared as available without further definition. This allows third parties to use these spare fields for their custom requirements.
Pro Third party support for multiple programming languages
Supports multiple programming languages via third party solutions.
Pro Not widely adopted
If you hope to present your services to other companies this may be a drawback. REST (and "pseudo-rest" variants) has become the de-facto choice, with SOAP a close second. This means anyone connecting to your services would need to familiarise themselves with a new method of communication, and that they are less likely to have an existing toolset for such integrations built into their systems.
Pro Versioning
The protocol includes versioning, allowing clients on older versions of code to continue to communicate with an upgraded server (i.e. clients and servers don't need to be upgraded in unison).
Pro Dynamic typing
The data structure's schema is encoded in the message alongside its data, allowing you to easily amend the data structure and have this continue to be understood by other systems. This also avoids the need for versioning, as the data's related structure can be seen directly.