python - Google App Engine - Use Task Queues or Deferred Jobs -
google app engine has 2 methods running jobs @ later point, task queues , deferred jops
they support same features far can tell (e.g. deferred job can placed on particular task queue can throttle execution) - deferred jobs easier implement , more flexible.
anyone know of pro's con's of each method? circumstances want use task queues on deferred jobs?
i'm not sure if noticed it, documentation deferreds has section in end:
you may wondering when use ext.deferred, , when stick built-in task queue api. here our suggestions.
you may want use deferred library if:
- you use task queue lightly.
- you want refactor existing code run on task queue minimum of changes.
- you're writing 1 off maintenance task, such schema migration.
- your app has many different types of background task, , writing separate handler each burdensome.
- your task requires complex arguments aren't serialized without using pickle.
- you writing library other apps needs background work.
you may want use task queue api if:
- you need complete control on how tasks queued , executed.
- you need better queue management or monitoring deferred provides.
- you have high throughput, , overhead important.
- you building larger abstractions , need direct control on tasks.
- you webhook model better rpc model.
naturally, can use both task queue api , deferred library side-by-side, if app has requirements fit both groups.
Comments
Post a Comment