[XAseco] switchServer v0.3 beta

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

[XAseco] switchServer v0.3 beta

Post by schmidi » 24 Nov 2009 21:51

Time for some updates.

Didnt find enough time to bring ZS2 to an end but wanted to make use of some of the new features. => switchServer was born.
One of the main goal is to keep the HUD clean. Its possible to show/hide the list, of course this is also done automatically by passing CP or finish.
Further i introduced a templatesystem to give admins the ability to change the layout as simple as possible (hopefully).
Plugins for other controller (Aseco, FAST, ...) will follow.


Default Layout
minimized:
Image
maximized:
Image


Connecting Servers
There are 4 different ways to connect servers.
  Sockets
  Servers are connected by private nonblocking UDP-sockets.
  (Xmlrpc-port-number is just to make config as simple as possible)
  PublicSockets
  Servers are connected by TCP-sockets.
  Main routine to connect servers on two different machines. Make sure your setup is secured but ports are reachable.
  Files
  Data is stored in a file.
  Shared Memory
  Similar to sockets but available only on linux.


Config
Options are configurable in switchServer.xml.
  Servers
   To make the server visible to others, enable/config your prefered method(s).
   PublicSocket:
    ip: local ip you want to use (empty for all local ips)
    port: tcp-port you want to use (i recommend to use ports above 10000)
    password: you MUST specify one.

  Fetchers
   Add servers you want to show in list. You may add as many methods in any order you prefer.
   PublicSocket:
    ip: remote ip
    port: remote port
    password: remote password


>> switchServer v0.3 beta <<

Templates are located in plugins/switchServer.
Detailed docu for templates will follow.

Plugins for other controller (Aseco, FAST, ...) are WIP.
Last edited by schmidi on 02 Mar 2010 15:32, edited 15 times in total.

Jojo_44
road tourist
road tourist
Posts: 87
Joined: 13 Jan 2009 16:57
Owned TM-games: Tmnf, Tmuf

Re: switchServer v0.1 beta

Post by Jojo_44 » 25 Nov 2009 16:28

Hi schmidi,

is this the follower of "the ZeroSwitch 1" ? I thought, you are developing the "Zero Switch 2" with bueddl. I will stay at the ZS because the method to get the ServerData with xmlrpc is very laggy. My Server laggs strongly.

best regards, Jojo

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

Re: switchServer v0.1 beta

Post by schmidi » 25 Nov 2009 17:27

Jojo_44 wrote:Hi schmidi,

is this the follower of "the ZeroSwitch 1" ? I thought, you are developing the "Zero Switch 2" with bueddl. I will stay at the ZS because the method to get the ServerData with xmlrpc is very laggy. My Server laggs strongly.
I already had written most of this code when Bueddl decided to stop developing ZS. Didnt find enough time to bring ZS2 to an end but wanted to make use of some new features. => switchServer was born.
I am running this plugin for several weeks now, didnt find time to put a release togehter.

But most important this plugin is not using xmlrpc at all. Its using private nonblocking-UDP-sockets. Xmlrpc-port-number is just to make config as simple as possible. It may be confusing without further documentation...
Btw an option for using shared-memory is on the way...

User avatar
Jackel
speedy pilot
speedy pilot
Posts: 316
Joined: 06 Oct 2006 09:57
Owned TM-games: TMN,TMU,&TMS
Location: Florida, USA
Contact:

Re: switchServer v0.1 beta

Post by Jackel » 26 Nov 2009 03:13

ok, installed this on both my 80k and 70k server which are on the same machine, set there xmlrpc ports in the switchserver.xml file and made sure that both servers are set too true on allow xmlrpc ports in the server configs and neither server is showing the other. Xaseco is 1.10,PHP is 5.2.6 on Win Server 03. and no errors are showing. and there is no active firewall turned on with this server.
Am I missing something????

Update: made a couple changes too main server and I also my servers were not on same versions of Xaseco. my 80k server is on 1.10 and my 70k server was 1.08. I updated Xaseco on my 70k server and turned off Windows ICS Service and it started working as designed. now if there was a way too connect too our third server that is beiong hosted elsewhere.
Last edited by Jackel on 26 Nov 2009 06:35, edited 1 time in total.
Founder and Admin of Cobra Gaming Systems.

