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
Lee Jones
March 07, 2013
Programming
1
330
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
320
Getting Started with Docker
leejones
0
320
Cache Me If You Can
leejones
2
330
Packaging Rails Applications
leejones
0
62
Other Decks in Programming
See All in Programming
ReadMoreTextView
fornewid
0
250
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
890
「兵法」から見る質とスピード
ickx
0
260
GoのWebAssembly活用パターン紹介
syumai
3
9.3k
漸進。
ssssota
0
1.7k
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
1
510
技術懸念に立ち向かい 法改正を穏便に乗り切った話
pop_cashew
0
1.2k
社内での開発コミュニティ活動とモジュラーモノリス標準化事例のご紹介/xPalette and Introduction of Modular monolith standardization
m4maruyama
0
110
型安全RESTで爆速プロトタイピング – Hono RPC実践
tacke_jp
0
110
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
200
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
370
レガシーシステムの機能調査・開発におけるAI利活用
takuya_ohtonari
0
560
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Producing Creativity
orderedlist
PRO
346
40k
BBQ
matthewcrist
89
9.7k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Designing for Performance
lara
609
69k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Building an army of robots
kneath
306
45k
Rails Girls Zürich Keynote
gr2m
94
14k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
910
Bash Introduction
62gerente
614
210k
Writing Fast Ruby
sferik
628
61k
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