Author Topic: Possible stat server model  (Read 4770 times)

Cobo

  • Autococker
  • Posts: 1362
Possible stat server model
« on: January 29, 2008, 07:23:22 PM »
So I've been thinking that maybe stat recording for servers could be done through the method of connectionless packets, like the yyystatus command, except it would be specialized for status recording. This way the status recording could be made a lot more flexible, from getting global stats from all the servers that are listed in the server list to recording stats for private servers and such.

Basicly, here's how the stats server would work:

I will refer to the stats server as SS and the game server as CS (client server).

First thing that would happen is that the SS will send a command to the CS that lets him know that we are going to record stats from him, the command could be something like "statsconnect" or whatever. This command will cause the CS to create a 'Message' stack and an unique ID that the CS will send back to the SS. Each 'Message' would contain the information for every event that occurs in the server. Every time an event happens (player A kills player B, player A connects, map changed) a message would be created and it would be pushed into the stack.

The SS will wait for the unique ID and from then it will send this ID along with every command so the CS knows what stack to use.

Now every minute or so, the SS would send another command to the CS, what this command will do is pop all the elements of the stack from the CS and send them to the SS, which would be parsed.

The SS would probably wait for a map change so it can start recording data, this way you can take advantage of the current pop command for getting stuff like client connects or the current map being played, therefore not having to implement other commands that fetch the players or current map.

All that the SS has to do now is pop all the messages from the stack every now and then and its set, the CS would probably need a min and max time limit so it doesnt get abused and the stack can be freed when the SS times out.

So any thoughts? Feedback? Possible changes to the model or maybe even a completely different model? Please post it. I realize that my model isnt perfect, that why I didnt make a feature vote thread, so please post your thoughts.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Possible stat server model
« Reply #1 on: January 29, 2008, 07:34:10 PM »
You could have explained it much much simpler in one paragraph.

But anyway, I think the game server should aggregate the data and then send it in a chunk at the end of a map. It would cut down on bandwidth and offload CPU usage from the stats tracking server.

Cobo

  • Autococker
  • Posts: 1362
Re: Possible stat server model
« Reply #2 on: January 29, 2008, 07:39:03 PM »
I really suck at explaining things :P
Also, yeah I thought of that after I made the thread and it does sound a lot better.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Possible stat server model
« Reply #3 on: January 29, 2008, 10:19:13 PM »
Keep the private servers out of the stats.  That way you don't have some guy running around on his own server stat-whoring.

Eiii

  • Autococker
  • Posts: 4595
Re: Possible stat server model
« Reply #4 on: January 29, 2008, 11:13:55 PM »
I say not only exclude private servers, but all public servers that don't meet certain standards. More than 16 or so players max, non-strict accordance to mapinfos, servers running certain maps would all be excluded from the stats system. That'd both prevent stat whoring, and keep the game a bit more in check.

PS: Also, in my perfect system, matches would count 10x more than anything else.

QueeNiE

  • 68 Carbine
  • Posts: 435
Re: Possible stat server model
« Reply #5 on: January 30, 2008, 10:31:26 AM »
Or just count matches in general.  Who cares about pub stats?  Or keep them separate.

Cobo

  • Autococker
  • Posts: 1362
Re: Possible stat server model
« Reply #6 on: January 30, 2008, 03:50:35 PM »
Keep the private servers out of the stats.  That way you don't have some guy running around on his own server stat-whoring.
What I mean by keeping stats for a private server is that someone could just create his own stat-recording app and display them on some website. The global one could just do a yyystatus check to see if the server is private or whatever and keep him out of the stats.

Or just count matches in general.  Who cares about pub stats?  Or keep them separate.
Thats something this could do, since one of its characteristics is that its flexible.
Someone could just write a dpcup stat keeper and schedule matches at a certain time at a certain server.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Possible stat server model
« Reply #7 on: January 30, 2008, 04:06:54 PM »
If you want to keep stats for one specific server for an event, you could just parse STDLogs.

Garrett

  • Autococker
  • Posts: 1372
Re: Possible stat server model
« Reply #8 on: January 30, 2008, 10:44:57 PM »
I like the idea of the server needing a set standard for the stats to be able to record.  Sometimes I go to a server and there is a group of 4 friends who are just starting out.  I like the set amount of people in the server needed to record the stats because if you have more then say 10 people, chances are, one of those people are half-decent.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Possible stat server model
« Reply #9 on: January 30, 2008, 11:23:07 PM »
I think that if jit wanted global stats logging, he'd just make it aggregate the data and submit it to his server periodically. Which servers get logged is a different matter. :P