TMServerSwitch v1.2 for FAST3.2.2

Discover FAST, a records keeping server control script with a public records system called Dedimania, which will show records from the server on tm-exchange.com

Moderators: Slig, TM-Patrol

Mort
smooth traffic navigator
smooth traffic navigator
Posts: 275
Joined: 16 Jan 2009 10:57
Owned TM-games: TMUF, TMNF
Location: Australia
Contact:

Re: TMServerSwitch v1.0 for FAST3.2.2

Post by Mort » 26 Jun 2009 16:24

Another possible bug. I only started seeing this after Switch was installed, and it seems to go away when I set the power to off.

At the end of the round when the podium is showing, the dedi window moves to the left hand side. When the next track starts the ML screens aren't redrawn and you end up racing with the ML windows all set in the podium position for about 20 seconds. During this time none of the menu or / commands work. It doesn't happen every time, just sometimes.

I'm wondering if it is an issue with switch doing a refresh and if a server is busy (e.g. end of round loadig new map) it causes FAST to stop and wait for the switch plugin? The TM server keeps going but it seems like FAST is what gets stuck and after 20 seconds or so it starts working again. It may also just be because I have 7 servers it's checking against causing delays sometimes?

User avatar
AstroGlider
smooth traffic navigator
smooth traffic navigator
Posts: 237
Joined: 13 Aug 2005 01:10
Owned TM-games: TMF, TMU, TMS, TMI?
Location: Tampa, Florida, USA

Re: TMServerSwitch v1.0 for FAST3.2.2

Post by AstroGlider » 27 Jun 2009 13:45

Mort wrote:Another possible bug. I only started seeing this after Switch was installed, and it seems to go away when I set the power to off.

At the end of the round when the podium is showing, the dedi window moves to the left hand side. When the next track starts the ML screens aren't redrawn and you end up racing with the ML windows all set in the podium position for about 20 seconds. During this time none of the menu or / commands work. It doesn't happen every time, just sometimes.

I'm wondering if it is an issue with switch doing a refresh and if a server is busy (e.g. end of round loadig new map) it causes FAST to stop and wait for the switch plugin? The TM server keeps going but it seems like FAST is what gets stuck and after 20 seconds or so it starts working again. It may also just be because I have 7 servers it's checking against causing delays sometimes?
The list is updated at the start of every new map, and if one (or more) of the servers fail to connect, then it could cause a delay. This could be one reason for what you are describing. Check the console log for any clues. Another clue is is one or more of the servers are missing from the list once it finally becomes responsive again, which should give some indication as to which server failed to respond in time. There's of course a bit of timing involved in updating the server list. When all the servers are located on the same computer it may cause some intermittent problems, especially when the servers are busy handling player-related stuff. Maybe it would help to put in some delay between refreshing each server, and I'm not sure if it's even necessary to do an automatic update at each map start. It's a work in progress. This may not even be a problem with the next Fast release w/manual flow control either, but that's pure conjecture at this point. At any rate, it's all a work in progress.
Image
Image

Mort
smooth traffic navigator
smooth traffic navigator
Posts: 275
Joined: 16 Jan 2009 10:57
Owned TM-games: TMUF, TMNF
Location: Australia
Contact:

Re: TMServerSwitch v1.0 for FAST3.2.2

Post by Mort » 28 Jun 2009 12:25

I was wondering if it might be due to one of the servers it's checking being in the middle of a track change and not respoding at that particular time.

It might be an idea that would require a significant re-write, but I have another thought of how to approach this.

1. Have a scheduled task or cron php script that does the "gathering" part and puts it in a file. It can be "offline" from the servers themselves, or maybe just have an option where one server is nominated as the "master" that does the gathering.
2. Each server plugin just reads that file to get the status and display in the menu.

This way you only have one connection to each server to get the details. In my case I have 7 servers, and each server is connecting to the others, so that's 49 queries flying around every few minutes.

User avatar
AstroGlider
smooth traffic navigator
smooth traffic navigator
Posts: 237
Joined: 13 Aug 2005 01:10
Owned TM-games: TMF, TMU, TMS, TMI?
Location: Tampa, Florida, USA

Re: TMServerSwitch v1.0 for FAST3.2.2

Post by AstroGlider » 29 Jun 2009 08:28

Mort wrote:I was wondering if it might be due to one of the servers it's checking being in the middle of a track change and not respoding at that particular time.

