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
Webmachine (Ruby)
Search
Paweł Pacana
March 12, 2013
Programming
1
260
Webmachine (Ruby)
presented on KRUG
Paweł Pacana
March 12, 2013
Tweet
Share
More Decks by Paweł Pacana
See All by Paweł Pacana
DRUG Facts
pawelpacana
2
240
Other Decks in Programming
See All in Programming
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
200
レイトレ合宿10 レンダラー紹介 / Renderer Introduction, Ray Tracing Camp 10
shocker_0x15
0
630
【YAPC::Hakodate 2024】TypeScriptエンジニアが感じたPerlのここが面白い
kimitashoichi
1
480
rtcamp 10 (vk-illuminati)
yumcyawiz
1
210
Competitionsだけじゃない! Kaggle Notebooks Grandmasterのすすめ
corochann
2
930
CSC305 Lecture 09
javiergs
PRO
0
110
Scan with Decoupled Look-back and Onesweep Radix Sort
shocker_0x15
0
150
ML-прайсинг_на_Lamoda__вошли_и_вышли__приключение_на_20_минут__Слава_Цыганков.pdf
lamodatech
0
390
Mercari AI/LLM Hackathon TeamBの発表資料
imaikosuke
0
180
App Store Connect APIで 作業時間を増やそう
mot_techtalk
3
130
The future of development – Are our jobs getting harder or easier?
hollycummins
1
190
MLOps in Mercari Group’s Trust and Safety ML Team
cjhj
1
130
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Rails Girls Zürich Keynote
gr2m
93
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
The World Runs on Bad Software
bkeepers
PRO
65
11k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Faster Mobile Websites
deanohume
304
30k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.6k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Gamification - CAS2011
davidbonilla
80
5k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
Transcript
WEBMACHINE THE HTTP TOOLKIT IN RUBY @pawelpacana
I’m not a native speaker DISCLAIMER
HTTP 1.1 SPEC RFC2616
TOOLKIT • „A toolkit for easily creating well- behaved HTTP
applications” • not a framework • Sinatra vs. Rails • extracted from Riak
RACK INTERFACE app = proc { |env| [ 200, #
Status {'Content-Type' => 'text/plain'}, # Headers ["Hello World!"] # Body ] }
RACK MIDDLEWARE • Head, ContentLength, ContentType, Deflater, …
HTTP IS HARD
WEBMACHINE • FSM modelling HTTP • negotiate hard decisions transparently
HTTP IS RESOURCES • data or service • identified by
URI • representations
WEBMACHINE • resources as a core building block • declare
resources, don’t perform actions • resource callbacks
EXAMPLES show me the code
ADAPTERS • WEBrick • Mongrel • Rack* • Reel •
Hatetepe
ECOSYSTEM • webmachine-test • webmachine-linking • webmachine-actionview • webmachine-sprockets •
irwebmachine
MY OBSERVATIONS • good as HTTP content delivery mechanism in
Ports and Adapters architecture • good for Hypermedia APIs • small enough to read and trust it
GOING DEEPER http://bit.ly/resources-for-real-this-time
THANK YOU @pawelpacana
DRUG #40 NEXT MONDAY 19:00 http://drug.org.pl