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
310
Cache Me If You Can
leejones
2
320
Packaging Rails Applications
leejones
0
61
Other Decks in Programming
See All in Programming
DataStoreをテストする
mkeeda
0
270
データベースエンジニアの仕事を楽にする。PgAssistantの紹介
nnaka2992
9
4.4k
Preact、HooksとSignalsの両立 / Preact: Harmonizing Hooks and Signals
ssssota
1
1.2k
タイムゾーンの奥地は思ったよりも闇深いかもしれない
suguruooki
1
240
Windows版PHPのビルド手順とPHP 8.4における変更点
matsuo_atsushi
0
390
MCP世界への招待: AIエンジニアが創る次世代エージェント連携の世界
gunta
4
850
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
1.2k
PHPでお金を扱う時、終わりのない 謎の1円調査の旅にでなくて済む方法
nakka
4
1.4k
snacks.nvim内のセットアップ不要なプラグインを紹介 / introduce_snacks_nvim
uhooi
0
380
Devinのメモリ活用の学びを自社サービスにどう組み込むか?
itarutomy
0
1.9k
WordPress Playground for Developers
iambherulal
0
130
Chrome Extension Techniques from Hell
moznion
1
150
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1369
200k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
Testing 201, or: Great Expectations
jmmastey
42
7.4k
Gamification - CAS2011
davidbonilla
81
5.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
25k
Being A Developer After 40
akosma
90
590k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
Visualization
eitanlees
146
16k
Building an army of robots
kneath
304
45k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Six Lessons from altMBA
skipperchong
27
3.7k
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