3 ms·
"Breaking changes" happen regardless whether you use protobufs or JSON. Where the schema contract is enforced, run-time or build-time is irrelevant. - If I ser
by lxe 6y ago
"Breaking changes" happen regardless whether you use protobufs or JSON. Where the schema contract is enforced, run-time or build-time is irrelevant.
- If I serve a JSON API and make a change, your client may stop working correctly if I broke the API contract.
- If I serve a protobuf API and make a change, your client may also stop working correctly for the same reasons.
- kentonv 6y agoWith schema-driven protocols, it's possible for linters to automatically detect many kinds of breaking changes and flag them, to stop developers from creating a breaking change by accident. Of course, it's still possible to make breaking changes without changing the schema. But being able to detect and prevent some kinds of bugs is better than not.
- mixmastamyk 6y agoYes, the contract pushes the break forward, to happen at build time rather than waiting for run time.
- EdwardDiego 6y agoYeah, more tooling is required. We use Schema Registry for our Kafka consumers and producers and it's quite handy, we tend to use it in FORWARD compatibility mode. We've also in the past used build time compatibility checks for the same purpose. https://docs.confluent.io/current/build-applications.html https://docs.confluent.io/current/build-applications.html