| Customer App | Owns client protocol, request identity, retry, and resume behavior. In this design it participates in: Quote menu, fees, tax, and payment intent under expiring versions. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents the external caller from also owning the contract and failure behavior of Restaurant App. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Restaurant accepts after customer cancellation” to the external caller. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Customer App boundary before extracting or scaling it. |
| Restaurant App | Owns client protocol, request identity, retry, and resume behavior. In this design it participates in: Commit order and ask restaurant to accept before charging/capturing per policy. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Customer App from also owning the contract and failure behavior of Courier App. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Two couriers accept same offer” to Customer App. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Restaurant App boundary before extracting or scaling it. |
| Courier App | Owns client protocol, request identity, retry, and resume behavior. In this design it participates in: Track preparation and search geo cells for eligible courier candidates. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Restaurant App from also owning the contract and failure behavior of Realtime Gateway. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “GPS is stale near pickup” to Restaurant App. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Courier App boundary before extracting or scaling it. |
| Realtime Gateway | Owns authentication, validation, quotas, deadlines, and routing. In this design it participates in: Lease one courier offer conditionally and advance pickup/delivery state by version. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Courier App from also owning the contract and failure behavior of Menu / Availability. | Put protocol, authentication, quotas, and business transitions in one process. Acceptable at low scale, but it couples external traffic risk to domain releases. Here that simpler choice would couple “Payment succeeds but order commit times out” to Courier App. | Costs another hop, policy distribution, and a high-blast-radius fleet. Introduce it when many clients or services need one protocol and protection boundary. Measure the latency, saturation, lag, or mismatch at the Realtime Gateway boundary before extracting or scaling it. |
| Menu / Availability | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Settle restaurant/courier and compensate cancellations from the durable event trail. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Realtime Gateway from also owning the contract and failure behavior of Order API. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Restaurant tablet offline creates backlog” to Realtime Gateway. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Menu / Availability boundary before extracting or scaling it. |
| Order API | Owns authentication, validation, quotas, deadlines, and routing. In this design it participates in: Quote menu, fees, tax, and payment intent under expiring versions. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Menu / Availability from also owning the contract and failure behavior of Pricing / Fees. | Put protocol, authentication, quotas, and business transitions in one process. Acceptable at low scale, but it couples external traffic risk to domain releases. Here that simpler choice would couple “Restaurant accepts after customer cancellation” to Menu / Availability. | Costs another hop, policy distribution, and a high-blast-radius fleet. Introduce it when many clients or services need one protocol and protection boundary. Measure the latency, saturation, lag, or mismatch at the Order API boundary before extracting or scaling it. |
| Pricing / Fees | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Commit order and ask restaurant to accept before charging/capturing per policy. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Order API from also owning the contract and failure behavior of Payment Intent. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Two couriers accept same offer” to Order API. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Pricing / Fees boundary before extracting or scaling it. |
| Payment Intent | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Track preparation and search geo cells for eligible courier candidates. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Pricing / Fees from also owning the contract and failure behavior of Restaurant Tablet Queue. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “GPS is stale near pickup” to Pricing / Fees. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Payment Intent boundary before extracting or scaling it. |
| Restaurant Tablet Queue | Preserves durable ordering, replay, and consumer checkpoints. In this design it participates in: Lease one courier offer conditionally and advance pickup/delivery state by version. | Decouples bursts and failure from user acknowledgment. It prevents Payment Intent from also owning the contract and failure behavior of Preparation Tracker. | Call every downstream consumer synchronously. That couples user latency and availability to analytics, notification, indexing, and audit dependencies. Here that simpler choice would couple “Payment succeeds but order commit times out” to Payment Intent. | Costs eventual consistency, schema evolution, replay tooling, idempotent consumers, and lag operations. Earn it when bursts or downstream failure must not block acknowledgment. Measure the latency, saturation, lag, or mismatch at the Restaurant Tablet Queue boundary before extracting or scaling it. |
| Preparation Tracker | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Settle restaurant/courier and compensate cancellations from the durable event trail. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Restaurant Tablet Queue from also owning the contract and failure behavior of Courier Geo Index. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Restaurant tablet offline creates backlog” to Restaurant Tablet Queue. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Preparation Tracker boundary before extracting or scaling it. |
| Courier Geo Index | Serves a low-latency, disposable projection with authoritative fallback. In this design it participates in: Quote menu, fees, tax, and payment intent under expiring versions. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Preparation Tracker from also owning the contract and failure behavior of Dispatch Engine. | Read authoritative storage for every request. Simpler initially, but latency and source-of-truth load scale together and a hot key becomes a database incident. Here that simpler choice would couple “Restaurant accepts after customer cancellation” to Preparation Tracker. | Costs invalidation, staleness, stampede protection, and memory. Add or split it only after the workload (5M orders/day · courier updates every 5 s · dispatch < 3 s) proves repeated reads dominate. Measure the latency, saturation, lag, or mismatch at the Courier Geo Index boundary before extracting or scaling it. |
| Dispatch Engine | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Commit order and ask restaurant to accept before charging/capturing per policy. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Courier Geo Index from also owning the contract and failure behavior of Offer Lease Store. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Two couriers accept same offer” to Courier Geo Index. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Dispatch Engine boundary before extracting or scaling it. |
| Offer Lease Store | Owns authoritative versioned state or immutable evidence. In this design it participates in: Track preparation and search geo cells for eligible courier candidates. | Defines the source of truth and commit boundary. It prevents Dispatch Engine from also owning the contract and failure behavior of Delivery State Machine. | Let each service persist its own interpretation. That removes one clear commit boundary and makes retries, support, and reconciliation ambiguous. Here that simpler choice would couple “GPS is stale near pickup” to Dispatch Engine. | Costs schema migration, replication, backup, and shard ownership. Split storage only when access patterns, retention, or compliance boundaries materially differ. Measure the latency, saturation, lag, or mismatch at the Offer Lease Store boundary before extracting or scaling it. |
| Delivery State Machine | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Lease one courier offer conditionally and advance pickup/delivery state by version. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Offer Lease Store from also owning the contract and failure behavior of Settlement / Support. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Payment succeeds but order commit times out” to Offer Lease Store. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Delivery State Machine boundary before extracting or scaling it. |
| Settlement / Support | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Settle restaurant/courier and compensate cancellations from the durable event trail. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Delivery State Machine from also owning the contract and failure behavior of operators and repair tooling. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Restaurant tablet offline creates backlog” to Delivery State Machine. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Settlement / Support boundary before extracting or scaling it. |