Time sync between server and client

Hi guys,
I have written a chess server and client. My next step is to implement a clock which will be used in timed games, however, I am not sure of the best solution. I can't think of a reliable method to keep the client's time in sync with the servers because the event latency varies between individual events and clients.
My first idea was to send a 'tick' event every second but I dont think this the best solution. I have seen many applet based clients which have timers, such as Yahoo chess.
I know this question is a little vague, I can give more detail if needed.
Thanks,
Alex

To prevent client-side cheating, the server should keep the
"official" clock. Every so often (perhaps when a move gets made?),
notify both clients of the official time. Clients count seconds from
that official time.
This is a suboptimal solution because it leaves clients vulnerable
to network lag. I can't think of any other solution that doesn't give
clients some responsibility for tracking time, though, and that's a
big security hole.
If you're willing to open that hole, have each client report back to
the server the elapsed local time from when they recieved the
last move to when they made their move. Then update the other
client's clock accordingly.

Similar Messages

  • Speed between server and client when using FML

    I using FML between server and client, the server access oracle using only 5 ms, but when tranfer back to client, it about 100ms long. I tuned my hp-ux 11 kernel and tuxedo config file, but useless, Why?

    Hi Tumecan,
    Your expected information available here, check.
    Frontend Network Load - Network Integration Guide (BC-NET) - SAP Library
    few related SAP Notes:
    164102 - Network load between application server and front end
    500235 - Network Diagnosis with NIPING
    62418 - Network Load of SAPGUI Frontend Communication
    679918 - The front-end network time
    578118 - Long response times on the SAP GUI
    161053 - Using SAP GUI in WAN
    Regards,
    V Srinivasan

  • Time sync between AP and Controller failed

    Hi,
    I just lost one AP from vWLC and found this trap:
    Time sync between AP and Controller failed
    What that is means?
    I check time on remaining AP's and found out that time on AP's is different form wlc (time on AP's is 2 hours less than time configured on vWLC).
    On vWLC I have configured NTP and timezone.

    Ok, I try that on one ap next week, but problem is that I have 50 of them on 6m pole and many of them have same traceback in logg:
    %SYS-3-TIMERNEG: Cannot start timer (0x694CC78) with negative offset (-1398025296). -Process= "CAPWAP CLIENT", ipl= 0, pid= 125
    -Traceback= 298098z 3A5660z 3A3A44z AB2DC4z 99F8D0z A1B630z 9BB734z 9B3FBCz 958EA0z 96ED68z 97E1F4z 97A6A4z 9804F4z 9807D4z 969C48z 96A114z
    *Sep 2 17:41:18.351: %SYS-3-TIMERNEG: Cannot start timer (0x694CC78) with negative offset (-1429528296). -Process= "CAPWAP CLIENT", ipl= 0, pid= 125
    -Traceback= 298098z 3A5660z 3A3A44z AB2DC4z 99F8D0z A1B630z 9BB734z 9B3FBCz 958EA0z 96ED68z 97E1F4z 97A6A4z 9804F4z 9807D4z 969C48z 96A114z
    *Sep 2 17:45:26.439: %SYS-3-TIMERNEG: Cannot start timer (0x694CC78) with negative offset (-1429528296). -Process= "CAPWAP CLIENT", ipl= 0, pid= 125
    -Traceback= 298098z 3A5660z 3A3A44z AB2DC4z 99F8D0z A1B630z 9BB734z 9B3FBCz 958EA0z 96ED68z 97E1F4z 97A6A4z 9804F4z 9807D4z 969C48z 96A114z
    *Sep 2 17:45:37.831: %SYS-3-TIMERNEG: Cannot start timer (0x694CC78) with negative offset (-1429528296). -Process= "CAPWAP CLIENT", ipl= 0, pid= 125
    -Traceback= 298098z 3A5660z 3A3A44z AB2DC4z 99F8D0z A1B630z 9BB734z 9B3FBCz 958EA0z 96ED68z 97E1F4z 97A6A4z 9804F4z 9807D4z 969C48z 96A114z
    *Sep 2 19:02:15.394: Fw Aborting cmd before Timeout
    *Sep 2 19:02:15.394: mvl_handle_timeout called cmdtype=[0x20]
    Only one is disconnected because Time sync between AP and Controller failed trap.
    Many of them have logg filed with:
    *Aug 31 08:21:45.382: Dtx dump: 4B07D5C 2192 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4ACCA2C 2193 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4AEA3C4 2194 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4AD1DD8 2195 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4ACC284 2196 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4AE4F00 2197 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4AE8498 2198 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4AEF054 2199 0 flags 423 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4ACE46C 2200 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4AFE324 2201 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4AD4CE0 2202 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    *Aug 31 08:21:45.382: Dtx dump: 4AD53FC 2203 0 flags 23 101000 blkedmsk:FE01 blkedidx:0 aid:25
    cpq 7C31D58
    Don't know what that mean.

  • Data streaming between server and client does not complete

    Using an ad-hoc app, data streaming between server
    and client does not complete as it supposed to be.
    The process runs well in solaris 5.8, however under 5.9
    we have found the characters stream buffer length limitation
    is around 900 to 950 characters (by default we are using 3072
    characters).
    Example:
    - We are transfering HTML file, which will be displayed
    in the App client, with buffer=3072, the HTML only displayed / transfered
    as xxxxxxxx characters, but with buffer=900 the HTML is displayed properly,
    in this case, the only problem that we have is the file transfer will
    eventually longer than usual.
    - There is another case, where we have to transfer information (data) as stream
    to the client. A long data stream will not appear at all in the client.
    Any ideas why the change between 5.8 and 5.9 woudl cause problems?
    The current app-driver that we are using is compiled using Solaris 5.6,
    if possible we would like to have use of a later version, which is compiled using Solaris 5.9, do you think this will probably solve our problem?
    Thanks
    Paul

    Does this have anything to do with Java RMI? or with Java come to think of it?

  • Serialize the object between Server and Client?

    Hello friends,
    What is the important to Serialize the object between server and client?
    Thanks
    tamilvanan

    in which context ??
    Anyways,checkout the below link and try to understand how do we convert Serializable Object's State to in Stream and send it over network.
    http://java.sun.com/j2se/1.4.2/docs/guide/serialization/examples/index.html
    Hope that might help :)
    REGARDS,
    RaHuL

  • Bandwidth between server and client

    HI
    What is the minimum bandwidth can be allocated between server and client?

    Hi,
    Your question has no standard answer. The minimum bandwidth is variable to each specific system. It depends on many other factors too.
    Thanks,
    Gordon

  • Connection between server and client using thread

    hi
    i am new to java..i hav done a program to connect a server and client...but i hav not used threads in it..
    so please tel me how to use threads and connect server and client..i tried it out not getin...i am havin thread exception...my program is as shown below
    SERVER PRG:
    import java.io.*;
    import java.net.*;
    public class Server{
    String clientsen;
    String serversen;
    public void go(){
    try{
         ServerSocket serverSock=new ServerSocket(6789);
         while(true) {
         Socket sock=serverSock.accept();
         BufferedReader inFromClient=new BufferedReader(new InputStreamReader(sock.getInputStream()));
         BufferedReader inFromuser=new BufferedReader(new InputStreamReader(System.in));
         DataOutputStream outToClient=new DataOutputStream(sock.getOutputStream());
         clientsen=inFromClient.readLine();
         System.out.println("From Client: "+clientsen);
         System.out.println("Reply mess to Client");
         serversen=inFromuser.readLine();
         outToClient.writeBytes(serversen+'\n');
    } catch(IOException ex) {
         ex.printStackTrace();
    public static void main(String[] args) {
         Server s = new Server();
         s.go();
         CLIENT PRG
    import java.lang.*;
    import java.util.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.net.*;
    import java.lang.Thread;
    import java.applet.Applet;
    class Client1
    public static void main(String argv[]) throws Exception
              String Sen;
              String modsen;
              BufferedReader inFromUser=new BufferedReader(new InputStreamReader(System.in));
    Socket clientSocket=new Socket("192.168.1.2",6789);
              DataOutputStream outToServer=new DataOutputStream(clientSocket.getOutputStream());
              BufferedReader inFromServer=new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
              System.out.println("Enter the mess to be sent to server");
              Sen=inFromUser.readLine();
              outToServer.writeBytes(Sen + '\n');
              modsen=inFromServer.readLine();
              System.out.println("FROM SERVER: " +modsen);
              clientSocket.close();
    please send me the solution code for my problem...

    sorry for inconvenience...
    SERVER PROGRAM
      *import java.io.*;*
    *import java.net.*;*
    *public class MyRunnable implements Runnable*
       *public void run() {*
       *go();*
    *public void go(){*
    *try {*
        *String serversen;*
       *ServerSocket  welcomeSocket=new ServerSocket(6789);*
       *while(true)*
    *Socket connectionSocket=welcomeSocket.accept();*
    *//BufferedReader inFromClient=new BufferedReader(new //InputStreamReader(connectionSocket.getInputStream()));*
    *System.out.println("enter the mess to be sent to client");*
    *BufferedReader inFromuser=new BufferedReader(new InputStreamReader(System.in));*
    *DataOutputStream outToClient=new DataOutputStream(connectionSocket.getOutputStream());*
    *//clientsen=inFromClient.readLine();*
    *//System.out.println("From Client: "+clientsen);*
    *//System.out.println("Reply mess to Client");*
    *serversen=inFromuser.readLine();*
    *outToClient.writeBytes(serversen+'\n');*
    *} catch(IOException ex) {*
    *        ex.printStackTrace();*
    *class Server1{*
    *public static void main(String argv[]) throws Exception*
         *Runnable threadJob=new MyRunnable();*
    *Thread myThread=new Thread(threadJob);*
    *myThread.start();*
    *}*CLIENT PROGRAM
    import java.io.*;
    import java.net.*;
    class Client2
    public static void main(String argv[]) throws Exception
              //String Sen;
              String modsen;
              //BufferedReader inFromUser=new BufferedReader(new InputStreamReader(System.in));
    Socket clientSocket=new Socket("192.168.1.2",6789);
              //DataOutputStream outToServer=new DataOutputStream(clientSocket.getOutputStream());
              BufferedReader inFromServer=new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
              //System.out.println("Enter the mess to be sent to server");
              //Sen=inFromUser.readLine();
         //     outToServer.writeBytes(Sen + '\n');
              modsen=inFromServer.readLine();
              System.out.println("FROM SERVER: " +modsen);
              clientSocket.close();
    this is the code which i hav used using thread but i am gwetin error..ts is the error
    Exception in thread "main" java.lang.NoSuchMethodError : Main

  • Difference between Server and Client Installation of ODI

    Hi All,
    i am new to ODI, recently i try to install ODI it has three Option 1.Complete 2. Client 3. Server
    i installed Server after installation it contains only Agent. and i tried Client option end of the installation i saw all the ODI components including Agent. i am bit confusion about when do i need to use ODI Server and when do i need to use ODI Client and what is the purpose of both
    Thanks
    Knidhi
    Edited by: knidhi on Oct 6, 2009 2:38 PM
    Edited by: knidhi on Oct 6, 2009 2:38 PM

    Hi,
    Trying to help :-
    What roll ODI Server play in the entire ODI ArchiTechture?
    ODI Server will act as a cenratilsed system for all your ODI clients
    You can call this ODI server as an execution server for all your ODI clients .
    When this is needed ?
    (some real time examples to explain the need)
    If there is team need to work on a cenratlised application ...
    say MachineDev1 (developer1) , MachineDev2 (developer2) .. and MachnAnlayst1 (An1), MachnAnlayst2 (An2) need to work on an single application
    The developer1 will create projects based upon his machine ,
    The developer2 will create projects based upon his machine ,
    and the analysts/operators will try to execute the application from their machines with their machine agents.
    the application will reffer the paths for temperory/supporting files/folders on the agent machines which they are running ...
    this will be a difficult task, if you dont have a similar folder sturcture in all of your machines ..
    In order to avoid this conflict you need a centralised system for running your jobs from different machines
    say SVR (from your example). put all the supporting files/folders in this system while developing projects each develpoer need to consider this server as an execution server.
    so if any execution comes from any clients with this agent, it will reffer to the machine SVR folders and you can have a centralaised enviorment to work for different machines.
    Regards,
    Rathish

  • App that syncs between Server and i-Device

    Hi,
    I'm working for a construction company. We have a lot of pictures but, for the moment, we can't really use them for good purposes. We are investigating the possibility to give iPad's to our constructionsite leaders so they can access these photographs really simple and if it's possible also offline.
    All these photographes are located on a central server, structured per construction site.
    Now we are looking for an easy-to-use app that gives us the possibility to sync our iPad's with a specific folder on that server. But we want to store the photos offline (on the iPad) aswell. In a perfect scenario, the constructionsite leader enters our WiFi network, the iPad automaticly checks on the server if there are any chances to the content of the specified folder and if there are any changes, the iPad should sync with that folder.
    I allready tested some apps and ios features. For example:
    - (Shared) Photo Stream. This looks great but we have to many pictures to make this system workable for our end users.
    - Good reader: This app is the closest I got to find the perfect solution. The only problem is that the sync option is not functioning superb. The app creates a new directory on the iPhone each time it syncs. + the synchronisation has to be started manually.
    - Dropbox: Limited capacity
    - MobilEcho: Looks promising but couldn't get it to work properly
    - and all kinds of different, small apps...
    Is there an app out there go could forfull my needs?
    Would be very gratefull for some help!
    kind regards,
    Jeremy Poot

    - Dropbox: Limited capacity
    You can buy more space.
    For syncing pc or mac folders to iPad applications.
    "Using SugarSync, you simply designate folders that you want to “sync” to the cloud and it keeps everything in sync anytime you make changes.  This is the way cloud storage should be done and especially if you are using your iPad for buisness or for school."
    The only potential downside is that so many apps for the iPhone/iPad come with Dropbox sync built in which makes it extremely convenient.
    http://www.tcgeeks.com/best-ipad-cloud-sync-app/
    Doug says:
    "This can be done with Dropbox as well using one of the many Dropbox addons…"
    http://wiki.dropbox.com/DropboxAddons

  • Difference between SERVER and CLIENT side conflicts?

    Some sync conflicts (ApplyChangeFailed event) are generated on the server side (WCF service in my case) and some are generated on the client side ... what triggers the conflict
    to be generated on one side or the other?

    the ApplyChangeFailed is fired by the provider that's applying the change.
    When you upload, it fires on the destination/remote provider.
    when you download, it's your local provider applying the change.

  • Transfer files between server and clients

    Hi all
    i use oracle forms 11g r2 webutil
    i have some questions :
    1- How i can choose picture from client side and save it on server ( in folder ) ?
    2- How i can print the picture from client side?
    Thanks

    Hello,
    For transfering files, configure the Webutil library, then use its AS_To_Client() and Client_To_AS() methods.
    Francois

  • Passing parameters between server and client side

    Dear All
    I writing a server-side web service and using wsdl to expose its methods for a 'client' to use.
    However, i need to make sre the clients creates a soap header? How can i tell the client it must create a soap header?
    Also can someone tel me how i pass a value from the server-side to the client-side and also get a vlue from the client soap message
    Many thanks

    In your wsdl you would have the header as part of the input for example, see the operation below:
    <wsdl:operation name="foo">
    <soap:operation soapAction="http://www.foobar.com/foo" style="document"/>
      <wsdl:input>
       <soap:body use="literal"/>
       <soap:header message="tns:FooSoapHeader" part="MySoapHeader" use="literal"/>
      </wsdl:input>
      <wsdl:output>
       <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>

  • XL Reporter Problem:  Version Mismatch between server and client

    When I start SAP Business One, I get the following message:
    "The new version of Add-on is installed.  Upgrade the Add-on in the current Common DB."
    The version of the XL Reporter add on shown in the Add-On Administration is 881316, but the version of the add-on in the Add-On Manager screen is 881 316 00 08 (equates the verions of SBO installed).
    Does anyone have any advice on how to correct?   Do I need to reinstall SAP Business One on the server?
    Regards
    Jeffrey Patch

    Hi,
    Check this link :
    https://websmp202.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700000827312009E
    Check Application Error/Limitation > Reason 6 in the link.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Xsan between server and client??

    Sorry, if my question should be stupid:
    I am installing now a FC Raid to a Xserve. The raid is neither Promise nor Xraid. Could I connect a specific workstation (MacPro) with the Xserve via xsan (and FC) to get higher transmission speed for that workstation?
    I understand, that normally you connect several servers with one or serveral San-Storage.
    Thanks in advance!

    Hi,
    Well, that depends on the FC interface on the RAID..
    But it should be faster, as the data path is dedicated in FC.
    You do, though, need a huge setup for that small installation, so it has to be worth it.
    FC switch, dedicated Ethernet Metadata network (could be VLAN'ed on an existing switch) and SAN software.
    But, the speed is higher, compared to AFP if you have enough RAID controllers with bandwidth.
    Apple's XRaid has 80MB/sec pr. controller at 2GB FC.
    Promise uses 4x4GB FC interfaces / chassis, so those should be higher. Yours my offer something different.
    Hope it helps...

  • Samba UID/GID syncing between server/client

    I'm very confused about this. I'm trying to get a file share server up and running which is used by several people. I've only configured a Samba server so far for one user to use. The UID and GID of the users do not match on the server and client, and as a result I can't write to the share.
    More detailed explanation: The share on the server is owned by user "john" and group "data". The user john has a different UID on the client and the group data does not exist on the client (does it need to exist?). So the share shows up in the client as 1001:1001 and john can't write to it. How can this be fixed in an easy manner? I can't imagine having to manually adjust all uid's and gid's? There has to be an easier way, right?

    You shouldn't need to sync u/gid's. 
    The first thing that comes to my mind here is simple filesystem perms.  To test I would make the shared dir world/group readable/writeable - IE chmod 777 /my/shared/folder. then try connecting from the remote client.  Remember, there are two sets of access permissions...Share level and filesystem level.
    You can do user/group mapping if you're in a Windows AD or domain environment, but with stand-alone Samba servers this is not necessary.
    I would also check the samba check list at the following link for a decent, simple set of items to look at for basic troubleshooting...
    http://us3.samba.org/samba/docs/man/Sam … nosis.html

Maybe you are looking for

  • Error in calling a base service progran

    Hi, I have a business service which this following schema <schema> <fname mapField="EXTRACT_FILE_NAME"/> <fline mapField="FILE_LINE"/> <actn mapField="ACTION_CODE"/> </schema> Service name is :- CILZFOPN Its a Java based service (BASE). I am getting

  • How to use goto function?

    how to use goto function in indesign javascript?? my script starts with chekcing whether input files are present or not.. if any of the input files r not present, i want to skip the function n terminate the functioning with displaying the message tht

  • New Message Window popup - Odd

    This has just started to happen. I have a few users who send a new message and after clicking send and the message is gone a new message window appears automatically. This is annoying to them because they need to close the window to do anything else

  • Problems with RMI

    hi friends, I am doing my project in grid computing.I am using RMI. but sometimes what happens is when i submit the jobs to the machines and after completion when i collect the values and display the output, sometimes i am not able to get the whole i

  • Having problems downloading cs6 web premium

    having problems downloading cs6 web premium trial