( search forums )
Lobby server [experimental] and ideas
Soldat Forums - Soldat Talk - Developers Corner
rusty
April 1, 2005, 8:07 pm
Hey guys - me again!

I've always been interested in how the lobby server works, so a few days ago I started playing around trying to work out the protocol and have finally come up with something that appears pretty stable and can talk to the Soldat client. It doesn't implement 100% of the protocol and some of the filtering options don't work perfectly, but it generally seems to work well. You can grab the files and code here (you'll need a recent version of Java to run):

[URL]

To run, use the start.bat file provided or from the same directory type:

java lobbyserver.LobbyServer


You will need UDP port 13073 open to run the server.
To use the server with Soldat, you will need to edit your lobby_servers.txt file.
Type 'help' to see a list of commands once you've got it running

What I think is especially useful is the feature to 'mirror' another lobby server - so you can run your own lobby server and instantly get all the servers from another. This brought up two ideas:

1) My own lobby server viewer? Then I considered that Michal has done an excellent job with the one built in to Soldat and ASE is also excellent even if it isn't free, so there might not be much point. This would also be a lot of work and something I wouldn't be prepared to get stuck into right now - maybe someone else could use my findings and code as a base for a fan made one? Any comments?

2) To ease the load on the main lobby (or two lobbies now) - what about a distributed network of synchronized lobby servers to share the traffic? There could be one master server that receives the client's request to get a list of servers and then diverts it to the server that currently has the least traffic. Anyone would be able to run their own lobby server which, when started, registers itself with the master server. On the plus side this would greatly improve reliability (unless the master server went down), scalability and probably speed, but on the down side people's Soldat servers would have to talk to all lobby servers instead of just one for updates (although these occur every 10 seconds and are only 23 bytes). Of course this would be a huge project and again might not be worth the work.

Anyway, I just though I would share these interesting findings and my ideas. Looking forward to hearing replies :)

FliesLikeABrick
April 1, 2005, 8:48 pm
1) i could code that in php if you took the time to explain where and how the data is stored... maybe you could have your app output all the information to a text file every X amount of time, then i could write a php script to display it on a website (much like is done now)

2) if MM or whoever set lobby.soldat.pl as a round robin DNS, then put in the addresses of all known, stable, reliable lobby mirrors, that would do this all at once

chrisgbk
April 1, 2005, 11:23 pm
Or how about this in regards to option 2:

Each server stores the known addresses of it's peer servers, and updates the servers.txt file on the client when a client connects to and requests the server list, so that if the "master" server went down, any client that had connected to any server would most likely be able to find another online lobby server, and update from it's list of lobby servers. Basically a simplified version of the setup of the G2 file sharing network.

FliesLikeABrick
April 2, 2005, 12:54 am
crhisgbk, i think it should be stored centrally so that only reliable servers are in the list. the problem with your idea is that it could allow for potentially...far too many servers, maybe as many as half of which will only be up for a short period of time. something could easily be done to automatically remove servers which fail to respond X number of times though, so really either way works. btw, good explanation of big ) and binary efficiency

Deleted User
April 2, 2005, 2:00 am
lol I did this in VB afew months back, I dropped the project due to the fact that the packets sent to the soldat client were encrypted and I couldnt be screwed to figure out the algorith >_>

Nice Work

rusty
April 2, 2005, 9:37 am
quote:Originally posted by EnEsCelol I did this in VB afew months back, I dropped the project due to the fact that the packets sent to the soldat client were encrypted and I couldnt be screwed to figure out the algorith >_>

Nice Work


Thanks. It's actually just compressed with ZLib, to save on bandwidth I guess. Of course this means it's quite inefficient to compress all the servers every time there is a request for the list, I made a cache built into a hash table (to keep bigO as 1) with a separate cache line for each different set of filter options, with a timestamp that expires every 10 seconds. I think this gives a good trade-off and keeps it speedy.

Michal Marcinkowski
April 3, 2005, 11:18 am
Good job. This does not have to be used globally. Think about LAN games. Some LANs are screwed and Soldat doesn't seek the games properly, so setting up a LAN Lobby is a great idea (I think somebody requested this a while ago).

Deleted User
April 3, 2005, 11:32 am
lol I typed mirror lobby.soldat.pl 5 mins later my net disconnected, and my ISP rang me up 2 hours later saying that I was getting DDoS'd XD

Should have a warning about mirroring servers - Heavy Network Traffic ;)

rusty
April 3, 2005, 11:34 am
quote:Originally posted by EnEsCelol I typed mirror lobby.soldat.pl 5 mins later my net disconnected, and my ISP rang me up 2 hours later saying that I was getting DDoS'd XD

Should have a warning about mirroring servers - Heavy Network Traffic ;)


Huh? It's pretty much the same as just requesting the servers in Soldat - shouldn't be that much traffic.

ISPs phone you up?

Deleted User
April 3, 2005, 11:38 am
Yes, you think receiving random packets from 233+ different locations seems like normal activity for somone who only has 512/128?

"It's pretty much the same as just requesting the servers in Soldat - shouldn't be that much traffic."
Not really considering the traffic doesnt stop coming whereas when u request it isnt every couple of seconds

rusty
April 3, 2005, 1:39 pm
quote:Originally posted by EnEsCeYes, you think receiving random packets from 233+ different locations seems like normal activity for somone who only has 512/128?

"It's pretty much the same as just requesting the servers in Soldat - shouldn't be that much traffic."
Not really considering the traffic doesnt stop coming whereas when u request it isnt every couple of seconds


1) It's every 10 seconds, which can be altered.
2) I thought the average person would be smart enough to appreciate the traffic a lobby server would generate. Do I need to put up a special warning just for you?

Deleted User
April 3, 2005, 2:52 pm
Yes, yes you do.

Anywayz, so is the packets sent to the client encrypted in Zlib?

rusty
April 3, 2005, 7:02 pm
quote:Originally posted by EnEsCeYes, yes you do.

Anywayz, so is the packets sent to the client encrypted in Zlib?


Not encrypted as such, just compressed. As far as I can tell, the only packets compressed are the ones with the details of the servers in the lobby, sent from lobby -> Soldat client.

pongo
April 6, 2005, 7:20 pm
how i can get map name from .sdm file?

decryptor1360
April 24, 2005, 6:31 pm
hi all,
i'd like to know where i could get this lzip thingy for c or at least the algorithm :-) . I'd like to play around with it and (perhaps) write a lil tool to view online soldat servers. its getting on my nervs to ask for my friend's ip, opening up soldat only to see wheather he's online or check the lobby server's site just to make sure that his server is up and running. it would be nice to have a prog. running in the background showing me the status of my friends server.

DEcryPtor1360

Deleted User
April 25, 2005, 4:35 am
^
u can just use a IP+Port checker

you can download ZLib here -> (Click here)

decryptor1360
April 25, 2005, 3:04 pm
i just want a routine to use within my c progs and no ip+port checker. anyway, what would such a prog help? i did not have the intention of parsing the lobby servers site and have my prog check every server (its not good programing practice :+} ). thx for the tip. i hope the zlib stuff works ...
ps: google is the best search engine ever, isn't it?

DEcryPtor1360