Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
UW Advanced Rails Week 5
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ben Woodall
April 30, 2015
Programming
61
0
Share
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
47
UW Advanced Rails Week 8
benwoodall
0
54
UW Advanced Rails Week 7
benwoodall
0
51
Week 6
benwoodall
0
54
UW Advanced Rails Week 4
benwoodall
0
74
UW Advanced Rails Week 3
benwoodall
0
74
UW Advanced Rails Week 2
benwoodall
0
200
UW Advanced Rails Week 1
benwoodall
0
100
A Bit More Git
benwoodall
1
5.1k
Other Decks in Programming
See All in Programming
when storing skills in S3 file
watany
3
1.3k
ハーネスエンジニアリングとは?
kinopeee
13
6.8k
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
420
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
150
GitHubCopilotCLIをはじめよう.pdf
htkym
0
320
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
240
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
310
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
330
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1k
10 Tips of AWS ~Gen AI on AWS~
licux
5
540
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
360
Making the RBS Parser Faster
soutaro
0
660
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
190
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Design in an AI World
tapps
1
210
Marketing to machines
jonoalderson
1
5.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
230
Unsuck your backbone
ammeep
672
58k
My Coaching Mixtape
mlcsv
0
120
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
340
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
180
Thoughts on Productivity
jonyablonski
76
5.1k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
490
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
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