[REL] Live timing

Discussion in 'Other' started by Gerald Jacobson, Jul 31, 2014.

  1. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Download the tool: Download link
    Read the documentation: Wiki link

    Hello,
    My team asked me to provide a simple live timing website providing data they needed/wanted. As i have converted it to rF2, i share the tool, in case of some of you are interrested.

    This tools is composed of several components:
    • A database (MySQL by default) used to host live data for several rF2 session
    • A java server , who collect data from rF2 games and store them to the database
    • Two plugins who collect rF2 data and send them to the java server:
      • The GRLiveTiming Plugin running on the rF2 dedicated server, to collect general data (session information, scoring information)
      • The GRLiveTimingTelem Plugin running on the rF2 client, if a driver want to sent their telemetry data to the java server (usefull on endurance race, allowing other drivers of the car to have telemetry access when they are not the current driver)
    • A PHP web site to view live timing data for any managed rF2 session

    A full documentation for installation, configuration and usageis available as a wiki.
    The tool is downloadable here

    Note: If you use it,like it and want/can, you can Donate to support.
    Thank you

    View attachment 13774
     
    DA likes this.
  2. Luc Devin

    Luc Devin Registered

    Joined:
    Jan 16, 2012
    Messages:
    1,133
    Likes Received:
    23
    Perfect
    Thank you
     
  3. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    new version
    Now the java server can record driver hot laps

    - Java Server updated
    - New database table script
    - New php file (GRBestLap.php)
    - rF2 plugin updated

    Behaviour can be disable using -nobestlap as command parameter of java server

    [​IMG]
     
    Last edited by a moderator: Aug 17, 2014
  4. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    New Version available
    - only "web" directory have changed : (all *.PHP and GRLiveTiming.ini)

    Now you can use the old fashion to connect to mysql (mysql_connect) or the new fashion (PDO). By default it use the new fashion PDO, but if your PHP does not support it, use the old fashion way.
    To change it go to the ini and update [GENERAL] and [DATABASE.OLD.FASHION]
    Code:
    [COLOR="#FF8C00"][B][GENERAL][/B][/COLOR]
    // set to 1 to use the old fashion (mysql_connect) instead of PDO
    use.old.fashion.mysql=[B][COLOR="#FF8C00"]0[/COLOR][/B]
    
    [DATABASE]
    dsn="mysql:host=localhost;dbname=grliveviewdb"
    username=root
    password=root
    
    [COLOR="#FF8C00"][B][DATABASE.OLD.FASHION][/B][/COLOR]
    [COLOR="#FF8C00"]host=localhost
    database=grliveviewdb
    username=root
    password=root[/COLOR]
    
    
     
  5. Luc Devin

    Luc Devin Registered

    Joined:
    Jan 16, 2012
    Messages:
    1,133
    Likes Received:
    23
    hotlap, simple and effective
    Thank you
     
  6. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Add Track name in the Session Info, via this the new version

    - A new "trackName" field VARCHAR(64) in the grlv_session_info table
    - 2 PHP files have been updated
    - Java server Updated
    - rF2 Plugin updated
     
  7. Dave-NRT

    Dave-NRT Registered

    Joined:
    Jan 8, 2012
    Messages:
    364
    Likes Received:
    2
    Very nice gerald..

    any plans to built a package with the nessasary web site programs...that can be installed on dedicated server..

    Pipe dream I know... but it would be a great first, download, install, now the dedicate server has just the basics to operate your plugins..

    By doing this..it eleaves the need for a full blow web base program running..



    Just a thought

    Looks good though..

    Dave

    NRT
     
  8. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Don't know if it will be use full, as in géneral, teams have already where servers, and generally in another PC than RF2 so they wont install a web server.
    UwAmp is a good MySQL/PHP all in one.


    New Version available
    - As you risk to forgot to protect the ini file, i included the database info in a php file instead of the ini, so no more risk.
     
  9. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    New Version available
    - Driver is removed as soon as it leave the server
    - Fix web display when restarting session/weekend or server shutdown

    Component updated:
    - Java Server (GRLiveTimingServer.jar)
    - rF2 LiveTiming Plugin (GRLiveTimingPlugin.dll & GRLiveTimingPlugin_x64.dll)
    - Web (GRLiveTiming-json.php)
     
  10. Dave-NRT

    Dave-NRT Registered

    Joined:
    Jan 8, 2012
    Messages:
    364
    Likes Received:
    2
    Good Morning Gerald

    Look very nice Sir...

    Keep up the great work..

    Dave

    NRT
     
  11. Rich Goodwin

    Rich Goodwin Registered

    Joined:
    May 3, 2012
    Messages:
    1,219
    Likes Received:
    9
    will importing the .sql files to a current database structure, wipe the the current database?

    I only ask as I was going to import them on to my websites database, but obviously, don't want to lose anything......

    Or if I import, will it create its own tables?
     
  12. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Not, the database will not be dropped. It is only table script. But if you want to isolate those table, usually we create a new database.
     
  13. Rich Goodwin

    Rich Goodwin Registered

    Joined:
    May 3, 2012
    Messages:
    1,219
    Likes Received:
    9
    Thanks. My website only appears to allow for one database :(
     
  14. Rich Goodwin

    Rich Goodwin Registered

    Joined:
    May 3, 2012
    Messages:
    1,219
    Likes Received:
    9
    Is it ok to have the server-java stuff running on the same server the rF2 dedi servers are on?

    I currently have this inside the properties file;

    SERVER.Port=667

    DATABASE.ConnectionString=jdbc:mysql:<ip>/<db_name>?user=<username>&password=<password>

    I have obviously taken out the ip etc. But is it ok to connect to it this way? My web hosting doesn't allow batch files to be executed, so I hosted it on my dedi....
     
  15. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Yes, if you do not connect many rF2 server to the java server, you can host it on the same PC than the one running the rF2 (you should not see negative effect)
     
  16. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Don't forget to let the two "/" before the <ip>
     
  17. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    New Version Available
    - Add recording of each lap in the current session. To consult the lap list, just click on the driver name in the Live view.

    Updated components:
    - New database table: use the grlv_session_lap.sql script to create it
    - Update GRLiveTiming.php file (add an hyperlink on the driver name)
    - New GRLiveLapTiming.php
    - New GRLiveLapTiming-json.php
    - Update the java server : GRLiveTimingServer.jar

    View attachment 14115
     
  18. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    New Version Available
    - Add a management for data coming from AI

    -- In the web page, now you will find an "AI" checkbox to tell if you want to see AI data or not
    -- In the server properties, you can disable the persistance of data coming from AI (in this case, any data coming from AI will not be persisted in the database): Persist.AI.Data=1

    Updated components:
    - Java Server : GRLiveTimingServer.properties and GRLiveTimingServer.jar
    - Php pages : GRLiveTiming-json.php, GRLiveLapTiming.php, GRBestLap.php, GRLiveTiming.php
    - New image : images/ai.png
    - rF2 plugin : GRLiveTimingPlugin.dll, GRLiveTimingPlugin_x64.dll
    - Database: a new "controller" column have been added to the following table : grlv_session_lap, grlv_session_timing, grlv_bestlap

    If you have already those three table, you can alter them using the following SQL command:
    Code:
    ALTER TABLE  `grlv_bestlap` ADD  `controller` INT( 1 ) NOT NULL DEFAULT  '2';
    ALTER TABLE  `grlv_session_timing` ADD  `controller` INT( 1 ) NOT NULL DEFAULT  '2';
    ALTER TABLE  `grlv_session_lap` ADD  `controller` INT( 1 ) NOT NULL DEFAULT  '2';
    
     
  19. Luc Devin

    Luc Devin Registered

    Joined:
    Jan 16, 2012
    Messages:
    1,133
    Likes Received:
    23
  20. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18

Share This Page