Keep the branch operational
The supplied CafeChee brief calls for multi-branch restaurant operations and recommendations during unreliable network conditions. The critical write path belongs at the branch, while analytics and model distribution can converge asynchronously.
Transactional outbox
Write the business record and the outgoing event in one local transaction. A synchronization worker delivers events with stable IDs. The cloud acknowledges only after durable storage, and duplicate delivery is handled with a uniqueness constraint.
Conflict policy
Orders are append-oriented records, not shared mutable documents. Inventory corrections are explicit adjustment events. Configuration uses version numbers, with a documented conflict policy and a review path instead of silent overwrites.
Recommendation serving
Cache a versioned model or recommendation artifact at each branch. Keep a deterministic fallback when the artifact expires or model evaluation fails. Changes to the recommendation model must not block checkout or order recording.
Operating questions
- How much local disk is available before sync lag becomes dangerous?
- How are clock drift and out-of-order events handled?
- Can an operator inspect and retry a failed synchronization batch?
- Which personal data is necessary, and what is its retention period?
Validation plan
Exercise the system through a simulated network outage, duplicated batches, and a model rollback. Publish throughput and business improvements only with evidence; the brief does not supply verified restaurant counts or measured AI outcomes.