Snackdaddy
Member
+2|6918
I am currently finishing up (85% complete) a stats system for another EA product.
I glance at this site for stats which is AWESOME, and i know fully 100% how hard it was to develop.
I do however have a solution for the lagtime etc of the stats. This would take the load off the server and add pretty much up to the moment stats.

This is what i have implemented for my system:

   What i refer to as a "WorkerWare Client". This small client will run in the background. It basically pulls a list of users from the server (BF2S) public DB. It goes to EA's servers and grabs the stats. Encrypts the info and sends it to server (BF2S). Now. to ensure that the stats are not alterted i have created a small little authentication system in the client, which could be easily replicated by any decent programmer. "How do you make the users use the client?" WORKERWARE license :>. I personnaly have my clients configured based on a security level or access level. So.. if you parse out 100 users your level 1. means your stats are lagged 2 hours. 500 users etc... thats not how mine are done but you get the idea.

If the author of this site wants some help info i would be willing to help out. I dont have time to create and change the thing for here but can get him going. Development time for me would prolly be around 3 weeks (120 hrs) vb application. For someone from scratch maybe double so its definatly possible. I may give it a whirl after i complete my system as most of the software would be the same.

-Snackz
NM156
The H4xor Mod
+161|7059|North Texas
I doubt this will be needed for bf2s.com. Chuy cannot use the BFHQ feed you are referring to. If he did, he'd lose all access to the stats.. that can't happen.
Rakasan
Member
+7|7048|California, USA
Snackdaddy: sounded like you put alot of work into this, but I don't think it will happen either.  Plus, additioonal queries from the workers still put create stress on stats server.  You can do that with numerous  Linux boxes with shell accounts using wget or curl.  Throw in a cron + a simple UNIX shell script you're done.

Last edited by Rakasan (2006-02-04 16:39:28)

raz
Member
+22|6876|England, UK
Yes, you need permission off EA themselves to access the BFHQ as you will be using up THEIR bandwidth. Good luck with it.
NM156
The H4xor Mod
+161|7059|North Texas
Technically, no can use that feed for any web site. That feed is for the game only, it's in the EULA I believe.

Chuy brought that thing to it's knees in the beginning. *snicker*
chuyskywalker
Admin
+2,439|7060|"Frisco"

I've looked into this before, but couldn't come to any sort of foolproof (or even viable) way of authenticating the data that was being submitted to me. While it's a nice goal to distribute the feed reading process there are a few problems:

1) Distributing the load of this process across hundreds of thousands of machines will cause a DOS style effect against EA's machines. They'd have no central contact to rememdy situations with. With a single source, like bf2s, we can make consultations, meetings, etc to optimize and analyze things a LOT easier.

2) Creating such a client has its own maintenance issues (eg: "why doesn't this work on my refrigerator running my custom build of windows 95?")

3) It is never safe to assume that data coming from a distributed, mildly anonymous source is safe. The reality is that, even if I made and distribute the exe that pulls stats and then pushes them back here, there'd be no reason to trust that someone else doesn't come along and game the system by making their own false client. In fact, in systems like that it's a very common occurance. I have no real control over the data that comes in.



Finally, you mentioned querying the game servers -- that doesn't help anything. All you get then is the points a player has earned *at that point* during the game. To start with, there's no sure fire way to figure out how to query a game right as it ends in order to get the full read of the game. Also, its just the scores! Which is only ONE stat of the 400 some odd stats I present.
Rakasan
Member
+7|7048|California, USA
Hey chuy, with your "special feed" can you retrieve KDR, SPM, etc on each map using a specific weapon or vehicle?
NM156
The H4xor Mod
+161|7059|North Texas
This is what is in the "special" feed: http://forums.bf2s.com/viewtopic.php?pid=85375#p85375
Snackdaddy
Member
+2|6918
Guys, there is no special feeds.. its a stupid response from a gamespy server. startup a sniffer, go into the game.. do a compare on yourself or anyone and um.. i dunno look at the packets. its very open. they may have a proprietery server for stats i dunno but when you look at your stats in game.. your querying their server.. soooooooo you have access to get other peeps stats.. so if you get 20 peoples stats a day x 10,000 clients.. everyones stats are constently updated.

i'll post some info in a few weeks or whenver i get bored.
Rakasan
Member
+7|7048|California, USA
"Special" as in EA's beta program (xml), sorry I wasn't clear.  Yes, some of us are aware of those feeds you are referring to , i.e. GameSpyHTTP/1.0...http://bf2web.gamespy.com/ASP/getplayerinfo.aspx...Maybe you can update this

http://statpadder.com/cgi-bin/bf2r.cgi? … mp;start=0 for me, LOL
chuyskywalker
Admin
+2,439|7060|"Frisco"

Snackdaddy wrote:

