Could use cron. or more dynamic tasks. Depends party on how many clients you have. One of the issues you face is that can't "query" memcache to see what keys there are waiting to be written. So you either have to just try them all, or maintain some sort of list.
If a small number (under say 1000?) then the cron running a check for all clients would probably work find. But if many more than that, esp if only a few are active in any period, then its a huge overhead, to check them all, when many will still be missing/zero. In which case when a hit from a client comes, you queue up a task unique to the client. Set an eta for an hour later. Or similar. That task then fires later, and wipes the current value from memcache, and adds it to the datastore. A nice feature is can use task names to prevent adding more tasks for a given user. So name the task like "client_month_day_hour" or similar. Then successive attempts (because you try on every hit) will just fail. The first one exists and will run. (But the cron version is easier. Try that first. If its not keeping up, or too slow, the try the task queue version) On Mon, Aug 22, 2011 at 7:32 PM, Mike Gleason jr Couturier <[email protected]> wrote: > Thanks Barry, > For the regular writes from memcache to the hrd, you would set up a cron > job? > http://code.google.com/appengine/docs/java/config/cron.html > > In that case my API service would be pretty efficient I guess with read only > calls from my clients. > Thank you again > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine/-/7ZZEf6HRSoIJ. > 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. > -- 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.
