Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
UW Advanced Rails Week 5
Search
Ben Woodall
April 30, 2015
Programming
0
56
UW Advanced Rails Week 5
Ben Woodall
April 30, 2015
Tweet
Share
More Decks by Ben Woodall
See All by Ben Woodall
UW Advanced Rails Week 9
benwoodall
0
42
UW Advanced Rails Week 8
benwoodall
0
49
UW Advanced Rails Week 7
benwoodall
0
46
Week 6
benwoodall
0
47
UW Advanced Rails Week 4
benwoodall
0
69
UW Advanced Rails Week 3
benwoodall
0
68
UW Advanced Rails Week 2
benwoodall
0
180
UW Advanced Rails Week 1
benwoodall
0
98
A Bit More Git
benwoodall
1
5.1k
Other Decks in Programming
See All in Programming
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
9
5.8k
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
2
220
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
300
開発に寄りそう自動テストの実現
goyoki
2
1.2k
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.9k
FluorTracer / RayTracingCamp11
kugimasa
0
240
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
220
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.1k
エディターってAIで操作できるんだぜ
kis9a
0
740
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
120
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
110
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
280
Claude Code のすすめ
schroneko
65
200k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
29
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
170
How GitHub (no longer) Works
holman
316
140k
Prompt Engineering for Job Search
mfonobong
0
110
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
860
Agile that works and the tools we love
rasmusluckow
331
21k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
0
38
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
170
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