It might be an idea that would require a significant re-write, but I have another thought of how to approach this.

1. Have a scheduled task or cron php script that does the "gathering" part and puts it in a file. It can be "offline" from the servers themselves, or maybe just have an option where one server is nominated as the "master" that does the gathering.
2. Each server plugin just reads that file to get the status and display in the menu.

This way you only have one connection to each server to get the details. In my case I have 7 servers, and each server is connecting to the others, so that's 49 queries flying around every few minutes.
Well, that approach would probably not help in the case of one or more servers being nonresponsive in the middle of a map-change during the update cycle, but I think it would certainly cut down on the query load. With each server added to the list, the query count increases exponentially, so you do have a valid point. One potential problem with having one "master" as you describe is if the servers in the list are spread out in various locations/networks/continents/etc, in that the other servers may not be able to access the file containing the collected info on the master. In any case you gave me something to think about.
Image
Image

Mort
smooth traffic navigator
smooth traffic navigator
Posts: 275
Joined: 16 Jan 2009 10:57
Owned TM-games: TMUF, TMNF
Location: Australia
Contact:

Re: TMServerSwitch v1.2 for FAST3.2.2

Post by Mort » 29 Jun 2009 13:02

A stand-alone script would be my preferred option, that way you could have it running in different places or placing the file in different locations. The idea of the Master server was more to have a different option for people that couldn't(or didn't want to) setup scripts to run seperately from TM/Fast.

A stand-alone script would also have the advantage of not visibly impacting servers during "timeout" periods as only the script itself would be delayed.

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: TMServerSwitch v1.2 for FAST3.2.2

Post by Slig » 29 Jun 2009 18:54

Mort wrote:A stand-alone script would be my preferred option, that way you could have it running in different places or placing the file in different locations. The idea of the Master server was more to have a different option for people that couldn't(or didn't want to) setup scripts to run seperately from TM/Fast.

A stand-alone script would also have the advantage of not visibly impacting servers during "timeout" periods as only the script itself would be delayed.
Yes, and a standalone script would also have advantage that the same one could retrieve info of all servers and show it on all, while actually each server script retrieve infos from all servers (of the swith config).

Btw the real sad thing is that php does not support threads (there are workaround on linux version but not on windows one)

Dam
highway camper
highway camper
Posts: 1
Joined: 02 Jul 2009 13:09
Owned TM-games: TMO ; TMN ; TMF

Re: TMServerSwitch v1.2 for FAST3.2.2

Post by Dam » 02 Jul 2009 13:19

Hello :D !

I was wondering if the same plugin works with the server login (with tmtp:// ...) instead of IP adress because as far i'm concerned, servers' IP are differents each time servers are running and as servers are on differents computers, it doesn't become easy :(

I hope you understand what I mean.

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: TMServerSwitch v1.2 for FAST3.2.2

Post by Slig » 02 Jul 2009 22:54

Dam wrote:I was wondering if the same plugin works with the server login (with tmtp:// ...) instead of IP adress because as far i'm concerned, servers' IP are differents each time servers are running and as servers are on differents computers, it doesn't become easy :(
you lean in the config ? no it's not possible : the script have to contact the other server xmlrpc port, and there is not way to get its ip from the login.

Mort
smooth traffic navigator
smooth traffic navigator
Posts: 275
Joined: 16 Jan 2009 10:57
Owned TM-games: TMUF, TMNF
Location: Australia
Contact:

Re: TMServerSwitch v1.2 for FAST3.2.2

Post by Mort » 03 Jul 2009 09:51

You could always try using a dynamic DNS service and then use the FQDN host name instead of IP?

Mort
smooth traffic navigator
smooth traffic navigator
Posts: 275
Joined: 16 Jan 2009 10:57
Owned TM-games: TMUF, TMNF
Location: Australia
Contact:

Re: TMServerSwitch v1.2 for FAST3.2.2

Post by Mort » 23 Jul 2009 15:20

While it does more or less work as advertised, I'm removing this mod from my servers due to the issue where the manialinks get "frozen" on the screen if the server scan happens against a server that is mid-load. It happens far too often on my 7 servers and at least every second game you spend with 30 seconds of frozen manialinks stuck in the podium position.

If you get a chance to investigate some of the options discussed earlier I'll certainly give it another go. I'd love to use it if the freeze problem could be resolved.

Post Reply