Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Celery Intro

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for kenzic kenzic
March 28, 2014

Celery Intro

Avatar for kenzic

kenzic

March 28, 2014
Tweet

Other Decks in Programming

Transcript

  1. WHAT IS CELERY? “Celery is a simple, flexible and reliable

    distributed system to process vast amounts of messages, while providing operations with the tools required to maintain such a system.” Asynchronous task management
  2. WHY? • Running work outside of the Request/Response cycle. •

    Network requests/APIs. • Maintenance. • Warm cache. • Delete old sessions. • Email Notifications. • Video Processing. • Search Indexing. • Uploading files to a CDN. • Distributed computing.
  3. HOW DOES IT WORK? • Task - Defines both what

    happens when a task is called (sends a message), and what happens when a worker receives that message. • Broker (Queue) - Where message is stored until a Worker can execute task. • Worker - Consumes message and executes tasks.
  4. WHAT IS A TASK? A task is a unit of

    work. Think of it like a function.
  5. WHAT IS A BROKER? “Celery requires a solution to send

    and receive messages, usually this comes in the form of a separate service called a message broker.”
  6. RABBITMQ The Broker of Choice. Puts your message on it’s

    back and hops to the nearest worker.