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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ben Woodall
April 30, 2015
Programming
78
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
61
UW Advanced Rails Week 8
benwoodall
0
67
UW Advanced Rails Week 7
benwoodall
0
70
Week 6
benwoodall
0
71
UW Advanced Rails Week 4
benwoodall
0
85
UW Advanced Rails Week 3
benwoodall
0
87
UW Advanced Rails Week 2
benwoodall
0
250
UW Advanced Rails Week 1
benwoodall
0
120
A Bit More Git
benwoodall
1
5.1k
Other Decks in Programming
See All in Programming
ActionController meets Protocol Buffers
sorah
0
530
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
310
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
910
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
APNsからLive Activityを開始する話
yumnumm
0
170
The Rails Doctrine Decade
koic
2
590
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
0
170
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
Domain-Driven Transformation
hschwentner
2
2.3k
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
ラッコキーワード サービス紹介資料
rakko
1
5.3M
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
GraphQLとの向き合い方2022年版
quramy
50
15k
YesSQL, Process and Tooling at Scale
rocio
174
15k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
The browser strikes back
jonoalderson
0
1.8k
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