Yes, this will most definitely see a 30 second time limit if you have a large enough number of counter. I suggest generating the report using Appengine Mapreduce:
http://code.google.com/p/appengine-mapreduce/ I wrote up a few examples about how to aggregate data here: http://ikaisays.com/2010/07/09/using-the-java-mapper-framework-for-app-engine/ There will be an article going live soon that will also describe a real world use case for generating reports using this tool. On Sat, Aug 7, 2010 at 1:57 AM, aswath satrasala <[email protected] > wrote: > Hello, > I am basing my entities design based on the sharded counter example for my > accounting webapp. > > Extending the sharded counter case further... > Lets say I have a website of 500 pages. I want to track the number of hits > of each page and then I want a report like this: > Page1 - Nohits > Page2 - Nohits > Page3 - Nohits > .... > Page 500 - Nohits. > > Per the sharded counter example, lets say there are 10 shards for each page > counter. So, there will be 5000 rows in all for 500 pages/counters. > To get a report like above: > * query the Counter class sorted by counter name - max 1000 entities are > returned > * calculate the nohits for the page based on the countername from the > results. > * Use the cursor, then query for further rows until all the rows are read. > * After each query, traverse the results and do the calculation for the > nohits for the pages > * The query will be issued for atleast 5 times and then it is done. > > Questions: > * Do you see a 30 second timeout limit of the appengine while performing > the above. > * what if I increase the number of shards from 10 to 100 for each counter. > The number of rows will be (500 * 100 = 50000). This means, 50 queries to be > issued. > * Any other better ways to get the above report > * Any datamodel changes can be applied without sacrificing on the > throughput of the appengine transactions. > > -Aswath > > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- Ikai Lan Developer Programs Engineer, Google App Engine Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" 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-java?hl=en.
