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
330
1
Share
Webmachine (Ruby)
presented on KRUG
Paweł Pacana
March 12, 2013
More Decks by Paweł Pacana
See All by Paweł Pacana
DRUG Facts
pawelpacana
2
260
Other Decks in Programming
See All in Programming
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
220
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
2k
tsserverとは何だったのか_これからどうなるのか
nowaki28
0
190
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
460
GitHubCopilotCLIをはじめよう.pdf
htkym
0
340
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
870
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
0
190
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
3
240
関係性から理解する"同一性"の型用語たち
pvcresin
1
220
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
0
270
Cloudflare で始める Data Platform
ta93abe
0
190
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
590
We Are The Robots
honzajavorek
0
230
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
690
RailsConf 2023
tenderlove
30
1.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Navigating Weather and Climate Data
rabernat
0
190
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
How STYLIGHT went responsive
nonsquared
100
6.1k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
370
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