Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-21-2004, 03:50 PM   #1 (permalink)
bossebo
Registered User
 
Join Date: Jun 2004
Posts: 1
bossebo is on a distinguished road
network time synchronisation in java

Hi everyone! I hope someone can help me with this problem.

I want to synchronize two network clients in time so that they can execute a command at an exact point in time.

* FIRST: An algorithmic approach
I have tried to solve this problem by sending packets between the two clients, but it seems to be theoretically impossible. Anyone with a solution here. I use the udp protocol for data transfer between the clients.

* SECOND: Using network time protocol (in java?)
The second approach I come up with is using some sort of network time protocol. I have no experience of this and can not find anything of employing it with javas standard packets (I donīt want to use third party packets in the first run). Anyone with some experience on this issue.

/Anders Persson (bossebo)
bossebo is offline   Reply With Quote
Old 06-21-2004, 05:17 PM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,151
Belisarius is on a distinguished road
Depends on what you mean "exact same time". Even on a closed network there will be lag time between clients. And even NTP doesn't perfectly sync clients. Execution will probably be off by a millisecond or two.
__________________
GitS
Belisarius is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
JAVA Hobbyists Wanted emteam Java 0 08-29-2004 11:27 AM
Inheriting a badly setup network. DesertWolf Lounge 3 04-18-2004 09:18 PM
IBM urges Sun to make Java open source redhead Code Newbie News 0 03-01-2004 10:39 PM


All times are GMT -8. The time now is 10:14 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting