IMHO the right way depends on the number of items you have to process.  :)

If the number is not very big, a simple solution is to create 2 servlet (or
one with a parameter).
 S1 - enqueue all the emails. Iterates through your entities and enqueue one
task per each email (N email --> N task). Important: enque tasks using the
"bulk" enqueue (max 100 task / call).
 S2 - send the email

S1 is called by your CRON
S2 is called by Task Queue

Important: set the queue rate accordingly to your quota limit. If you have
not billing enabled, set <rate>5/m</rate> and <bucket-size>1<bucket-size>.
So you will not exceed the quota limit (8 recipients/minute).


Fabrizio


On Fri, Jan 21, 2011 at 6:59 PM, Mayumi Liyanage <
mayumi.liyan...@coldwin.com> wrote:

> Hi, I need to iterate over all the entities in the Datastore and send
> out emails once a day asynchronously to the actual app.
> Usual way to do this would be to invoke a Servlet using cron which
> would iterate over all the entities to send emails out. However, our
> data is growing at the rapid rate and sooner or later we will have a
> issue with 30 sec limit problem.
> What would be the best way to do this operation using app engine
> without worrying about 30 sec limit?
>
> Can we do above using the Mapper API? If so how can we invoke a mapper
> from the servlet?
>
> Thanks.
>
> --
> 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<google-appengine-java%2bunsubscr...@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