Inside ActiveJob
summary
Explains how ActiveJob serializes jobs, uses a thread-safe map and per-queue thread pools, and builds an async job processor from scratch that calls ActiveJob::Base.execute; shows how scheduled tasks use ScheduledTask with an executor and why most processors persist to Redis while the demo keeps everything in memory for dev/test. Demonstrates runnable code (the core fits on one slide), compares Sucker Punch and Sidekiq, and highlights error, shutdown, and thread-safety tradeoffs so viewers can tell if they need the details.
AI-written summary · about
chapters (10)
- 0:00Start
- 1:04Concurrent Ruby
- 2:30What Is Active Job
- 4:12Impetus for Active Job
- 11:01Queue Adapter in the Job Runner
- 13:16Job Metadata
- 13:31Queue Name
- 17:10Thread Safety
- 17:45Consistency
- 33:52Resource Contention
related talks
17mActiveJob: A Service Oriented Architecture
39mAsynchronous Workers to the Resque
55mThe Past, Present and Future of Background Job...
35mProcesses and Threads - Resque vs. Sidekiq
28mFair by design: orchestrating background jobs in Ruby
35mSidekiq at Gusto: The Parts Where People’s Jaw Drops
31mActiveSupport and ActiveModel
34mCode Spelunking: teach yourself how Rails works
