views:

53

answers:

1

I'm writing an Appengine app: one of its duties is to email all the users every night (I know that I'll have to enable billing to email many users -- that's no problem).

I'm just worried about the 30-second request limit; if I have thousands of users and I have to mail them all a daily reminder, won't that limit be hit sometime soon?

Any ideas on how can I handle this problem? Or maybe Appengine isn't right for this type of application...? Thanks!

+2  A: 

Use the task queue: each task emails N users (the number you determine you can safely email well within the 30 secs limit) and queues up another task to email the next N, and so on.

Brett Slatkin's video has more about the best ways to split up such "batch" tasks for the purpose of running them effectively on the app engine.

Alex Martelli
Thanks, Alex! The URL doesn't work for me. Are you referring to this: http://code.google.com/events/io/sessions/OfflineProcessingAppEngine.html
sri
@sri, yep, sorry -- I'll edit my answer to fix the URL (not sure why it works for me and not for you but the URL you gave does work for us both, so that's surely better!-)
Alex Martelli