Design Patterns · Senior · Question 35 of 75
How should the UI account for eventual consistency in an event-driven system?
- ✓Correct answer: Show intermediate statuses and roll back optimistic updates
- 2Wait for full consistency and block the UI until then
- 3Ignore it: consistency is purely the backend's job
Explanation
After a command is sent, the data in a list may not update immediately. The UI shows a "processing" status, applies an optimistic change and updates it on an event (WebSocket, a refetch) or rolls it back on error.