I'd approach this by using some kind of a tree structure, with each node in the tree represented by an entity in the data store. Your player items would be in leaf nodes pointing at those interior node entities. Put a count in each node saying how many items are below that node. If you have the record for a player, and you know his parent node, you can compute his rank with O(lg N) datastore lookups, which you can probably get done before the deadline runs out. Whenever you need to change someone's position in the tree, you'd run through O(lg N) entities and update counters (in a transaction, of course).
What kind of tree to use would require some study of the problem domain. Red/Black, B-tree, etc., etc. -Joshua --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
