views:

69

answers:

2

Let's say I have 1000's of jobs to perform repeatedly, how would you propose I architect my system on Google AppEngine?

I need to be able to add more jobs whilst effectively scaling the system. Scheduled Tasks are part of the solution of course as well as Task Queues but I am looking for more insights has to best utilize these resources.

NOTE: There are no dependencies between "jobs".

A: 

Hi,

I think you could use Cron Jobs.

Regards.

ATorras
yes scheduled tasks are part of the solution but I am looking for a little more architectural level suggestions.
jldupont
And what is the "architectural level" problem?
OscarRyz
If you want to bypass the 30 secs limit you can create a dummy JSP that make AJAX calls to a RESTful "task" (I mean interruptible and restartable)
ATorras
A: 

Based on what little description you've provided, it's hard to say. You probably want to use the Task Queue, and maybe the deferred library if you're using Python. All that's required to use these is to use the API to enqueue a task.

If you're talking about having many repeating tasks, you have a couple of options:

  • Start off the first task on the task queue manually, and use 'chaining' to have each invocation queue the next one with the appropriate interval.
  • Store each schedule in the datastore. Have a cron job regularly scan for any tasks that have reached their ETA; fire off a task queue task for each, updating the ETA for the next run.
Nick Johnson
Thanks Nick! I take your point I wasn't specific enough.
jldupont