Guys, there is no special feeds.. its a stupid response from a gamespy server. startup a sniffer, go into the game.. do a compare on yourself or anyone and um.. i dunno look at the packets. its very open. they may have a proprietery server for stats i dunno but when you look at your stats in game.. your querying their server.. soooooooo you have access to get other peeps stats.. so if you get 20 peoples stats a day x 10,000 clients.. everyones stats are constently updated.

i'll post some info in a few weeks or whenver i get bored.
The problem with doing this. Ever noticed how it takes, oh, 5 minutes for the account server to log you in? Do you remember when it took 3 seconds? Yeah, that was before people started doing the above.

And, actually, 20 x 10,000 == 200,000 people's stats -- that's about 1/3 of the number of people stats I have. And, oh yeah, that's only an update every 24 hours -- I (try) to do updates every hour. So, realisticaly, 600,000 X 24 = 14,400,000 updates a day is the max of what would need to be done. I guarantee that if the regular stats server starts getting hit by that, NO ONE will be able to login and play the game.
iD
Hates most server admins.
+7|6868

chuyskywalker wrote:

I (try) to do updates every hour. So, realisticaly, 600,000 X 24 = 14,400,000 updates a day is the max of what would need to be done. I guarantee that if the regular stats server starts getting hit by that, NO ONE will be able to login and play the game.
i have many friends in my leaderboard, but some of them havent played for weeks. their stats are constantly updated too, which is totally unneccessary.
if you'd update the stats after someone has played (bf2s can monitor if someone is online, so that should be possible) and maybe one update a few hours later, the stats would be faster and less updates needed in total.

if i havent played for a week, there is no reason why my stats should be updated
NM156
The H4xor Mod
+161|7059|North Texas

iD wrote:

if i havent played for a week, there is no reason why my stats should be updated
The stats server still has to be queried to see if they've played, so it's a moot point. The online status only updates when your leader board or stats page gets viewed, and the cache files has expired.
iD
Hates most server admins.
+7|6868

NM156 wrote:

iD wrote:

if i havent played for a week, there is no reason why my stats should be updated
The stats server still has to be queried to see if they've played, so it's a moot point. The online status only updates when your leader board or stats page gets viewed, and the cache files has expired.
the online status is updated regularly, the full stats arent. bf2s doesnt have to query the full stats to update the online status, right?
NM156
The H4xor Mod
+161|7059|North Texas

iD wrote:

the online status is updated regularly, the full stats arent.
The online status gets cached to a file, but I don't know what kind of time limit he has. I'm guessing at 5 or 10 minutes? I dunno...

iD wrote:

bf2s doesnt have to query the full stats to update the online status, right?
Correct... they're both separate processes.
morbesso666
Member
+0|6976|Givataim, Israel
The waiting line have became slower.
If I update right up it only goes 20 ppl at a time before the server changing it was 180 for updating right up or so.
Snackdaddy
Member
+2|6918

chuyskywalker wrote:

Snackdaddy wrote:

Guys, there is no special feeds.. its a stupid response from a gamespy server. startup a sniffer, go into the game.. do a compare on yourself or anyone and um.. i dunno look at the packets. its very open. they may have a proprietery server for stats i dunno but when you look at your stats in game.. your querying their server.. soooooooo you have access to get other peeps stats.. so if you get 20 peoples stats a day x 10,000 clients.. everyones stats are constently updated.

i'll post some info in a few weeks or whenver i get bored.
The problem with doing this. Ever noticed how it takes, oh, 5 minutes for the account server to log you in? Do you remember when it took 3 seconds? Yeah, that was before people started doing the above.

And, actually, 20 x 10,000 == 200,000 people's stats -- that's about 1/3 of the number of people stats I have. And, oh yeah, that's only an update every 24 hours -- I (try) to do updates every hour. So, realisticaly, 600,000 X 24 = 14,400,000 updates a day is the max of what would need to be done. I guarantee that if the regular stats server starts getting hit by that, NO ONE will be able to login and play the game.
you dont need the account server. basically its this. user starts the app which auto launches bf2. it waits until it catches the session id that is spit out by gamespy. they have a login here at your site. you have a list of users it passes out to the client. the client parses 5 per 30 minutes or whatever throttle method you decide to use. DDOS? well if i sit in game and lookup 5 users stats? i sereously doubt that  it would crush their servers. btw if it did make an impact.. what? are they going to ban people from looking up stats in game? or are they more likely to put up a few public xml feeds to actually query. Doing this has nothing to do with the login server as you would only query for the session id once, and just from the 5 minutes i looked the other night the login server is different that the server you query for stats.
midgetspy
Member
+3|7040
Snackdaddy: you have no idea what you're talking about.

1) The account server is the same server that serves BFHQ stats.
2) Yes, it would crush their servers. It has happened before, and is the reason chuy had to stop using the BFHQ feed.
3) Yes, they banned chuy's IP (and other servers who were querying too quickly)

Nic

Board footer

Privacy Policy - © 2024 Jeff Minard