Django & Celery: A love story of async proportions with Hugo Bessa

0:34:51
Published December 6, 2024
1 views

Django: A Framework for perfectionists with deadlines

  1. Batteries included: Security, Authentication, Authorization, Administration, robust and mature ORM, etc.
  2. Opinionated: Django defines the right path for doing things with it. And this open doors for building extensions.
  3. Strong Community: Open source packages, events, meetups, active development of the main framework

Django's performance issue is a thing. We need to be careful with:

  1. Avoiding N+1s
  2. Caching
  3. Database indexes
  4. Data denormalization
  5. Running operations in the background

Why running operations in the background?

What is Celery? Asynchronous task queue or job queue which is based on distributed message passing

Why Celery?

  1. Distributed: It separates async tasks execution from your application
  2. Fast: Celery has a very small boilerplate and executes tasks REALLY fast
  3. Integrated: You can write Celery tasks within your application, with access to models, services, functions, classes, etc

Celery 💘 Django

  1. Documentation: We have dedicated docs for integrating them both
  2. Django Settings: You can configure Celery from Django settings, not extra boilerplate
  3. Django within tasks: Access to Django ORM and other tools on Celery tasks
  4. Community: There are packages for enhancing the integration

This talk was presented at: https://2024.djangocon.us/talks/django-celery-a-love-story-of-async-proportions/

LINKS: Follow Hugo Bessa 👇 On X: https://x.com/hugoabessa Website: https://bessa.me

Follow DjangoCon US 👇 https://fosstodon.org/@djangocon https://x.com/djangocon

Follow DEFNA 👇 https://www.defna.org/

Video production by the presenter and DjangoCon US 2024 volunteers.

Presenters:

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.