Must checkout wait until the invoice PDF is ready? No: invoice accepts the job and creates the document later, asynchronously. A status shows the interim state.Asynchronous communication
This is how the building blocks hang together
API contracts define the commitments. Synchronous and asynchronous communication use them, queues and pub/sub distribute messages. Idempotency secures retries, the outbox secures publication, orchestration runs processes. The gateway controls access, versioning controls evolution.
Here you clarify whether checkout has to wait for the invoice, what callers are promised and how retries and changes stay reliable. Each building block shows its theme at our shop.
This is what you learnYou want to test provider changes against real consumer expectations and must organize expectations, verification, publication, and version selection. You can compare the three central guarantees.
In the shopThe current shop remains a modular monolith with seven modules. Order consumes Payment’s internal contract for authorization status and rejection reason. The Order team publishes a contract with success and rejection examples; Payment verifies it in the pipeline for every change. For a hypothetical later service split, contract, provider version, and deployment environment are published together. The team deliberately changes a field that became optional and checks that only expectations actually in use block release.
This is what you learnIn the checkout, you can mark which calls the order process immediately awaits a response.
In the shopIn modular monoliths, ordering requests warehouse and payment directly. The payment module calls the external payment provider via the network.
This is what you learnYou can design reference, storage authorization, integrity, retention, and cleanup as one claim-check contract.
In the shopThe current shop processes its seven modules in a modular monolith. For a hypothetical external shipping service, Invoice creates a PDF, stores it encrypted under an opaque identifier, and sends order ID, object identifier, media type, and checksum through the broker. Shipping retrieves the document using its own service identity. The team delays the message beyond the normal URL lifetime, tests redelivery, and proves controlled renewal plus cleanup only after business completion.
This is what you learnYou can explain partition ordering, offset, retention, and replay as one stream contract.
In the shopThe current shop remains a modular monolith with seven modules. For a hypothetical analytics platform, order events are partitioned by order ID and retained for 90 days. Shipping reads live with its own group; Analytics builds a projection from its offset. The team deletes the analytics projection, replays available history, and checks per-order ordering, schema capability, and idempotent processing. It explicitly documents which view could only recover from a snapshot after retention expires.
This is what you learnYou can distinguish pub/sub from a work queue and event stream and define an operating contract per subscription.
In the shopIn the current shop, seven modules run together. Hypothetically, Order publishes OrderPaid after confirmed payment. Shipping, Customer Notification, and Analytics each receive a delivery through separate subscriptions and retain their own position and failures. The team takes Analytics offline, publishes more events, and proves that Shipping progresses, Analytics catches up, and duplicate delivery causes no duplicate business effect.
This is what you learnYou can define queue contract, acknowledgement point, backlog limit, and failure channel.
In the shopThe shop remains a modular monolith with seven modules. Hypothetically, Order places an invoice-generation job on the existing broker queue after commit. A worker creates and stores the invoice, then acknowledges. The team stops the worker before acknowledgement, fills the queue faster than it is processed, and tests idempotency, oldest-message age, capacity limit, and dead-letter path. Only this evidence supports the asynchronous extension.
This is what you learnYou can design competing workers with locks, acknowledgements, idempotency, and scaling metrics.
In the shopThe current shop creates invoices in a modular monolith with seven modules. Hypothetically, Order places invoice jobs on a queue read competitively by four workers. Order ID and invoice version form the idempotency key. The team terminates a worker after storing the PDF but before broker acknowledgement; after lock expiry, another worker takes over, detects the existing effect, and acknowledges without a second invoice. Queue age and duration control worker count.
This is what you learnYou can design priority classes, fairness, and measurable waiting-time objectives.
In the shopThe existing shop processes seven modules in a modular monolith. For hypothetical asynchronous invoice generation, legally required corrections are urgent and normal first invoices are regular. Two of ten processing slots remain reserved for regular work; its priority increases after a defined wait. The team generates urgent jobs for an extended period and proves throughput, oldest-message age, and met waiting time for both classes before adopting the rule.
This is what you learnYou can show how the order and the publishing order are stored together and later shipped separately.
In the shopVariant with permanent news channel: order confirmed B-1042 and at the same time stores order confirmed in your outbox. The news channel is temporarily unreachable.
This is what you learnFor reservation and payment, you can distinguish between orchestration and choreography.
In the shopVariant: Warehouse and payment are independent services. The team compares an order orchestration with an event-driven choreography; the payment provider remains external.
This is what you learnYou can design event chain, correlation, and overall status for a choreography.
In the shopThe current shop processes B-1042 as a modular monolith with seven modules and a shared database: reserve stock, authorize payment, confirm the order, commission shipping. The visual compares a hypothetical distributed saga using event reactions and central commands. A shipping rejection triggers compensations only through explicitly designed reactions: cancel the order, cancel the authorization, and release stock.
This is what you learnYou can model orchestrator state, participant boundaries, and flow recovery.
In the shopThe current shop processes B-1042 as a modular monolith with seven modules and a shared database: reserve stock, authorize payment, confirm the order, commission shipping. The visual compares a hypothetical distributed saga using central commands and event reactions. A shipping rejection leads to explicitly designed business operations: cancel the order, cancel the authorization, and release stock.
This is what you learnYou can assign external shop routes to the relevant internal destinations via an API gateway.
In the shopVariant: Catalogue and shipping were separated as services for proven operational reasons. Browser and customer service access shop routes exclusively via the API gateway.
This is what you learnYou must map a logical service name to currently reachable instances and define freshness, health checking, and cache behavior. You can compare the three central guarantees.
In the shopThe current shop has seven modules in one process. Hypothetically, Shipping runs on three changing instances behind the logical name shipping. The platform publishes endpoint changes and removes a faulty instance according to its health rule. The team stops one instance during traffic and measures time to removal, failed attempts from caches, and behavior during discovery outage. Only a bounded stale period and successful re-resolution support the guarantee.
This is what you learnYou must implement shared rules for internal service communication and operate the added data and control paths. You can compare the three central guarantees.
In the shopThe current shop remains with seven modules in one process and does not need a mesh. For hypothetical separate Order, Payment, and Shipping services, a mesh data plane mediates mTLS, telemetry, and traffic rules. The team rotates certificates, disconnects the control plane, and forces a target outage. It measures added p95 latency, connection errors, and behavior with last known configuration before the platform complexity is justified.
This is what you learnYou must create a controlled external entry point for several APIs and define routing, access control, and failure behavior at the edge. You can compare the three central guarantees.
In the shopThe current shop remains a modular monolith with seven modules. Hypothetically, Browser and Customer Service receive separate public routes through a gateway to Catalog and Shipping. The gateway checks identity, rate limit, and deadline and routes to registered targets. The team simulates an unreachable target and invalid authorization and proves unambiguous status codes, correlation ID, bounded retry, and unchanged internal contracts.
This is what you learnYou can bound BFF responsibility by client need and recognize duplicated business logic.
In the shopThe current shop has seven modules and a web interface in a modular monolith. A hypothetical mobile app needs smaller product images, a compact order summary, and fewer round trips; a Mobile BFF aggregates Catalog and Order for that purpose. The web interface continues to use its existing server-side adapter. Prices, reservations, and payment status are decided exclusively by the responsible modules. The team measures payload size, call count, and change rate before operating the additional service permanently.
This is what you learnYou can distinguish a compatible API extension from a breaking meaning change.
In the shopThe warehouse module extends the reservation response with expiresAt. Later, the existing field available should change from a number to a business availability level.
This is what you learnYou can compare runtime composition and a read model using fan-out, freshness, and partial failures.
In the shopThe current shop has seven modules in a modular monolith and one shared database. Customer service needs an order view from Order, Payment, and Shipping. An internal composer calls the three module APIs in parallel, limits each subrequest, and marks a missing shipping status as temporarily unknown. Network failures arise only in a hypothetical later service split; p95 latency, fan-out, and partial-result measurements then determine whether a materialized read model is preferable.