3. Celery-based API. RoutingCreating API endpoint1. Common package for all API endpoints2. Every worker imports celery instance3. Expose tasks for worker with CELERY_IMPORTS4. Launch worker with celery worker -A module_name -Q foo -n foo
3. Celery-based API. RoutingDefine all queues (API endpoints) you have
4. Celery-based API. BenefitsHigh level protocol.Takes the responsibility for data serialization routing exception handling
4. Celery-based API. BenefitsSupport for wide range of brokers.You can switch between brokers with no majorchanges in your codeBrokers:RabbitMQ Redis SQLAlchemyDjango MongoDB Amazon SQSCouchDB Beanstalk
4. Celery-based API. BenefitsBuilt-in extra stuff which you were afraid to everdream of.asynchronous execution parallel executionasynchronous parallel executiondelayed execution throttlingautomatic retrying of failed taskslimiting the time of executionautoscaling API inspectionpublic key cryptography (message signing)
4. Celery-based API. PitfallsPython-centric.Celery is written in Python and meant to beused with Python code exclusively
4. Celery-based API. Security note1. Try>>> redis_url = redis://:email@example.com>>> celery = Celery(broker=redis_url, result=redis_url)2. Get the contents of /etc/pycon_secret3. Exchange it for a secret prize ;)
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.