Lobby server evolutions
Moderator: Moderators
Re: Lobby server evolutions
Are we still waiting for a new lobby server ?
I did this tiny TASServer patch to add unique account IDs. It has been tested and it's totally backward compatible with lobby clients which don't handle it.
It was very fast to do so even if it's not used I won't have lost much time. At least I will have tried...
(LOGIN and ADDUSER commands updated in ProtocolDescription.xml)
I did this tiny TASServer patch to add unique account IDs. It has been tested and it's totally backward compatible with lobby clients which don't handle it.
It was very fast to do so even if it's not used I won't have lost much time. At least I will have tried...
(LOGIN and ADDUSER commands updated in ProtocolDescription.xml)
- Attachments
-
- TASServer_accountIDs.patch.txt
- TASServer patch for unique account IDs
- (12.26 KiB) Downloaded 128 times
Re: Lobby server evolutions
I would like ability to change max player count and mod without rehosting.
Re: Lobby server evolutions
that wouldn't be backwards-compatible, licho...
Re: Lobby server evolutions
So let's do it when we're rolling out a new spring version and everyone needs to update things anyway. It's an important featureaegis wrote:that wouldn't be backwards-compatible, licho...
TASServer moved to GIT
TASServer moved to GIT
New repository:
http://github.com/spring/TASServer
commit rights: spring devs + BrainDamage
edit: thanks to BrainDamage for importing the full history from SVN
New repository:
http://github.com/spring/TASServer
commit rights: spring devs + BrainDamage
edit: thanks to BrainDamage for importing the full history from SVN
Re: Lobby server evolutions
Thanks to Lurker for applying the account ID patch on the server.
Well, if TASServer patches are finally accepted, I guess I will write the patch for the first item of my original post (still totally backward compatible with older clients of course...):
Well, if TASServer patches are finally accepted, I guess I will write the patch for the first item of my original post (still totally backward compatible with older clients of course...):
so we can get rid of these auto-kick floods...bibim wrote:- let the battle founder decide if someone can join his battle or not, instead of having to auto-kick
Re: Lobby server evolutions
Did some massive rearangement, and added Maven 2 Project files for TASServer and ChanServ.
Maven is a build management thing. It is ... i would say higer level thing then Ant. It is standard based, so you do not have to define your sources dir anywhere if you use the standard location, for example.
The whole Maven config is a single file, pom.xml, which is quite small even. Dependencies are auto downloaded.
Usage
Make sure you have Maven installed, then choose one of the following:
Console
Check if Maven is available:
cd to the root of the TASServer repository, then:
The first time you do this, it will take some time, as Maven will download all the dependencies it needs for compiling. packaging, and the dependencies of TASServer. Then it will compile and pack TASServer into a jar file under the target/ subdir.
You can now run it with:
or double click on the jar and if the OS asks how to open it, choose java.
Netbeans
Make sure you have the Maven plugin installed, then you can simply open the TASServer repository root as a project. That's it!
Eclipse
i did not try it myself, but Eclipse has Maven support too, so it should be as easy as it is with Netbeans.
Maven is a build management thing. It is ... i would say higer level thing then Ant. It is standard based, so you do not have to define your sources dir anywhere if you use the standard location, for example.
The whole Maven config is a single file, pom.xml, which is quite small even. Dependencies are auto downloaded.
Usage
Make sure you have Maven installed, then choose one of the following:
Console
Check if Maven is available:
Code: Select all
mvn --version
Code: Select all
mvn package
You can now run it with:
Code: Select all
java -jar target/tasserver<version>.jar
Netbeans
Make sure you have the Maven plugin installed, then you can simply open the TASServer repository root as a project. That's it!
Eclipse
i did not try it myself, but Eclipse has Maven support too, so it should be as easy as it is with Netbeans.
Re: Lobby server evolutions
Ok so I did this second patch (even smaller than the first one) for the version of TASServer which is currently running.
This allows hosts to decide whether a player can join the battle or not, instead of having to auto-kick him each time he joins the battle.
It has been tested and it's totally backward compatible with lobby clients which don't handle it.
(LOGIN command updated for new compatibility flag, and JOINBATTLEREQUEST/JOINBATTLEACCEPT/JOINBATTLEDENY commands added in ProtocolDescription.xml)
This allows hosts to decide whether a player can join the battle or not, instead of having to auto-kick him each time he joins the battle.
It has been tested and it's totally backward compatible with lobby clients which don't handle it.
(LOGIN command updated for new compatibility flag, and JOINBATTLEREQUEST/JOINBATTLEACCEPT/JOINBATTLEDENY commands added in ProtocolDescription.xml)
- Attachments
-
- TASServer_battleAuth.patch.txt
- (10.07 KiB) Downloaded 111 times
Re: Lobby server evolutions
Performance enhancement hints:
thanks to Tobi and bibm for the tips
@bibim
could you please make this patch available in a git branch?
does not have to be on current master head.
- Perf. loss possibly kicks in when garbage collecting (possibly because of too many temporary objects). This is only a wild guess.
- move Accounts from a flat file storage to a database (MySQL preferably)
Code: Select all
Active accounts in the last 1 day: 1101
Active accounts in the last 2 days: 1505
Active accounts in the last 3 days: 1792
Active accounts in the last 4 days: 2037
Active accounts in the last 5 days: 2251
Active accounts in the last 6 days: 2512
Active accounts in the last 1 week: 2795
Active accounts in the last 1 month: 6911
Active accounts in the last 2 months: 11442
Active accounts in the last 3 months: 16018
Active accounts in the last 6 months: 29522
Active accounts in the last year: 63143
Total number of accounts: 124789
Number of unique IP addresses: 99432
@bibim
could you please make this patch available in a git branch?
does not have to be on current master head.
Re: Lobby server evolutions
if migrating to sql, it'd make sense to use the same database format as uberserver, so switching between the two servers is seamless.
Re: Lobby server evolutions
i agree. could you point me to something where i could see this format please?
Re: Lobby server evolutions
I think that the patch about battles is too much crappy
Would be better instead adding a ban list on server side
Sending a command for each player that tries to join and the send back a response and then send it to who is joining will be laggy also
Would be better instead adding a ban list on server side
Sending a command for each player that tries to join and the send back a response and then send it to who is joining will be laggy also
Re: Lobby server evolutions
half-second lag to join a battle is negligible...
note: for simplicity, you'd only really need to copy the user table, since you're only implementing accounts.txt
gimme a bit, I'll write it up.houjui wrote:i agree. could you point me to something where i could see this format please
note: for simplicity, you'd only really need to copy the user table, since you're only implementing accounts.txt
Re: Lobby server evolutions
At least in italy there's a lot of times 500 ms lag to a tcp server, 500 ms to send joinbattle command.
500 ms to receive JOINBATTLEREQUEST, 500 ms to send response , 500 ms to send joinedbattle to client trying to join = 2 sec
I think that a lot of other countries may have also NATed wifi connection which has more than 700 ms lag
At least it should have timeout , no response to joinbattlerequest in 200 ms = allow.
Since we are also modifying database , and uberserver database (if i'm not wrong) has battle bans for each user, it's better just implementing totally backward compatible banlist without the need of flags on connection
500 ms to receive JOINBATTLEREQUEST, 500 ms to send response , 500 ms to send joinedbattle to client trying to join = 2 sec
I think that a lot of other countries may have also NATed wifi connection which has more than 700 ms lag
At least it should have timeout , no response to joinbattlerequest in 200 ms = allow.
Since we are also modifying database , and uberserver database (if i'm not wrong) has battle bans for each user, it's better just implementing totally backward compatible banlist without the need of flags on connection
Re: Lobby server evolutions
just remembered tasserver stores a single "account access" bitfield for ingame time, bot status, moderator status, etc... while uberserver just separates them.
also, would it make sense to use the new integer at the end of the accounts.txt list as the row id instead of adding a new column for it?
also, would it make sense to use the new integer at the end of the accounts.txt list as the row id instead of adding a new column for it?
Re: Lobby server evolutions
it stores bitfield in ascii format , that is the funny thing
it has disadvantages of both separated fields and bitfields: Human Unreadable(bitfields) , takes more space(separated fields)
it has disadvantages of both separated fields and bitfields: Human Unreadable(bitfields) , takes more space(separated fields)
Re: Lobby server evolutions
Code: Select all
Table: 'users'
Column: 'id', Integer (primary key)
Column: 'name', String(40) # lowercase, was used as a quick hack...
Column: 'casename', String(40) # uppercase
Column: 'password', String(32) # md5 + base64, applied by the lobby
Column: 'register_date', Integer # unix timestamp
Column: 'last_login', Integer # unix timestamp
Column: 'last_ip', String(15) # no ipv6 support atm, maybe needs to store as an integer or hash? ipv6 can have several different representations of the same ip
Column: 'last_id', String(128) # pretty much anything allowed under 128 chars
Column: 'ingame_time', Integer # unix timestamp
Column: 'access', String(32) # admin, mod, user
Column: 'bot', Integer # true/false, should probably be tinyint/smallint or boolean
Column: 'hook_chars', String(4) # tasserver doesn't use this
Column: 'mapgrades', Text # ehh I don't think these are necessary... imho server-based map grades should be totally deprecated.
Re: Lobby server evolutions
The booleans are prefectly readable, only ingame time isn't.
Re: Lobby server evolutions
Personnaly I prefer the ask-to-founder method, for all the reasons explained in the first page of this thread. Sure a server-side ban would be nice too, but that would require much more changes in TASServer...tizbac wrote:Would be better instead adding a ban list on server side
I don't think so. Except if by laggy you mean an extra delay of 100ms in most cases, which is barely noticeable for the join battle procedure in my opinion (especially when the lobby clients take more time to open the battle window itself, load the map, modoptions etc.).tizbac wrote:Sending a command for each player that tries to join and the send back a response and then send it to who is joining will be laggy also
Can you define what you mean by "500 ms lag to a tcp server" ? From your calculations it seems you are saying that you have TCP delay of 500ms for sending a packet, and another 500ms for receiving a packet, so a ping of 1s ?tizbac wrote:At least in italy there's a lot of times 500 ms lag to a tcp server, 500 ms to send joinbattle command.
500 ms to receive JOINBATTLEREQUEST, 500 ms to send response , 500 ms to send joinedbattle to client trying to join = 2 sec
It doesnt seem so at all from my measurements. Here is a TCP ping result from a personal french ADSL connection to your autohost in Italy (so your ping to a standard european tcp server such as Spring lobby server should actually be lower):
Code: Select all
--- 79.19.24.210 hping statistic ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 161.3/178.8/224.2 ms
Anyway, it doesnt matter how slow is the client connection. What matters is the host server connection latency. Indeed, the only extra packets added by the ask-to-founder method are the 2 packets transmitted between the lobby server and the host. The 2 other packets transmitted between the client and the lobby server are already used currently. Actually, the slower the client connection speed is, the less noticeable will be the extra delay added by the ask-to-founder method. And if you're hosting with a ping of 1 second, the 1 second delay added by the ask-to-founder method for joining your battle will be the least of your concerns imo...
Let's take someone hosting with an RTC connection from Australia as example.
His ping to Spring lobby server should be about: 200ms (RTC) + 350ms (Australia <-> Europe) = 550ms, so an extra 550ms for joining his battle. Do you really think this worst case scenario is laggy ?
Once again what do you mean by "700 ms lag" exactly ? The time to just send a packet ? I don't think a lot of players are hosting with a ping of 1.4s...tizbac wrote:I think that a lot of other countries may have also NATed wifi connection which has more than 700 ms lag
So you mean you wouldn't be able to use this feature with your "500 ms lag" to send a command ?tizbac wrote:At least it should have timeout , no response to joinbattlerequest in 200 ms = allow.
Re: Lobby server evolutions
tizbac, anyway if lurker is kind enough to apply the patch on a test instance of tasserver as he did for the previous patch, we will be able to check the actual latency on real server for joining battles. And if it's unacceptable as you think, this patch will obviously not be applied...
Actually I don't plan to make other patches for TASServer, so I think it's easier to just provide the patch for current master head (rev 7e577c7):hoijui wrote:@bibim
could you please make this patch available in a git branch?
does not have to be on current master head.
- Attachments
-
- TASServer_git_7e577c7_battleAuth.patch.txt
- (10.64 KiB) Downloaded 14 times