Hi all, I'm sure this problem has been considered or even solved before; I just don't know how and what all my options are. Would greatly appreciate your ideas, any links to useful info... even if you don't have actual code/implementation to share. Many thanks!
Let's say:
I have a bunch of nodes on the Internet. These could be either www browsers, or custom thick client applications.
There is a server (running some service/application) that these nodes know of in advance. If necessary, the nodes can also come to know about each other via this central service.
Any node can send data to the central server (say, on user interaction). Any node can pull data off of the central server, Ajax-style.
Now the question:
If these nodes need to interact with each other in realtime...
and
If I need to explicitly display on each node EITHER the current server time OR the current localtime (of the node) OR the current time since the start of a session)...
Then, how do I go about addressing differences among the node clocks, clock differences between the server and the nodes, and not to mention unpredictable communication channel delays?
Use case: A user fires an event at her node at time T. Not only do I need to process this event (locally and at the server), I need to also convey the time it precisely occurred relative to all others.
I suspect there already are some time sync-ing protocols in some murky, low-level areas of the TCP/IP stack, but what all is available at the application layer level... especially, the www level?