From: William Rutiser Date: 2010-07-06T02:44:22+09:00 Subject: Re: [Q] synchronize a "mocked" clock in a distributed system Chuck Remes wrote: > On Jul 1, 2010, at 6:43 PM, Tony Arcieri wrote: > > >> It sounds like the way you've written your program is time-dependent, or as >> ChucK (the music language) would describe it "strongly timed" >> >> Right off the bat my initial advice would be to eliminate the need for a >> central clock in your system and make it fully asynchronous. Creating >> "strongly timed" synchronized distributed systems is rather non-trivial. >> > > Yes, I suppose it is strongly timed. I didn't realize that was going to be such a problem. > > Right now it is completely asynchronous when running across multiple nodes. Each machine's clock is NTP synched so it just does the "right thing" when it runs in real-time. This notion of strongly timed doesn't rear its *ugly* head until I try to replace the clock. > > I'm going to try to broadcast a clock pulse or heartbeat to all components. I can set it up so that each component uses the real clock when no clock pulse message has been received but switch over to the mocked clock when it sees the first clock message. Hopefully the delivery latencies don't cause too much trouble by skewing the time between components. > > I'll try it and see. Thanks to all for the suggestions. > > cr > > Could you setup a mock NTP time source that supplies "fast" time to its clients then configure each machine to use the mock NTP and update very frequently? This may not be practical and would certainly not work if the machines are being used for anything except your tests.