This is the question. I'm still trying to solve the sync problems and searching for an (the) "ideal" way
.
The idea is:
1) the server sends to all the clients a "job" to do;
2) each client complete its job and send a "done" to the server;
3) when all "done" are received, the server executes its next job (not waiting, it meanwhile will handle other group of clients - game room).
But the server should set a timeout for the client's job, then it should use a timer for this and so there will be "many" active timers (with interval usually set to 20 s.).
All this is the reason for the question:
Determining how many clients can be managed seems to me an arduous task.