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
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
320
Getting Started with Docker
leejones
0
320
Cache Me If You Can
leejones
2
340
Packaging Rails Applications
leejones
0
63
Other Decks in Programming
See All in Programming
Cache Me If You Can
ryunen344
2
3k
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
290
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.9k
個人軟體時代
ethanhuang13
0
330
概念モデル→論理モデルで気をつけていること
sunnyone
3
290
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
560
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
AWS発のAIエディタKiroを使ってみた
iriikeita
1
190
為你自己學 Python - 冷知識篇
eddie
1
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
400
意外と簡単!?フロントエンドでパスキー認証を実現する WebAuthn
teamlab
PRO
2
770
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Scaling GitHub
holman
463
140k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Large-scale JavaScript Application Architecture
addyosmani
513
110k
We Have a Design System, Now What?
morganepeng
53
7.8k
Making Projects Easy
brettharned
117
6.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
RailsConf 2023
tenderlove
30
1.2k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Unsuck your backbone
ammeep
671
58k
GraphQLとの向き合い方2022年版
quramy
49
14k
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