Goal
Teach queues with a real reason.
The first worker should exist because email, notifications, previews, or retries became awkward inside normal API handlers.
Build
- Notifications for replies and mentions.
- Email notification jobs.
- Go worker process that consumes queued jobs.
- Retry behavior and failure recording.
Concepts
- Queues and workers.
- Idempotency.
- Retries and backoff.
- Dead-letter queues.
- Event-driven systems.
Prompt stub
Expansion prompt
Add background jobs for notifications.
Keep the first queue simple.
Explain idempotency and retry behavior in beginner language.
Do not split the backend into microservices yet.Done means
- Notifications are created without slowing normal requests.
- Failed jobs can retry and be inspected.
- The learner knows why a queue is different from a function call.
- The app still deploys in a simple low-cost way.