Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > Team MacNN > What is going on with the folding stats?

What is going on with the folding stats?
Thread Tools
Senior User
Join Date: Oct 2002
Location: God's Country, The South
Status: Offline
Reply With Quote
Mar 29, 2005, 12:48 PM
 
They seem to be semi-messed up again, or at least not updating as regularly as they used to. It also says that CorneredBeast has insufficent data to correctly calculate his stats? After all this time, what gives with that? Am I missing something somewhere?
Chappaquidick 1, Cheney 0
     
Administrator
Join Date: May 2000
Location: California
Status: Offline
Reply With Quote
Mar 30, 2005, 12:58 AM
 
You get the Insufficient Data tag only on a new arrival. When you see it on an established member, check the Member Changes page to see what happened.

On projects that do not allow departures, it has to mean a server glitch. Either on our side, or their side. In this case, it's their side again. Same as what happened to you a short time ago, one of the data updates reported your total as lower than it used to be.

This used to happen a lot on dFold, and the reason was they went to a web farm to handle all the web requests. It works something like this:

Their router gets a request for a stats page. It sends the request to one of 5 servers. The servers probably get requests in sequence, 1 -> 2 -> 3 -> 4 -> 5 -> 1, but since we can't see all the incoming requests, a request from us will draw a random server for all practical purposes.

Each server 1-5 has a complete copy of their stats system and handles the requests. The end user doesn't normally see any glitches. They load a page, it loads quickly, and their stats show up.

Problems happen when the data is updated, since all 5 servers must be kept in sync. Most of the time, they are. On dFold, a server sometimes stopped updating at all, so you'd sometimes get a stuck page from them showing data from hours or days ago. And one request in 5 would keep bringing up the stale data.

More commonly, you apparently hit a sync issue. The "real" database in the background is duplicated to the 5 web servers at regular intervals. But that DB is being updated itself in real time, and realistically, the syncing to 5 servers takes time to complete. Suppose you sync with them one at a time:

Server 1 updated: CorneredBeast 95 stats
Server 2 updated: CorneredBeast 95 stats
Server 3 updated: CorneredBeast 95 stats
Server 4 updated: CorneredBeast 95 stats
(CorneredBeast returns a unit, the master DB accepts it)
Server 5 updated: CorneredBeast 96 stats

Teamstats runs a stats update, and draws from Server 5. CorneredBeast has 96 stats. On our next update, we draw randomly from Server 3. CorneredBeast has 95 units now.

Oops, units can't go down. He must have left, and someone with the same name but fewer units joined. This is a simple matching rule used by our stats engine for all projects, and apparently by other stats engines too. Scott tells me other stats sites have had problems on Folding lately.

The problem happened so often on dFold that I coded in an allowed slip factor between updates. The slip factor is normally disabled on "regular" projects that don't exibit problems, since it can allow incorrect matches under rare conditions.

I've just enabled it on Folding, two errors is too many times. The data's been reprocessed and the error is gone.

In practice, it's really a problem on the project side. They should copy the master DB, then sync each web server to the copy. That way they can't have data drift during the sync operation, and they still have the capacity to serve 5x as many web requests.

Please note that the above explanation about drift during sync is speculation on my part. dFold definitely used 4-6 web servers to handle requests, but I've not heard that Fold has done that. It could be rounding errors or corrections on their master DB server. Still, it fits the facts, and our old code fix takes care of this latest problem too. Happy crunching.
(Last edited by reader50; Mar 30, 2005 at 01:10 AM. )
     
Senior User
Join Date: Oct 2002
Location: God's Country, The South
Status: Offline
Reply With Quote
Mar 30, 2005, 06:09 AM
 
Originally posted by reader50:
Still, it fits the facts, and our old code fix takes care of this latest problem too. Happy crunching.
Never a doubt in my mind that you would know the answer Reader50! If you need an IT job when you finish school, look me up. I manage a little chunk of a REALLy big IT department and we are always looking for good talent.

BTW, the same goes for you Scott....
Chappaquidick 1, Cheney 0
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:08 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2