Hi Markitecht, It sounds like your best option is to have a single Interaction entity for each unique string. You can use the key name to ensure uniqueness. Then, to record a new interaction, in a transaction fetch the existing one (if any), increment the count, and store it.
If you expect some interactions to be very popular (more than a few updates a second), you should probably look into sharded counters. -Nick Johnson On Wed, Aug 5, 2009 at 7:15 PM, Markitecht<[email protected]> wrote: > > I am writing a dirt-simple tracking API. > > For the sake of explanation, i will over-simplify my question even > further. > > I have an endpoint that accepts one item of string metadata, and saves > a new instance of an Interaction object. > > (the interaction object also saves the user and the date created) > > How do i query Interaction to return the most popular > 'interactions' (using those string metadata values), with a count for > each? > > This seems *so* simple, but i just can't figure out how to do it on > AE. > > Thanks, > Christopher > > > > -- Nick Johnson, Developer Programs Engineer, App Engine --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
