How does protocol buffers handle type versioning?
For example, when I need to change a type definition over time? Like adding and removing fields.
Protocol buffers are a combination of the definition language (created in . proto files), the code that the proto compiler generates to interface with data, language-specific runtime libraries, and the serialization format for data that is written to a file (or sent across a network connection).
It can accept input crafted by later versions of protobuf. The sender is backward compatible because it's creating output that can be consumed by earlier versions. So long as you're careful about when and how you change and remove fields, your protobuf will be forward and backward compatible.
Protocol buffers messages always use little-endian encoding.
Yes, repeated fields retain the order of items.
Google designed protobuf to be pretty forgiving with versioning:
however:
Generally speaking, though - it will just work, and you don't need to worry much about versioning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With