Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Synchronizing the clocks  RSS feed

 
Salima
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to know that while running client-server applications, how one should synchronize the clock. I mean system clock can't be synchorinize, since server may be in other continent. Please help me ASAP.
Thanks in advance
Salima
 
Thomas Smets
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By regularly exchanging time the two could be kept more or less in synch.
My advise is to generally speaking have one server as the reference server...
The stupid question is :

Why do you wanna do that at application level while the system could be as well synchronize (system call Time) ?
Rgds,
Thomas,
 
Salima
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am writing a client server application to send an audio file to server and Server will send that file to Client2. I need to calculate the time when the packet start from client1 and reaches server. Since my Clients and Server will run on different m/c's so i won't be having the synchronized clock. System clock on different m/c could show different time. My question is how to synchronize the time in this application.
Thanks in advance
Salima
 
Thomas Smets
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are writting the C & the S why don't you calculate the double time :
i.e., C --> S --> C.
You could then "ping" one from the other ?
When I write ping, it may be your own echo-server !
Rgds,
Thomas SMETS,
SCJP 2 - Brussels
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!