From 24b9e43712b4d882c251a490571723678d7b3711 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 1 Jun 2024 22:05:28 +0100 Subject: [PATCH] Add speaker notes --- slides.md | 436 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 402 insertions(+), 34 deletions(-) diff --git a/slides.md b/slides.md index 5958e63..e5d9eb1 100644 --- a/slides.md +++ b/slides.md @@ -29,6 +29,19 @@ themeConfig: + + --- layout: center --- @@ -50,6 +63,13 @@ flowchart LR } + + --- layout: full --- @@ -79,12 +99,28 @@ flowchart TD } + --- layout: full --- -# Background Workers! + + +# Background Workers? + + ```mermaid flowchart TD @@ -97,7 +133,7 @@ flowchart TD R[Reporting] ML((Machine
Learning)) - B{{Background Processing}} + B{{Background Worker}} U<-->D @@ -112,15 +148,24 @@ flowchart TD } + + --- layout: section --- -# Background Workers? - ---- -layout: fact ---- +## Background worker architecture ```mermaid flowchart LR @@ -133,12 +178,29 @@ flowchart LR D<----->S<-....->R1 & R2 & R3 ``` + + --- layout: section --- # When? + + --- layout: cover background: https://images.unsplash.com/photo-1518729371765-043e54eb5674?q=80&w=1807&auto=format&fit=crop&ixlib=rb-4.0.3 @@ -146,6 +208,15 @@ background: https://images.unsplash.com/photo-1518729371765-043e54eb5674?q=80&w= # Does it take time?{.text-right} + + --- layout: fact --- @@ -174,6 +245,15 @@ flowchart BT D-.-E & EA & V & R & ML ``` + + --- layout: cover background: https://images.unsplash.com/photo-1518770660439-4636190af475?q=80&w=3870&auto=format&fit=crop&ixlib=rb-4.0.3 @@ -181,6 +261,15 @@ background: https://images.unsplash.com/photo-1518770660439-4636190af475?q=80&w= # Specialized hardware? + + --- layout: cover background: https://images.unsplash.com/photo-1711606815631-38d32cdaec3e?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3 @@ -189,6 +278,17 @@ background: https://images.unsplash.com/photo-1711606815631-38d32cdaec3e?q=80&w= ## Example: # Complex reporting + + --- layout: section --- @@ -197,30 +297,20 @@ layout: section ---- -layout: cover -background: /celery.svg ---- - -# Celery! - - + --- layout: image-right image: https://images.unsplash.com/photo-1444703686981-a3abbc4d4fe3?q=80&w=1740&auto=format&fit=crop&ixlib=rb-4.0.3 --- -# Others... +# Libraries - - -- ~~Celery~~ +- Celery

- arq - Django DB Queue - Django Lightweight Queue @@ -233,7 +323,15 @@ image: https://images.unsplash.com/photo-1444703686981-a3abbc4d4fe3?q=80&w=1740& - Taskiq - ... -
+ --- layout: cover @@ -243,6 +341,14 @@ background: https://images.unsplash.com/photo-1522096823084-2d1aa8411c13?q=80&w= ## Example: # Email + + --- layout: center --- @@ -266,6 +372,26 @@ for user in page.subscribers.iterator(): ) ``` + + --- layout: center --- @@ -292,6 +418,30 @@ for user in page.subscribers.iterator(): django_rq.enqueue(send_email_to_user, user) ``` + + --- layout: center --- @@ -351,18 +501,65 @@ for user in page.subscribers.iterator(): } + --- layout: image image: /situation.png backgroundSize: 50% --- + + --- layout: image image: /ridiculous.png backgroundSize: 49% --- + + --- layout: fact --- @@ -375,6 +572,10 @@ layout: fact + + --- layout: image-right image: https://images.unsplash.com/photo-1674027444485-cec3da58eef4?q=80&w=1932&auto=format&fit=crop&ixlib=rb-4.0.3 @@ -389,6 +590,19 @@ class: flex items-center text-xl - "Dummy" - Django 5.2 🤞 - Backport for 4.2+ + + + --- layout: center --- @@ -419,7 +633,7 @@ for user in page.subscribers.iterator(): send_email_to_user.delay(user) ``` -```python {all|7-9,20|all} +```python from django.contrib.auth.models import User from django.core.mail import send_mail from django.template.loader import render_to_string @@ -449,6 +663,21 @@ for user in page.subscribers.iterator(): } + + --- layout: center --- @@ -481,6 +710,16 @@ EMAIL_BACKEND = "django.core.mail.backends.tasks.SMTPEmailBackend" + + --- layout: image-right image: /soon.png @@ -489,6 +728,20 @@ class: flex justify-center text-2xl flex-col # Q: Why something new? + + --- layout: image-right image: https://images.unsplash.com/photo-1525683879097-8babce1c602a?q=80&w=1335&auto=format&fit=crop&ixlib=rb-4.0.3 @@ -504,6 +757,32 @@ class: flex justify-center text-xl flex-col - Use what's already there - A common API + + --- layout: center transition: fade @@ -524,6 +803,14 @@ transition: fade } + + --- layout: center --- @@ -543,6 +830,20 @@ layout: center } + + --- layout: section --- @@ -555,26 +856,46 @@ image: /dep.png --- --- -layout: cover +layout: section --- # `pip install django-tasks` -
- +
+
+ + --- layout: section --- # Where will we be _soon_â„¢? + + --- layout: cover background: /celery.svg @@ -589,6 +910,16 @@ background: /celery.svg } + --- layout: image-right @@ -608,6 +939,15 @@ class: flex justify-center flex-col text-xl - Swappable argument serialization - ... + + --- layout: cover background: https://images.unsplash.com/photo-1519187903022-c0055ec4036a?q=80&w=1335&auto=format&fit=crop&ixlib=rb-4.0.3 @@ -615,6 +955,19 @@ background: https://images.unsplash.com/photo-1519187903022-c0055ec4036a?q=80&w= # The future is bright + + --- layout: section --- @@ -630,6 +983,21 @@ layout: section />
+ + --- layout: end ---