Lobby Server - Improvement

Discuss the future of Warzone 2100 with us.
User avatar
Fastdeath
Trained
Trained
Posts: 115
Joined: 16 Jan 2010, 08:52

Lobby Server - Improvement

Post 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
Nightly builds available here see buildbot for more infos about them
Lobby Server: here and here
SharpFlame the new WZ Map Editor
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: Lobby Server - Improvement

Post 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.
User avatar
Fastdeath
Trained
Trained
Posts: 115
Joined: 16 Jan 2010, 08:52

Re: Lobby Server - Improvement

Post 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.
Nightly builds available here see buildbot for more infos about them
Lobby Server: here and here
SharpFlame the new WZ Map Editor
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: Lobby Server - Improvement

Post 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.
User avatar
Fastdeath
Trained
Trained
Posts: 115
Joined: 16 Jan 2010, 08:52

Re: Lobby Server - Improvement

Post 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.
Nightly builds available here see buildbot for more infos about them
Lobby Server: here and here
SharpFlame the new WZ Map Editor
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Re: Lobby Server - Improvement

Post 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.
We all have the same heaven, but not the same horizon.
Dalton
Trained
Trained
Posts: 361
Joined: 11 Jan 2010, 19:41
Location: Canada
Contact:

Re: Lobby Server - Improvement

Post 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.
crux
Trained
Trained
Posts: 139
Joined: 16 Jan 2010, 03:21

Re: Lobby Server - Improvement

Post 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.
Dalton
Trained
Trained
Posts: 361
Joined: 11 Jan 2010, 19:41
Location: Canada
Contact:

Re: Lobby Server - Improvement

Post 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 :)
User avatar
Fastdeath
Trained
Trained
Posts: 115
Joined: 16 Jan 2010, 08:52

Re: Lobby Server - Improvement

Post 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
Nightly builds available here see buildbot for more infos about them
Lobby Server: here and here
SharpFlame the new WZ Map Editor
Dylan Hsu
Banned
Banned
Posts: 183
Joined: 06 Jul 2009, 00:02

Re: Lobby Server - Improvement

Post by Dylan Hsu »

I support Fastdeath and this motion.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Lobby Server - Improvement

Post 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.
User avatar
DrBlastBeat
New user
Posts: 4
Joined: 18 May 2010, 22:14

Re: Lobby Server - Improvement

Post by DrBlastBeat »

I support this stats idea! This would be great!!
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: Lobby Server - Improvement

Post 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
User avatar
Fastdeath
Trained
Trained
Posts: 115
Joined: 16 Jan 2010, 08:52

Re: Lobby Server - Improvement

Post 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.
Nightly builds available here see buildbot for more infos about them
Lobby Server: here and here
SharpFlame the new WZ Map Editor
Post Reply