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
The Worker Pattern
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Lee Jones
March 07, 2013
Programming
1
340
The Worker Pattern
A Lightning Talk I gave at the March 7, 2013 Nashville Ruby on Rails Meetup.
Lee Jones
March 07, 2013
Tweet
Share
More Decks by Lee Jones
See All by Lee Jones
Continuous Improvement
leejones
1
330
Getting Started with Docker
leejones
0
330
Cache Me If You Can
leejones
2
360
Packaging Rails Applications
leejones
0
66
Other Decks in Programming
See All in Programming
AI時代の認知負荷との向き合い方
optfit
0
140
CSC307 Lecture 05
javiergs
PRO
0
490
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.9k
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
CSC307 Lecture 01
javiergs
PRO
0
680
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
240
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
Fragmented Architectures
denyspoltorak
0
140
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
600
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
680
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
5.8k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
Claude Code のすすめ
schroneko
67
210k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
Raft: Consensus for Rubyists
vanstee
141
7.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Why Our Code Smells
bkeepers
PRO
340
58k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Transcript
The Worker Pattern Thursday, March 7, 13
Confession Thursday, March 7, 13
BACKGROUND ALL THE THINGS! Thursday, March 7, 13
Request work •••••••••••• Thursday, March 7, 13
Example Acme API Feed * item 1 * item 2
* item 3 ... Thursday, March 7, 13
class AcmeIntegrationController def index api = AcmeAPI.new(user_token) @feed = api.get_user_feed
end end Thursday, March 7, 13
I heard you requests... so i put a request inside
your request Thursday, March 7, 13
class AcmeIntegrationController def index if fragment.exists? @feed = fragment.data else
fragment.fetch_in_background @feed = nil end ... Thursday, March 7, 13
# app/views/acme_integration/index.html <% if @feed.present? -%> <%= render @feed %>
<% else -%> <%= feed_fragment_helper %> <% end -%> Thursday, March 7, 13
Example Acme API Feed loading... Thursday, March 7, 13
http status 204 http://httpstatus.es/204 Thursday, March 7, 13
Example Acme API Feed * item 1 * item 2
* item 3 ... Thursday, March 7, 13
The Worker Pattern resources Ryan Smith: * slides: rails conf
2010 * Video: talk at waza 2011 Rack Worker on Github speakerdeck.com/leejones ••• Thursday, March 7, 13