Handling data reads where data is constantly updating

MattNorman

Well-known member
Joined
May 22, 2021
Messages
98
Programming Experience
1-3
I am working on an app that provides users with a dashboard with various data elements that update every 3 seconds.

The data that they are reading is constantly being updated every four seconds by a server side app.

I have come up with a solution where the client app knows if the underlying data is actively being refreshed. It will then wait until that refresh is complete and read the data.

The issue I am having is that there is still a lot of clashing between the two and the client app ends up waiting a long time to be able to read the data and the timing can be anywhere from the intended 3 seconds to 15 seconds.

Does anyone know of a good way the handle this situation other than changing the server data refresh to a higher interval?

The only other method I have thought of but have not yet tried is to create a queue for client refresh requests and prevent the server from refreshing it's data until the queued requests have been processed. This however is likely to just slow the serve refresh and could likely be achieved by changing the server refresh interval.
 
Back
Top Bottom