Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
UW Advanced Rails Week 5
Search
Ben Woodall
April 30, 2015
Programming
82
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
UW Advanced Rails Week 5
Ben Woodall
April 30, 2015
More Decks by Ben Woodall
See All by Ben Woodall
UW Advanced Rails Week 9
benwoodall
0
69
UW Advanced Rails Week 8
benwoodall
0
72
UW Advanced Rails Week 7
benwoodall
0
73
Week 6
benwoodall
0
79
UW Advanced Rails Week 4
benwoodall
0
87
UW Advanced Rails Week 3
benwoodall
0
93
UW Advanced Rails Week 2
benwoodall
0
250
UW Advanced Rails Week 1
benwoodall
0
130
A Bit More Git
benwoodall
1
5.1k
Other Decks in Programming
See All in Programming
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.8k
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
3.5k
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
310
小さなアプリを作って公開するまで
onozaty
0
140
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
240
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
protojson における文字化けの扱い
kazuki1023
0
200
Spec-driven Development with AI
simas
PRO
0
2.3k
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
300
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
110
AmebaブログはKMPから卒業します
kmars0605
0
340
Seven New Principles of Software Engineering
yegor256
0
470
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
A Tale of Four Properties
chriscoyier
163
24k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
3
1.2k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280
Tell your own story through comics
letsgokoyo
1
1.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
Building an army of robots
kneath
307
47k
Making Projects Easy
brettharned
120
6.8k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Transcript
Questions from Week 4? 1
Week 5: Background Jobs Spring 2015 2
What are Background Jobs? 3
What are Background Jobs? Process that are run in the
background Independent from our Rails app 4
When should you use Background Jobs? 5
When should you use Background Jobs? 6
Long Running Requests/ Processes 7
Long Running Requests/ Processes HTTP requests outside of your app
Image/Video Processing 8
Tasks to be Run at a Later Date 9
Tasks to be Run at a Later Date Mailers Billing
Analytics Building Cleanup 10
How do Background Jobs Work? Queueing systems First In, First
Out (FIFO) 11
Active Job Introduced in Rails 4 Provides an interface for
queueing backends 12
Common Queueing Adapters Delayed Job github.com/collectiveidea/delayed_job Resque github.com/resque/resque Sidekiq http://sidekiq.org/
13
Delayed Job Pros Created by Shopify Very mature product. Well
maintained. Very simple to add, no external services Uses ActiveRecord for queueing 14
Delayed Job Cons Uses ActiveRecord for queueing Requires a separate
worker to check queues No Web-ui 15
Resque Pros Created by Github Well maintained. Asynchronous Doesn’t use
ActiveRecord Built in Web-ui Uses Redis 16
Resque Cons Harder to setup* Redis dependency 17
Sidekiq Pros Built in Web-ui Multi-threaded Uses Redis for queueing
18
Sidekiq Cons Harder to setup Redis dependency Thread Safety Not
Guaranteed! 19
Using Background Jobs in Shortener 20
Background Jobs Welcome Email Tweeting when creating links Weekly User
Stats 21
Adding sidekiq 22 Gemfile config/application.rb
Procfile with Foreman 23 Gemfile .foreman
Sidekiq Web View 24 Gemfile config/routes.rb
Sending Mail Later 25 app/controllers/users_controller.rb
Generate a Job 26
Twitter Job 27 app/controllers/links_controller.rb app/jobs/twitter_job.rb
Running Twitter Jobs 28 app/controllers/links_controller.rb
Failing Specs :( 29
30 specs/controllers/users_controller_spec.rb
31 app/controllers/links_controller_spec.rb
Cron Based Jobs 32 app/controllers/links_controller.rb config/schedule.rb
Cron Based Jobs 33 lib/tasks/email/weekly_tasks.rake