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
320
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
250
Other Decks in Programming
See All in Programming
Oxlintはいいぞ
yug1224
5
1.3k
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
130
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
750
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
CSC307 Lecture 09
javiergs
PRO
1
840
Package Management Learnings from Homebrew
mikemcquaid
0
230
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
Oxlint JS plugins
kazupon
1
970
AgentCoreとHuman in the Loop
har1101
5
240
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
CSC307 Lecture 06
javiergs
PRO
0
690
Fluid Templating in TYPO3 14
s2b
0
130
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Building the Perfect Custom Keyboard
takai
2
690
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
Designing Experiences People Love
moore
144
24k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
A better future with KSS
kneath
240
18k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
120
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Code Review Best Practice
trishagee
74
20k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
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