I have a web-based application written in Javascript (it uses Vue, but that detail is not crucial) which communicates with a server whenever there is a change in its state. In case a call to the server fails, I implement an exponential backoff strategy to retry the request. However, a scenario arises where if the initial call fails and subsequent changes trigger another call, the second update might get overwritten by the retry of the first call.
Although this seems like a common issue, I have not been able to find any examples or plugins that address this specific problem. Currently, I am utilizing Axios for making HTTP requests but I am open to exploring other options.
If anyone could lead me to a solution or provide a quick example demonstrating how to handle this situation, I would greatly appreciate it.
Thank you in advance!