The definition of Protocol buffer is given below,
“Protocol Buffers are a way of encoding structured data in an efficient yet extensible format”
- It allows as us to define the schema in .proto file. So we have to generate the mapping classes using that file. Its easy to know the request the response fields by going through it.
- Backward compatibility is very easy as we are numbering each fields in the proto file
- Its best suitable for the backend application. Ours is a ReSt application which interacts with an another backend application. Obviously the backend application supports only protobuf format so we dont have any choice other than using Protobuf.
- We can specify the required and optional flag for each fields. This allows us to extend the functionality in the future without making any changes to the client application