Say you have a UI that reflects some sort of server-side data and the UI can manipulate that data via HTTP requests. For a more concrete example, consider a user database with a web interface that can add, edit, and delete users through HTTP. The client itself stays in sync with the server through periodic polling and has an updating table of users on one page.
When the client modifies the data, when should the data in the table be changed? If it is changed when the client edits the data, then there is an inconsistency in the client and server data for some period of time and that has to be dealt with if the HTTP request to change the data fails. If the interface is updated either when the request is successful or the next time the server is polled for data, it may cause a user to believe their action didn't do anything.
Is there a generally preferred approach to this? Would it be better to do something like have some kind of sync status that's displayed as an icon or color for each record while the data is out of sync?