LVD Inside a Single Microservice
Small services still contain code that changes at different speeds. How LVD applies inside one microservice, and how to pick the layers it actually needs.
Microservices, domain-driven design, research directions and the maths underneath.
Small services still contain code that changes at different speeds. How LVD applies inside one microservice, and how to pick the layers it actually needs.
Shared types, service-to-service calls and sagas all have a home in LVD. The network boundary needs no new layer rules, only a clear path through Resources.
How an event travels between two LVD services, and why the consumer, where raw bytes become a typed event, is the place to be strict.
LVD organises code and microservices organise deployment. Why that makes topology a reversible choice, and what a service mesh still leaves to your code.
How Domain-Driven Design's tactical building blocks land on LVD's layers, and why rate of change, not habit or taste, settles each placement.
How to combine DDD bounded contexts with LVD layers: give each context its own full stack, and treat the shared kernel as a small Schema package.
Every layer imports Schema types, so Schema is where a team's shared vocabulary can be enforced. Enums are the first place to start.
How DDD aggregates shape the Tools layer: one root per set of tools, one aggregate per transaction, and sagas driven by domain events for anything wider.
Where domain events live in LVD: schemas in L1, emission from Tools, consumption through Resources, and event sourcing spread across four layers.
A whole bounded context laid out layer by layer, from schemas to protocol adapters, using a library lending example alongside the book's order management case.
A practical test for when LVD alone is enough and when Domain-Driven Design belongs beside it, with a way to introduce DDD gradually instead of all at once.
The book proposes measuring volatility from version control instead of opinion. Here is why that beats memory, and three ways the record can still fool you.
Two research directions from the book's closing chapter: language models that review layer assignments, and systems that adapt their structure at runtime.
The book's last chapter proposes mappings and open questions, not results. Three are worth pulling on: smart contracts, the layer count and cognitive load.
A plain-language proof sketch of why a strict one-way layer ordering rules out dependency cycles, and where the guarantee needs an extra rule.