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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Lee Jones
March 07, 2013
Programming
350
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Worker Pattern
A Lightning Talk I gave at the March 7, 2013 Nashville Ruby on Rails Meetup.
Lee Jones
March 07, 2013
More Decks by Lee Jones
See All by Lee Jones
Continuous Improvement
leejones
1
340
Getting Started with Docker
leejones
0
340
Cache Me If You Can
leejones
2
370
Packaging Rails Applications
leejones
0
70
Other Decks in Programming
See All in Programming
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.9k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
170
OSもどきOS
arkw
0
470
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
Webフレームワークの ベンチマークについて
yusukebe
0
150
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
Vite+ Unified Toolchain for the Web
naokihaba
0
220
Claspは野良GASの夢をみるか
takter00
0
180
スマートグラスで並列バイブコーディング
hyshu
0
110
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
AI時代のUIはどこへ行く?その2!
yusukebe
20
7k
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
A Tale of Four Properties
chriscoyier
163
24k
ラッコキーワード サービス紹介資料
rakko
1
3.6M
30 Presentation Tips
portentint
PRO
1
320
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
Documentation Writing (for coders)
carmenintech
77
5.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Making Projects Easy
brettharned
120
6.7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
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