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].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to