I solved this problem by spinning off a task queue with an ETA of 1-5
minutes that would flush the total count into a different entity. The
tradeoff is that count totals are delayed and it's not even close to real
time, but the advantage is that it gets the best of both worlds:

This code lab is slightly out of date (also may not work ... ), but there's
some sample code using a deferred handler to do what I just explained. Check
it out:

http://io-bootcamp-datastore.appspot.com/

--
Ikai Lan
Developer Programs Engineer, Google App Engine
plus.ikailan.com | twitter.com/ikai



On Thu, Oct 6, 2011 at 7:44 AM, Liang Ding <dl88...@gmail.com> wrote:

> stores the sum count as a property of a product  entity, updates it with a
> cron job maybe a teade off solution....
>
>
> On Thursday, October 6, 2011, dnkoutso <dnkou...@gmail.com> wrote:
>  > We have 5 shard counters per product.
> > Both are important....I would say retrieving perhaps more important.
> > Each shard counter is in a transaction when it is about to be
> incremented. I use this for representing most viewed products ---> most
> popular products.
> > Thanks!
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> > To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/bzXVD2r_84kJ.
> > To post to this group, send email to
> google-appengine-java@googlegroups.com.
> > To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
> >
>
> --
> My Blog: http://88250.b3log.org
> --------------------------------------------------------
> Open Source, Open Mind, Open Sight, Open Future!
>
> --
> 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
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to