2 ms·
Yeah, something like the history of Protobuf or Avro and all the discussions about schema evolution in those things will show how these systems break down in th
by majormajor 3y ago
Yeah, something like the history of Protobuf or Avro and all the discussions about schema evolution in those things will show how these systems break down in the real world. Schema evolution and "supported types of requests" are hard in similar ways.
Do that munging at the boundary? Your boundary is gonna eventually be a heap of messy compatibility code to normalize requests. PLUS you would need to build some sort of sidecar to pass forward any necessary information about which sort of boundary request it was, once the business logic somewhere deep in the system starts depending on more than just the post-normalization form. If instead you want to reflect that in the type system through the whole system you need some sort of crazy-complex type hierarchy complete with a bunch of conditional validation rules or lots of permutations of types... or Maybes all over the place that just shift the burden back to the business logic code, to know which ones are REALLY needed when.
Cause your business logic has no limits on its complexity, but your type system probably does.