Creating real time experience without blocking ui
I have an edit text and a list showing a set of tags.
When a user enters a tag in the edit text 2 things happen:
First, a request is sent to backend to store that tag.
Second, that tag is added to the list to create a real time experience.
However, there are some circumstances that may confuse the user, for example:
When the user creates a tag,the tag is added to the list, but backend might reject it since it already exists.
In this circumstance, The user is notified that the tag is invalid but that tag already exists on the list until I refetch all tags from backend and replace it with the current list. (The delay between notifying the user and refetching tags from backend may confuse the user)
My question is: What is real time experience approach for user's interaction while there might be some delay between that interaction and processing it? (Please note I don't want to block ui)