Question

This is a question I have always wondered

Is it as simple as repetitive pinging of a server in a seperate thread or is it more complicated than that?

I am only talking about the app version not the browser as it is obvious that browsers have direct access to a servers database

Was it helpful?

Solution

What you are describing is called Polling. It is possible to design your app to work that way, but it is often inefficent. Another approach would be to let the server inform the client when it has new information. These are called Events. They are usually more efficent because the client just needs to wait for updates and the server isn't bombarded with requests. You are right that this often happens in another thread since the reading operation blocks (it waits for more data to read).

Licensed under: CC-BY-SA with attribution
scroll top