liveBook · Manning

Backward compatibility

As explained in Developer Experience on Kubernetes

Backward compatibility is the ability of a changed system to continue supporting previously supported interfaces, behavior, or data.

Backward compatibility keeps existing interfaces, behavior, and stored data usable while a service evolves. A new appointment category can be added without requiring older appointments or clients to provide it. section 2.3.2

A practical evolution pattern is to:

  • Add the database column without making it mandatory. section 2.3.2
  • Update request handling and data models to accept the new field. section 2.3.2
  • Use a later migration to assign defaults before enforcing the field as mandatory. section 2.3.2

Adding appointment categories

The Appointments service adds a nullable category column, persists and returns the value, and continues retrieving or updating older appointments that lack category information. section 2.3.2

Listing 2.4 Schema migration to add a new column to Appointments.
-- +goose Up
ALTER TABLE appointments ADD COLUMN category VARCHAR(255);
 
-- +goose Down
ALTER TABLE appointments DROP COLUMN category;

Inspect the Goose migration that adds and removes the optional category column. section 2.3.2

How Developer Experience on Kubernetes covers it

How deep it goes
Explains optional-column rollout and deferred enforcement, stopping short of a complete migration implementation.
Examples
Uses an appointment category added to PostgreSQL records and HTTP requests as its central example.
What it assumes
Assumes familiarity with HTTP services and relational databases while illustrating schema evolution from the existing appointment model.
What you can do after
Apply it via incremental schema and API changes that preserve existing appointments and clients.
How it connects
Connects API evolution with database schema migration, default values, and data migration.

Also explained in

Compare how 22 books explain backward compatibility →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Developer Experience on Kubernetes. The section links point to the parts of the book it draws on.