Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Optimistic Update vs. Immediate Intent

The UI presents the outcome of an operation before it is saved. This is different from optimistic updates, which assume success and display results prematurely. A cloud-based medication tracker serves as an example. After taking a pill and closing the app, a user may be surprised when opening it again later to find that the app did not perform as expected.

Unlike optimistic updates, immediate intent does not create a false sense of security. Repeated lies from an app lead to loss of trust, prompting users to double-check everything themselves. Realistic response times under about 100 milliseconds can feel instantaneous, allowing users to bypass the pending state if the response arrives this quickly.

Achieving such fast performance requires a faster backend and servers located near users. Optimistic updates obscure latency issues, but addressing them through faster infrastructure eliminates them. If a faster response is not feasible, it is best to be straightforward with users. Instead of freezing the interface to maintain honesty, show the intended action on the card and retain the current position.

If the operation fails, restore the card to its last verified position and provide an explanation. Some believe that using a queue can make optimistic updates more reliable, suggesting the need for retries until the change syncs across devices. However, queues do not guarantee synchronization across devices. Nonetheless, combining queues with immediate intent can enhance reliability.

Sharing this approach with team members and contributing to the project on GitHub can help build trustworthy software. If there are any good and harmless use cases for optimistic updates, they are encouraged to discuss them.

Rewritten by urgent.news; may contain errors — check the original.

Source: romshark.github.io

Read the original at romshark.github.io →

Report a problem with this story

More in Tech

More from Saturday, 28 November 2026 →