time applications, Celery can be used for any processing that is better executed Asychonously or in a Non Blocking fashion • Periodic Tasks ( more Pythonic than cron! ) • Expensive or heavy processing you want to do on a separate machine or instance Tuesday, February 25, 14
to upload an album of photos • The photos need to be postprocessed by the app ( resized, cropped, filtered, persisted to storage) • This post processing takes a long time to complete Tuesday, February 25, 14
open until processing complete • Bad because the user experience slow response time • Blocks the web server thread - with sufficient users web server will run out of threads Tuesday, February 25, 14
persisted somewhere to be processed by a cron job that runs every x minutes • Better, because user has a fast response, threads are not blocked • However user’s input is not processed until the next cycle Tuesday, February 25, 14
distributed messaging queues • User has fast response, threads not blocked • Post processing starts as soon as user input received • Can be scaled as traffic increases by Tuesday, February 25, 14