Page 1 of 2

Lobby Server - Improvement

Posted: 25 Jan 2010, 06:49
by Fastdeath
Since i'm new to this forum first little bit about me:
I play Warzone 2100 since 1999, but online for only a few few weeks / months.
I'm a full time programmer and Work mainly with the "Python" programming language and network related stuff.

Now, after I had seen through the code of the masterserver, I thought I could help.
Above all, I am talking about to install a failover so that if one is down another server can do that work.

Principally i would imagine it like this:
  • 1.) Round Robin DNS for lobby.wz2100.net
    2.) All masterservers keep data in sync with each other (master - master replica)
Befor i forgott that: i have enough free server space for a second masterserver.

Thank you for your answers and suggestions,
Fastdeath aka Rene Jochum

Re: Lobby Server - Improvement

Posted: 26 Jan 2010, 00:21
by Giel
Fastdeath wrote:Now, after I had seen through the code of the masterserver, I thought I could help.
Above all, I am talking about to install a failover so that if one is down another server can do that work.
Using non-volatile storage (e.g. an on-disk file as opposed to an in-memory list) would already be an improvement. The thing is, we keep track of games' lifetimes by holding on to an open TCP socket. Unfortunately you cannot store sockets to disk.
Fastdeath wrote:Principally i would imagine it like this:
  • 1.) Round Robin DNS for lobby.wz2100.net
    2.) All masterservers keep data in sync with each other (master - master replica)
The DNS round robin part would definitely work (just checked the code for it again, and I see I wrote it to simply loop over the query results and use the first address we can succesfully connect to).

Regarding the keeping in sync of data, there still is the game lifetime to worry about. On some Unix systems you could use Unix sockets and push file descriptors through them (the kernel would actually do a cross-process dup(2) for you then). But that would get complicated really fast and only work when all lobby servers run on a single machine.
Fastdeath wrote:Before i forgot that: i have enough free server space for a second masterserver.
Crashing of the current lobby server is currently more of a problem than the machine becoming unavailable.

Re: Lobby Server - Improvement

Posted: 26 Jan 2010, 02:16
by Fastdeath
Giel wrote:Using non-volatile storage (e.g. an on-disk file as opposed to an in-memory list) would already be an improvement. The thing is, we keep track of games' lifetimes by holding on to an open TCP socket. Unfortunately you cannot store sockets to disk.
What's about connection twice, once up the game is started and once sending stats and game length?
I known thats a big change in Protocol, but if a failover is required?
Giel wrote: The DNS round robin part would definitely work (just checked the code for it again, and I see I wrote it to simply loop over the query results and use the first address we can succesfully connect to).
Thank you for that!
Giel wrote: Regarding the keeping in sync of data, there still is the game lifetime to worry about. On some Unix systems you could use Unix sockets and push file descriptors through them (the kernel would actually do a cross-process dup(2) for you then). But that would get complicated really fast and only work when all lobby servers run on a single machine.
No need to worry about that if we connect twice.
Giel wrote: Crashing of the current lobby server is currently more of a problem than the machine becoming unavailable.
I understand, anyone who is reponsible for that. Feel free to contact me about requirements and Timeline.

Re: Lobby Server - Improvement

Posted: 27 Jan 2010, 01:01
by Giel
Fastdeath wrote:
Giel wrote:Using non-volatile storage (e.g. an on-disk file as opposed to an in-memory list) would already be an improvement. The thing is, we keep track of games' lifetimes by holding on to an open TCP socket. Unfortunately you cannot store sockets to disk.
What's about connection twice, once up the game is started and once sending stats and game length?
I known thats a big change in Protocol, but if a failover is required?
Currently the lobby server doesn't at all deal with game stats. So if your goal is to implement a failover I definitely wouldn't suggest implementing some kind of stat handling storage facility.

The only goal the lobby currently serves is for players to easily find each other.

Re: Lobby Server - Improvement

Posted: 28 Jan 2010, 16:23
by Fastdeath
Giel wrote:Currently the lobby server doesn't at all deal with game stats. So if your goal is to implement a failover I definitely wouldn't suggest implementing some kind of stat handling storage facility.

The only goal the lobby currently serves is for players to easily find each other.
Sorry, for didn't telling that. I want server side stats later to, if others agree to that.
This can help us building up a community website with player stats/rankings and so on,
also users can't change stats on clientside after.

If you and others agree to that, i will develop to complete server side things required.

Re: Lobby Server - Improvement

Posted: 28 Jan 2010, 17:14
by Kamaze
Giel wrote:The thing is, we keep track of games' lifetimes by holding on to an open TCP socket. Unfortunately you cannot store sockets to disk.
I addressed this already in the old lobby protocol proposal.
> http://developer.wz2100.net/wiki/Lobby_ ... livesignal

Waiting games which haven't send a heartbeat within n-seconds will be automatically removed.

Re: Lobby Server - Improvement

Posted: 28 Jan 2010, 18:09
by Dalton
I like the idea of stats being online so players can't manipulate them but need to make it so you can carry stat from old versions to new versions.

Re: Lobby Server - Improvement

Posted: 28 Jan 2010, 23:04
by crux
Daltx wrote:I like the idea of stats being online so players can't manipulate them but need to make it so you can carry stat from old versions to new versions.
that wouldn't be the case with the current code it is all client side
and since the source code is available then it is pretty much impossible to stop a determined person from manipulating data.

Re: Lobby Server - Improvement

Posted: 29 Jan 2010, 05:57
by Dalton
Ya, I know but still think there must be way to make it a little more difficult but rank isn't to important it is more about actually playing then your true rank will show :)

Re: Lobby Server - Improvement

Posted: 04 Feb 2010, 14:11
by Fastdeath
Kamaze, Giel:

What to do, to get a stable lobbyserver? Who can i help?
Please give me a respond, any type of respond.

Thank you,
Fastdeath

Re: Lobby Server - Improvement

Posted: 26 Feb 2010, 21:45
by Dylan Hsu
I support Fastdeath and this motion.

Re: Lobby Server - Improvement

Posted: 26 Feb 2010, 22:20
by cybersphinx
Fastdeath wrote:What to do, to get a stable lobbyserver? Who can i help?
Please give me a respond, any type of respond.
The simplest solution, probably, would be to set up another lobby, plus a patch that connects to that one when the first doesn't work.

Re: Lobby Server - Improvement

Posted: 18 May 2010, 22:27
by DrBlastBeat
I support this stats idea! This would be great!!

Re: Lobby Server - Improvement

Posted: 07 Sep 2010, 14:01
by m1ndgames
Hello Fastdeath, i really would like to collaborate and team up because it seems that we are working on the same thing...

The current status: viewtopic.php?f=30&t=5534&start=30#p68672

Re: Lobby Server - Improvement

Posted: 27 Apr 2011, 20:23
by Fastdeath
1 year and 3 Months later its done :lol2:

See:
https://github.com/pcdummy/wzlobbyserver-ng
https://github.com/pcdummy/warzone2100/tree/bsonlobby

It needs Testing before this can be included into master and so in 3.0,
i hope it makes its way in.