PDA

View Full Version : Query mechanism improvement


Nicow
28/01/2015, 03:29 PM
Hey all !
What about the query mechanism ?
The opcodes c & d are throttled to 100 and that's a bit awkward for the servers with 100+ players.

You should let server owners decide whether or not modify that value (10 to 500 for example) in the server.cfg (but it would be their own responsibility if they set a high value and get "query-attacked" or anything else)

Mellnik
28/01/2015, 04:42 PM
Yeah in JC-MP the player query even worked for 2000 concurrent players. There must be a way to do this and keep the possible amplification at a minimum.

Hip-hop
28/01/2015, 06:59 PM
+1 !!

skylive77
28/01/2015, 10:02 PM
+1 !

Leitoo
28/01/2015, 10:06 PM
+1 !!!

{Robin}
28/01/2015, 10:56 PM
+1 !!

SchurmanCQC
28/01/2015, 11:50 PM
Although it's not a pressing issue, I do support the idea of allowing servers with 100+ players to send their playerlists to the client.

In short: +1 !!!1!

Abagail
29/01/2015, 12:06 AM
Yeah in JC-MP the player query even worked for 2000 concurrent players. There must be a way to do this and keep the possible amplification at a minimum.

JustCause isn't the same thing as Grand Theft Auto. They probably even use different methods to handle player query / data.

Vince
29/01/2015, 12:10 AM
I hardly see a useful purpose to that. Honestly, who's going to sift through a list of hundreds of players? And to find what? If you, for whatever reason, need to list the players on your server, store that list somewhere (like in a database) and query it there. Problem solved.

Also what's up with the completely unnecessary "+1" posts? Postboosting, much?

Mauzen
29/01/2015, 12:29 AM
I dont really see why anyone would need that. Browsing through 500 players in the list to find a friend or something would take much longer than joining the server and asking if your friend is around in the chat.

However, I cant understand how the 100-player limit should prevent server overload. Actually its just 5 times that much data for a 500 player server. The data for 500 player names (500 * 24 bytes) + 500 scores (500 * 8 bytes) would result in a ~17kb big network package, compared to ~3.4kb for 100 players. Sure this would be quite a big difference for small servers, but 500 slot servers already cause several megabytes of upstream per second. The 14 extra kb for player data would barely make up a single percent, even if queried several times per second.
And the servers query-spam protection already works well enough to cause no trouble. People cant abuse it to lag the server by spamming 100-player requests, so they also wont be able to lag it with 500-player requests.

So imo, if people really think they need to list all 500 players, why not give them the option to do so? After all they can still reduce it again afterwards if their server/connection isnt strong enough for that.
Alternatively you could add an additional querycode to get all players, that gets sent if the player really scrolls down in the player list.

Patrik356b
29/01/2015, 06:54 AM
I'd rather see the limit raised to 150 or such. it's not really an issue for me, but i do occasionally check some server scoreboards with ~120 people online

BRICS
29/01/2015, 09:20 AM
+1
I want to suggest to create new opcodes for every hundred player's id.
For example:
Opcode: '0' -> get players from 0 to 99.
Opcode: '1' -> get players from 100 to 199
Opcode: '2' -> get players from 200 to 299
Opcode: '3' -> get players from 300 to 399
Opcode: '4' -> get players from 400 to 499
Opcode: '5' -> get players from 500 to 599
Opcode: '6' -> get players from 600 to 699
Opcode: '7' -> get players from 700 to 799
Opcode: '8' -> get players from 800 to 899
Opcode: '9' -> get players from 900 to 999

Nicow
29/01/2015, 03:01 PM
Wtf please.
Most of you didnt read : I'm purposing a server.cfg value...
If you dont want more than 100 then dont change that value.. If you want more or less change it !

BRICS
29/01/2015, 05:28 PM
It's not impossible to get server's players when they more than 100.
http://wiki.sa-mp.com/wiki/Query

I want to suggest to create new opcodes for getting every hundred players.
For example:
Opcode: '0' -> get players from 0 to 99.
Opcode: '1' -> get players from 100 to 199
Opcode: '2' -> get players from 200 to 299
Opcode: '3' -> get players from 300 to 399
Opcode: '4' -> get players from 400 to 499
Opcode: '5' -> get players from 500 to 599
Opcode: '6' -> get players from 600 to 699
Opcode: '7' -> get players from 700 to 799
Opcode: '8' -> get players from 800 to 899
Opcode: '9' -> get players from 900 to 999

Or use another characters for opcodes.

BRICS
29/01/2015, 05:31 PM
Wtf please.
Most of you didnt read : I'm purposing a server.cfg value...
If you dont want more than 100 then dont change that value.. If you want more or less change it !
Sorry man, I missed it

Mellnik
29/01/2015, 08:47 PM
JustCause isn't the same thing as Grand Theft Auto.

Doesn't matter, they also use RakNet.

They probably even use different methods to handle player query / data.

This is pointless.