4 ms·
No one said that all fields should be optional, only that it should be possible to have optional fields. It may sound like chaos to those who've not worked in s
by jeremyjh 8y ago
No one said that all fields should be optional, only that it should be possible to have optional fields. It may sound like chaos to those who've not worked in such environments, but in fact it is not at all unusual in large companies to have the same message pass through several layers of services in a single call-flow. This long predates the term "microservices".
- slavik81 8y ago> No one said that all fields should be optional As of protobuf v3, all fields must be optional. https://github.com/protocolbuffers/protobuf/issues/2497 https://github.com/protocolbuffers/protobuf/issues/2497
- taeric 8y agoUnless you are pushing validation of your data to an overly simplistic language specification, you will have to validate your data in your code. Once you are doing that, you might as well get used to the fact that you can't trust any data at rest. Even if you supposedly wrote it. To that end, I fully agree that all fields should be "optional" for the protocol layer.