3 ms·
Huh? Did you read the link, from the guy who was there during the major failure at Google that led to proto3 being redesigned without that flaw? The whole less
by klabb3 3y ago
Huh? Did you read the link, from the guy who was there during the major failure at Google that led to proto3 being redesigned without that flaw?
The whole lesson is that you can’t apply the lessons from static type systems in PLs when you have multiple versions and fragmented validation across different subsystems. Counter-intuitively! Everyone thought it was a good idea, and it turned out to be a disaster.
- 3cats-in-a-coat 3y agoIt remains a big asterisk to me, why was some random middleware validating an end-to-end message between two systems, instead of treating it as just an opaque message. Why are we not having this debate about "everything must be optional" for Internet Packets (IP) for example? Because it's just binary load. If you want to ensure integrity you checksum the binary load.
- klabb3 3y agoThings like distributed tracing, auth data, metrics, error logging messages and other “meta-subsystems” is certainly typical use cases. Reverse proxies and other http middleware do exactly this with http headers all the time.
- mike_hearn 3y agoI did read the link and I was at Google at the time people started arguing for that. With respect, I think the argument was and still is incorrect, that the wrong lessons were drawn and that proto3 is worse than proto2.
- klabb3 3y agoAlright, fair enough. Apologies for the dismissive tone. Could you elaborate (or point to) these wrong lessons or an alternative?
- hgsgm 3y agoOK, what do you do when a message comes in missing a field? Crash the server?
- dastbe 3y agoyou reject the message in the framework? and if the client is aware it’s required they fail to send? the bigger challenge with proto3 is that people use it both for rpc and storage, in some cases directly serializing rpc payloads. Disregarding how awful a choice that is, you likely want to trade off flexible deserialization of old data at the expense of rigidity, and conformance.
- deleted 3y ago[deleted]