5.12 Self-test
Self-test20 questions
Define backward and forward compatibility. Which is usually harder, and precisely why?
An older client calls a newer service. Which compatibility do you need on the request, and which on the response? Now reverse the versions.
Draw the three-step sequence by which an old node silently deletes a field added by a new node. What property must the decoder have to prevent it?
Give three reasons never to use
pickle/java.io.Serializablefor persisted or transmitted data.Why does X's API return post IDs twice? What is the exact numeric boundary involved?
What is an "open content model" in JSON Schema, and why does it mean schemas define what isn't permitted rather than what is?
MessagePack saves 19% over JSON; Protobuf saves 59%. Where does the extra saving come from?
In Protobuf, why can you rename a field but never change its tag? Why must you
reserveda deleted tag?Explain how Protobuf achieves forward compatibility for an unknown field. What specific piece of information makes skipping possible?
Why is an Avro-encoded record undecodable without a schema, when a Protobuf one is decodable (structurally) without one?
State the single Avro rule for adding/removing fields. Derive from it why adding a field without a default breaks backward compatibility.
Name the three mechanisms by which an Avro reader learns the writer's schema, and the context each suits.
Why is Avro friendlier than Protobuf to dynamically generated schemas? What manual step does Protobuf require?
"Data outlives code." Give two mechanisms by which databases avoid rewriting old data on a schema change.
List the six ways a network request differs from a local function call. Which one makes retries dangerous?
Why does location transparency work better in the actor model than in RPC?
Compare DNS-based load balancing with a service-discovery system on two axes: change propagation speed, and metadata richness.
What simplifying assumption can you make about RPC deployments that you cannot make about databases? What does it let you skip?
Explain how a durable execution framework avoids double-charging a credit card. Why does it still require the payment gateway to be idempotent?
- Design question
you run a public JSON API used by 400 external customers, an internal gRPC mesh, and a Kafka event backbone feeding a warehouse. A core entity gains a new required field and one field is renamed. Write the migration plan — encoding by encoding, with the compatibility direction you're relying on at each step and the order in which you deploy.