Originally posted by Nordlys
Well, the rating determines the ranking (or if you sort by move number, for example, the move number determines the ranking), so you can't really "sort by ranking". If several people have the same rating, I think they are ranked alphabetically. What's confusing in the new tables is that the ranking is determined by the rating, move number etc. at a specific time of the day, while the tables show the newest rating, move number etc.
I see. So, ranking is more like your position in the table and nothing else. Well, then it makes no sense at all. That's
not very hard to calculate. Hell, it doesn't even require calculating.
But I understand now. (Sometimes - well, most of the time, actually - I'm a bit on the slow side.)
So, to avoid having to sort the tables on each request, Russ decided to create 3 static tables. One for each type of sorting we can do. He has the application update those tables every 24hrs, presorted according to the "real" player table as they were created. But instead of storing all the information in the static tables, he's just storing the player id's. Then, when you fetch the playertable he does a join on the "real" player table, and that's why we get current rating instead of the rating as it were when the table was sorted, but the sorting as it were when the table was created.
Whereas he saves a lot of server processing time not actually sorting the table on each request, he loses the consistency in the presented table. He should use the ratings, number of moves and whatever as it were defined when the table were created. Thus, nothing updates more often than 24hrs. That would at least be consistent. (It would take a lot more diskpace, but I think the consistency and the timesavings are worth it. Don't you?)
I just thought of something. Russ could setup a separate server wich would be a maintenance server, of sort. Now, once every hour or so, it would use the information from the "real" player table, and create the new static (sorted) player tables (with all
fields static). Thus, no load on the servers that we all contact to fetch the pages, but hourly updates to the player tables.
Yup. I'm a genius.