|
• Time Sync
Lately I've been facing this problem, I have a server where several clients connect each having an algo to follow, and they interact with each other, the central server helps them maintain sync.
the problem is that if one of the clients runs on a relatively slower machine (computer), I still can sync the time by using system clock but the time required for the two identical (in terms of algorithm complexity and other variables) clients to run on diffrent machines will be diffrent.
Now what I want to do is that server keeps track of whenever two interacting clients (or non-interacting) are trying to take a decision, whichever client finishes first tells this to the server (that decision is ready for execution) and the server delayes this decision by the extra-time that the client on slower machine takes to finish the same task if the tasks are diffrent then some way to measure the time complexity is needed so that a similar technique could be followed in the ratio (or some other proportion) of time complexity.
how do I make this execution time same that is the server syncs every client to the one which is running on the slowest machine.
after this I think I will need to find an optimal (minimal) running time as a tradeoff between speed of the client machines and number, as I cant get a large number of fast machines, I think to find an optimal solution I will have to do some optimization between these two objectives right..?? but then again this thing is far away right now from where I am standing.
ps. my english is not good so feel free to ask any part you have trouble understanding.
Bye
\_/
|