Frank Geyer
Registered
Hi Noel,...
I am amazed you don't have locking problems with your setup. I poll my XML file over HTTP from a remote location every 2secs for logging hotlaps. The live timing page is client side and pulls the XML file every 1.5secs. So if you have 50 people all pulling the XML every 1.5secs you are bound to hit a lock. I must be doing something wrong somewhere.
I am guessing that is what's causing your locking problems !?!? You probably need to change your app to a loader-based-scenario.
Code:
[B]Fail Safe Scenario - Live Timing Scheme:[/B]
|-- rFactorSL 1 ( via http - 2.5 times a second )
|
rF DS XML (twice a second) ---- rFactorSL 2 ( via local FS - 2.5 times a second )
|
|-- rFactorSL 3 ( via ftp - 2.5 times a second )
The loader is a .NET application which transports all RAW DATA presented by the plugin (without any formatting) into the database. Then the RAW DATA within the database is presented thru APACHE via PHP any way you like. Meaning, it doesn't matter how many users are viewing the data, you always ending up with only three processes accessing the rF DS XML file. I always ending up from time to time with a "loader cannot access the XML file", cause it is written twice per seconds by the plugin. But I don't care about this. The data within the database is updated roughly two times a second, which gives me enough room to present live data once a second to the user and statistical data by user request.
Locking management thru SQL is much more convenient than thru the file system.
You can even implement this into a load balancing scenario based on DNS-Round-Robin if each loader is writing its collected data into different databases on different mysql servers.
Cheers
Frank
PS: I only use the internal plugins as well, switching everything off which is not required and then building the XML file by fopen( "VMHotlaps\\CurrentScoring.xml", "w" ); and fprintf( fo, "String Data", VARS );
Last edited by a moderator: