i think you are on the right track. i have one idea: right after a player finishes a game and before your check to see if their score should be featured in one of the rankings, do a quick "cleanup" of the existing date-sensitive/rolling window scores:
- go through the daily scores; they should have user name, score, and timestamp. all scores with timestamps older than 24 hours should be wiped. - go through the weekly scores and do the same thing, only use a 168- hour clock. also note that for the time-sensitive scores, you should probably use UTC/GMT time to avoid timezone complications. - the overall scores should also use the same model. the timestamp is used only to show when a user accomplished such a score whereas in the other 2 cases, they're also used to calculate expiration. if you do this type of scrubbing, then you don't need a scheduled task. it will happen automatically right after any game is finished. if no work needs to be done, then the work will go even faster. if you have any more specific questions, feel free to ask on this list again. good luck! -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2007,2001 "Python Fundamentals", Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: [email protected] developer relations :: google app engine On Jan 7, 5:12 pm, Amir Michail <[email protected]> wrote: > Suppose you would like global leaderboards for a game with top 100 > rankings for today, this week, and all time. > > Moreover, suppose that today and this week use rolling windows. > > When a player finishes a game, a check is done to see if his/her score > is in the top 100 for any of these three rankings. > > If so, then a nickname and score is submitted and the leaderboard(s) > updated. > > What's a good way to implement this with the google app engine? > > Use three kinds of objects, say scoreToday, scoreThisWeek, and > scoreOverall? > > To see if the score should be submitted, the top 100 from each would > be examined. This check is complicated by the rolling windows. For > example, the score may not be in the top 100 now for today/this week, > but will be in 2 hours say. > > Deletions for all three object types would be done using a scheduled > task perhaps. > > Am I on the right track?
-- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
