← All patterns The problem A booking UI can display availability, but the server must decide whether a reservation can commit.
When it fits Several clients need a shared authority for validation, data access and business operations.
The whole architecture
Architecture diagram Download SVG Several clients use a server-side authority that validates requests before accessing shared data.
Blue arrows are requests and data calls; responses return to the caller.
client server architecture Several clients use a server-side authority that validates requests before accessing shared data. Blue arrows are requests and data calls; responses return to the caller. Clients Trusted server boundary Authority web → entry: API request mobile → entry: API request entry → app-a: route entry → app-b: route app-a → sql: validate / commit app-b → sql: validate / commit API request API request route route validate / commit validate / commit Client-side validation helps usability but cannot enforce the server invariant. Web client Presentation and input A mobile client uses the same authoritative operation contract. Mobile client Same API contract Routing does not replace authoritative server validation. API entry point Authentication / routing Instances can process requests under the same server contract. App instance A Business validation Shared durable state permits consistent authoritative decisions. App instance B Business validation A timeout does not prove a write failed; use an operation identity where needed. Authoritative SQL Atomic business writes The client should reconcile an ambiguous response with the server. Request contract Timeouts, operation IDs and known outcomes Select a component, or focus it and press Enter, to read its role.
App boxes here represent instances of the same server contract. Client state never substitutes for the authoritative commit. Walk through the design
Follow one operation Core flow Failure & recovery
Select a step to highlight its participants. This conceptual walkthrough is separate from challenge scoring.
Arrows show request and data-access relationships. Responses return to the caller.
1 Submit an intent2 Validate authoritatively3 Commit and respondStep 1 of 3 Submit an intent Client sends a reservation request through a defined API.
← Previous Restart Next step →
Trade-offs to make explicit A clear server contract supports many clients; network latency and availability become part of the experience. Client validation improves feedback, while server validation protects invariants against stale or modified requests. Failure modes to plan for A lost reply leaves the client uncertain whether a write committed. Use stable operation identities when retrying. A server bottleneck needs capacity and failure handling; adding clients does not increase server capacity. Before you build Explain your decision After a reservation request times out, how will the client discover whether it succeeded?
Use Plan & estimate inside practice to record your assumptions and trade-offs.
These links open the original challenges. Existing round unlocks, completions and points apply.
The great ticket rush Practice authoritative reservation writes and capacity along the client/app/SQL path.
Open challenge → One transfer, two attempts Practice stable operation identities when a reply is lost.
Open challenge → Further reading MDN · Client-server overview ↗
Original PractiseGrid explanations and conceptual diagrams, with primary references for further study. Dedicated scored exercises can be added as coverage grows.