[google-appengine] Re: Grouping and counting in GAE... advice needed

2009-02-23 Thread Brandon Thomson
Hi Sergio, How about this: class item(db.Model): numVotes = db.IntegerProperty() url = db.LinkProperty() timestamp = db.DateTimeProperty(auto_now_add=True) You may need to shard the items if you expect more than 5 votes per item per second. On Feb 22, 8:59 pm, Sérgio Nunes wrote: > Hi,

[google-appengine] Re: Grouping and counting in GAE... advice needed

2009-02-23 Thread Sérgio Nunes
Hi, Thank you for the quick feedback. It seems that the suggested model would easily provide a *total* count. However, I need to compute periodic totals based on the last X votes. How would I update the count for each link considering only the votes submitted in the last hour? I am currently rev

[google-appengine] Re: Grouping and counting in GAE... advice needed

2009-02-24 Thread Bill
This is a brain dump (LONG) as I work through this problem. Hope it helps others or others can help me by correcting mistakes or suggesting alternatives. First, look at this article on Digg-like functionality: http://code.google.com/appengine/articles/overheard.html That article suggests this f

[google-appengine] Re: Grouping and counting in GAE... advice needed

2009-02-24 Thread Bill
On Feb 24, 2:29 am, Bill wrote: > This is a brain dump (LONG) as I work through this problem.  Hope it > > We could use an equality filter that pretty much removes all entities > with last_vote_time more than an hour ago.  One solution would be to > add a StringListProperty, call it last_vote_hou