Image
Image
Image

Olymptor
sunday driver
sunday driver
Posts: 59
Joined: 16 May 2009 00:15
Owned TM-games: TMUF, TMO, TMS

Re: switchServer v0.1 beta

Post by Olymptor » 26 Nov 2009 05:02

I added my xml ports, so it works.
But how add a server which is not on same PC or worse same network ? A server which is on a PC's friend.
This option will be later ?

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

Re: switchServer v0.1 beta

Post by schmidi » 26 Nov 2009 10:24

Jackel wrote:made sure that both servers are set too true on allow xmlrpc ports in the server configs
As i mentioned earlier its not using the xmlrpc-port of the server. Pls disable xmlrpc_allowremote for security reasons.
Instances are connected by private nonblocking UPD-sockets (xmlrpc uses TCP). Its just the same port-number....

Olymptor wrote:But how add a server which is not on same PC or worse same network ? A server which is on a PC's friend.
This option will be later?
This is work in progress...

User avatar
Jackel
speedy pilot
speedy pilot
Posts: 316
Joined: 06 Oct 2006 09:57
Owned TM-games: TMN,TMU,&TMS
Location: Florida, USA
Contact:

Re: switchServer v0.1 beta

Post by Jackel » 26 Nov 2009 15:23

As i mentioned earlier its not using the xmlrpc-port of the server. Pls disable xmlrpc_allowremote for security reasons.
Instances are connected by private nonblocking UPD-sockets (xmlrpc uses TCP). Its just the same port-number....
was just eliminating one possible issue at a time trying too get both my servers too find the other. I understand it's using udp ports. but with the limited documentation available I just had too eliminate one thing at a time til it started working. :thumbsup:
Founder and Admin of Cobra Gaming Systems.

Image
Image
Image

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

Re: switchServer v0.1 beta

Post by schmidi » 01 Dec 2009 17:54

new connection-methods added
other little improvements

switchServer v0.2 beta

User avatar
Jackel
speedy pilot
speedy pilot
Posts: 316
Joined: 06 Oct 2006 09:57
Owned TM-games: TMN,TMU,&TMS
Location: Florida, USA
Contact:

Re: [XAseco] switchServer v0.2 beta

Post by Jackel » 15 Dec 2009 01:34

can we get a quick explanation on how the new connection methods work please. just a tad bit lost on how to configure them.
personally I'm looking at useing the file version seeing I'm trying too link three servers together (two on same machine, the third are on another machine but located in another state) can this script do that?
Founder and Admin of Cobra Gaming Systems.

Image
Image
Image

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: [XAseco] switchServer v0.2 beta

Post by nocturne » 15 Dec 2009 02:25

Nice work, schmidi. Really went creative with the different connection options.

Personally, I never had a problem with xmlrpc lag, though, at least with up to 5 servers (two on one box, 3 on a remote box). It seems like it's still a viable option for those looking to link servers from different networks together.

I made a bit of a server switch plugin for our community for Aseco, which of course is admitted inspired by zero switch. I tested MySQL, file based, and xmlrpc (not quite able to manage sharedmem and unblocked udp, hehe). After settling on xmlrpc (only rational way I found to link server chat without creating a behemoth of a multi-server chatstream script), 200 lines later I was done. It's been working great so far, perhaps because it doesn't do any useless loops... Just sends the chat queries, connect events, and checks the other servers once a minute (certainly often enough, by my standards).

Guess what I'm saying is... more often than not, less is more.

Anyways, great work! Certainly appreciate the unimposing style. It's getting to the point I can't stand racing on Xaseco servers due to only having a 4 inch square of space available in the middle of the screen to race on after all the useless widgets have taken their toll.

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

Re: [XAseco] switchServer v0.2 beta

Post by schmidi » 15 Dec 2009 12:23

