Latest Posts

Topic: mess on the game server

einstein13
Avatar
Topic Opener
Joined: 2013-07-28, 23:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2013-11-27, 17:16

Hi!

Probably most of you had noticed, that some of the internet games ended weeks ago, but the servers for them still exists. Why? Can it be cleaned?

Now the list has 7 servers unused by anyone. (deutschland, Sixty One, Open, Sixty Two, Sixty Tw, Sixty two and dadadadadaP)

Sometimes it can make confused, because you need to scrool down to get the opened server.

During the day (CET) you can restart the server- most of players don't play then.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
teppo

Joined: 2012-01-30, 08:42
Posts: 423
Ranking
Tribe Member
Posted at: 2013-11-28, 09:52

Good point.

In addition, it would be nice if open games were in the beginning of the list, possibly so that open games with a matching version number were first, other open games then and closed last.

Would there be downsides? Difficult to click a particular game, if the list jumps up and down?


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2013-11-28, 16:02

those are bugs in the game server you see there. Noone is working on them currently. If you are interested in tracking them down you can find the code in the wl website repository.

I restarted the metaserver to kill the zombies.


Top Quote
einstein13
Avatar
Topic Opener
Joined: 2013-07-28, 23:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2013-11-28, 16:04

Thank you, SirVer! face-smile.png


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
teppo

Joined: 2012-01-30, 08:42
Posts: 423
Ranking
Tribe Member
Posted at: 2013-11-29, 12:45

After few minutes of reading the server code, it seems that a game disappears from the list, if

  • The game is disconnected, or

  • The server disconnects and all players are gone

If the server disconnects while there are players, the game stays forever. Keep in mind that this is my impression after quick, careless reading.

Ways to fix:

  • Kick out remaining players when the server disconnects, then remove the game

  • Remove the game despite some players are still in

  • Add code to an unrelated, infrequently called hook that searches for orphaned games, and removes those.

What to do? What is the least painful way to test website changes?


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2013-11-29, 15:24

See http://bazaar.launchpad.net/~widelands-dev/widelands-website/trunk/files/head:/wlms/ , there are tests for the metaserver in wlms/test.

The whole thing is written as a python script using twisted as the motor. It is horrible to extend and no fun at all. I started writing a server in go as it is much more suited for these kinds of tasks having excellent support for coroutines. I somehow do not find time to work on it though these days.


Top Quote
teppo

Joined: 2012-01-30, 08:42
Posts: 423
Ranking
Tribe Member
Posted at: 2013-11-30, 08:07

I do not really understand, what would the drawbacks be if a games is killed, and remaining players notified whenever the server quits; playing without a server does not work. Since you probably are friend with that protocol, can you give any reasons?


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2013-12-01, 13:36

that sounds like a reasonable approach to me. The problem was only that it could be that only the connection between meta server and server of a game was severed, but other player could still connect nicely to the server. It seems like this does never happen though, so killing is maybe a good idea.


Top Quote
teppo

Joined: 2012-01-30, 08:42
Posts: 423
Ranking
Tribe Member
Posted at: 2013-12-01, 20:09

I thought that the games becomes "LAN-play like" once the game starts: traffic flows between participants, metaserver is not needed. Am I wrong? If there is a communication problem between metaserver and gameserver, and the metaserver kills the game, will the actual gameplay stop, too, as a result of those (new) disconnect messages?


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2013-12-02, 05:33

Yes, that is correct. Once a game runs (i.e. the players are no longer in the game lobby) it just becomes a regular LAN like game. I was referring to the period when players are still able to join the game, but the game has not yet started. The idea of the current implementation was (iirc) that even if the connection to the metaserver goes down, the game still stays visible so that new players can still join in.


Top Quote