AlphaX
Joined: Aug 02, 2003
|
  Posted:
May 27, 2003 - 12:09 |
|
didyouknows were sweet,
How about -
keep a list of the records, (1 "record" per didyouknow),
make them accessable from the stats page,
when a new game is reported - check to see if any old record has been broken - if so update the list of records...
this should be complexity 1, upposed to sorting which at best is something like N log(N) or something like that (been a while since college.) (Where N is 250k)...
then when loading a page, you can just pick a random line and spit it out quick...
please add records for most niggled too
<i>whoops, this is exactly what cjohnsto wrote...</i> |
Last edited by AlphaX on %b %27, %2003 - %12:%May; edited 1 time in total |
|
AlphaX
Joined: Aug 02, 2003
|
  Posted:
May 27, 2003 - 12:13 |
|
elvisishere wrote: | I loved the records. The most CAS in a game was something like 16, totally huge!
Ahh Huhh!!!!
I am leaving the building. |
I wish it was 16, since I played a game with 17, however it was 19... |
|
|
kaan
Joined: Aug 02, 2003
|
  Posted:
May 27, 2003 - 16:34 |
|
AlphaX wrote: | didyouknows were sweet,
How about -
keep a list of the records, (1 "record" per didyouknow),
make them accessable from the stats page,
when a new game is reported - check to see if any old record has been broken - if so update the list of records...
this should be complexity 1, upposed to sorting which at best is something like N log(N) or something like that (been a while since college.) (Where N is 250k)...
then when loading a page, you can just pick a random line and spit it out quick...
please add records for most niggled too
<i>whoops, this is exactly what cjohnsto wrote...</i> |
well that still leaves a problem of concurrency and filelocking, i guess it would be easy to implement a producer/consumer thingy here but it would generate (noticable) extra server load no matter how you put it.
kaan |
|
|
Mr-Klipp
Joined: Aug 02, 2003
|
  Posted:
May 27, 2003 - 22:11 |
|
Well, if the querries that generated the did you knows where run once a day at an off time and stored in a table, then they could be pulled from that table to show on each page without aditional load. That would be one possible way of doing it. |
_________________ Looking to get your minis painted? Look no further.
The Finishing Touch |
|
AlphaX
Joined: Aug 02, 2003
|
  Posted:
May 28, 2003 - 01:59 |
|
kaan wrote: |
well that still leaves a problem of concurrency and filelocking, i guess it would be easy to implement a producer/consumer thingy here but it would generate (noticable) extra server load no matter how you put it.
kaan |
I seriously doubt that. With less than 300 games a day being reported, the load to keep didyouknows is insignificant (under the proposed scheme) The problem was generating the didyouknows on the fly with each page load.
as for concurrancy / filelocking - match reporting already requires some degree of filelocking. Even if only to get a match id#. As for someone getting an "out of date" didyouknow - it will most likely be milliseconds out of date.
a scheduled task to generate the didyouknows will likely require as much coding as updating with match reporting. maybe more as the webpage is in php - and last time I coded PHP there wasn't a trivial treatment for a scheduled execution of PHP code. [and there are potential security risks with such an item...]
I think the stat pages may need some of the same treatment--loading most of the stat pages ( ref this link : http://fumbbl.com/FUMBBL.php?page=stats ) can take a long time. I would suspect if a few people view stats at the same time - team loads / reporting / etc goes to "hell"... |
|
|
Christer
Joined: Aug 02, 2003
|
Well not really.. Those stuff would go into the query cache and be delivered more or less instantly after the first load...
At this point, the most common query that takes alot of time is one that displays a list of matches for a coach / team. |
|
|
BunnyPuncher
Joined: Aug 02, 2003
|
  Posted:
Feb 22, 2004 - 22:02 |
|
BunnyPuncher wrote: | Hmmm... how about compiling them off-line and updation once a week... no need for it to be in real time. It's just brain candy.
But either way... FUMBBL ROCKS!!!! |
awwww... that was my first ever post on fumbbl.. oh the nostalgia |
_________________
|
|
SparkingConduit
Joined: Oct 28, 2003
|
  Posted:
Feb 22, 2004 - 22:20 |
|
Heh, Bunny, you came back to THIS thread. Sheesh. |
_________________ <belgin>need a makeup game
<belgin>with a team in the same perdickament
THIS is why you shouldn't try to spell some words as they sound... |
|
|