chapter eleven
11 Synchronous boundaries: Anti-corruption layers and distributed read models
This chapter covers
- Calling another hexagon through its published contract, not its database
- Translating a neighbor's model with an anti-corruption layer
- Keeping foreign concepts out of your commands, queries, and domain
- Knowing which side owns the translation
- Mapping the neighbor’s responses and failures into our model
- Bounding the availability cost of a synchronous call
- Answering a query that needs data another context owns
- Choosing a read strategy from its freshness and ownership needs
Before an approval goes through, WriteFlow asks the identity service to validate an author. This is the chapter’s running interaction: WriteFlow calls a neighbor and must translate the answer it receives. In the same article-review context, the partner CMS asks WriteFlow to reopen an article for review. That inbound call is separate from author validation; it shows the other direction across the boundary.