Jackel wrote:can we get a quick explanation on how the new connection methods work please. just a tad bit lost on how to configure them.
personally I'm looking at useing the file version seeing I'm trying too link three servers together (two on same machine, the third are on another machine but located in another state) can this script do that?
just make the files access-/readable to the other host. (http, ftp, smb, ...) all protocols/wrappers supported by file_get_contents are useable.
for example use "http://1.2.3.4/server1.txt" as filename.

User avatar
Jackel
speedy pilot
speedy pilot
Posts: 316
Joined: 06 Oct 2006 09:57
Owned TM-games: TMN,TMU,&TMS
Location: Florida, USA
Contact:

Re: [XAseco] switchServer v0.2 beta

Post by Jackel » 15 Dec 2009 22:35

<!-- updater-methods you want to use -->
<updaters>
<!-- false to disabled -->
<socket>false</socket>

<!-- filename or false to disable -->
<file>xxxxx</file> <---so here I would place the file name (servers.txt) or location(http://cobragaming.org/home)?

<!-- true to enable (linux only) -->
<shared_mem>false</shared_mem>
</updaters>


<!-- servers shown in list -->
<servers>
<!-- <socket>5001</socket> -->
<file>dummy.txt</file> <---then just a the name of a text file goes here?
<!-- <shared_mem>dummy</shared_mem> -->
</servers>
Founder and Admin of Cobra Gaming Systems.

Image
Image
Image

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

Re: [XAseco] switchServer v0.2 beta

Post by schmidi » 15 Dec 2009 22:51

just an example config for server1
server1: /var/www/ is readable to server 2 & 3 via http
server2: http://cobragaming.org/server2.txt
server3: http://1.2.3.4/server3.txt

Code: Select all

<!-- updater-methods you want to use -->
	<updaters>
		<!-- false to disabled -->
		<socket>false</socket>

		<!-- filename or false to disable -->
		<file>/var/www/server1.txt</file>

		<!-- true to enable (linux only) -->
		<shared_mem>false</shared_mem>
	</updaters>


	<!-- servers shown in list -->
	<servers>
		<!-- <socket>5001</socket> -->
		<file>http://cobragaming.org/server2.txt</file>
		<file>http://1.2.3.4/server3.txt</file>
		<!-- <shared_mem>dummy</shared_mem> -->
	</servers>

User avatar
Jackel
speedy pilot
speedy pilot
Posts: 316
Joined: 06 Oct 2006 09:57
Owned TM-games: TMN,TMU,&TMS
Location: Florida, USA
Contact:

Re: [XAseco] switchServer v0.2 beta

Post by Jackel » 16 Dec 2009 00:27

ok, got it now.
UPDATE:I Thought I did. :?
getting this error on the first two servers I'm setting this up on.

[PHP Warning] unpack(): Type L: not enough input, need 4, have 0 on line 24 in f
ile C:\xaseco\plugins\switchServer\FileDataFetcher.php

Code: Select all

<updaters>
		<!-- false to disabled -->
		<socket>false</socket>

		<!-- filename or false to disable -->
		<file>http://cobragaming.org/home/servers/CRSElite.txt</file>

		<!-- true to enable (linux only) -->
		<shared_mem>false</shared_mem>
	</updaters>


	<!-- servers shown in list -->
	<servers>
		<!-- <socket>5001</socket> -->
		<!-- <file>http://cobragaming.org/home/servers/CRSDen.txt</file> -->
		<file>http://cobragaming.org/home/servers/CRSPit.txt</file>
		<!-- <shared_mem>dummy</shared_mem> -->
	</servers>
I haven't set the Den up yet. and this is from my 80k server, the 70k server is the same just with the CRSpit address at the updaters. and the CRS Elite in severs shown. both servers are giving the same error.
Last edited by Jackel on 16 Dec 2009 10:14, edited 2 times in total.
Founder and Admin of Cobra Gaming Systems.

Image
Image
Image

Greco
happy cruiser
happy cruiser
Posts: 144
Joined: 13 May 2009 18:40
Owned TM-games: TMN

Re: [XAseco] switchServer v0.2 beta

Post by Greco » 16 Dec 2009 08:18

nice work

Post Reply