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
なぜ Rack を理解すべきかプレトーク / Why should you understan...
Search
hogelog
October 15, 2024
Technology
0
360
なぜ Rack を理解すべきかプレトーク / Why should you understand Rack - Pre-talk
2024-10-15 Kaigi on Rails 2024 タイムテーブル解説会
hogelog
October 15, 2024
Tweet
Share
More Decks by hogelog
See All by hogelog
Javaアプリケーションの配布とパッケージング / Distribution and packaging of Java applications
hogelog
3
640
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
1.1k
ruby/irbへのコントリビュートと愉快な仲間たち / RubyKaigi 2024 Wrap Party
hogelog
0
200
RubyKaigi 2024 LT: Visualize the internal state of ruby processes in Real-Time
hogelog
0
230
Talk about CI and testing of the STORES
hogelog
2
550
小3の子がいるエンジニアの昔と今。
hogelog
0
1.5k
Kaigi_on_Rails_2022_Talk-hogelog.pdf
hogelog
6
1.5k
クックパッドインターンシップ 2018 API 編(前半)/ Cookpad internship 2018 Day 3: API
hogelog
0
9.6k
クックパッドの巨大 Rails アプリケーションの改善
hogelog
12
11k
Other Decks in Technology
See All in Technology
Contributing to Rails? Start with the Gems You Already Use
yahonda
2
110
VS CodeとGitHub Copilotで爆速開発!アップデートの波に乗るおさらい会 / Rapid Development with VS Code and GitHub Copilot: Catch the Latest Wave
yamachu
2
190
fukabori.fm 出張版: 売上高617億円と高稼働率を陰で支えた社内ツール開発のあれこれ話 / 20250704 Yoshimasa Iwase & Tomoo Morikawa
shift_evolve
PRO
2
8.1k
FOSS4G 2025 KANSAI QGISで点群データをいろいろしてみた
kou_kita
0
410
20250707-AI活用の個人差を埋めるチームづくり
shnjtk
6
4k
サイバーエージェントグループのSRE10年の歩みとAI時代の生存戦略
shotatsuge
4
450
AIの全社活用を推進するための安全なレールを敷いた話
shoheimitani
2
570
OSSのSNSツール「Misskey」をさわってみよう(右下ワイプで私のOSCの20年を振り返ります) / 20250705-osc2025-do
akkiesoft
0
170
cdk initで生成されるあのファイル達は何なのか/cdk-init-generated-files
tomoki10
0
160
Delegating the chores of authenticating users to Keycloak
ahus1
0
160
freeeのアクセシビリティの現在地 / freee's Current Position on Accessibility
ymrl
2
240
PO初心者が考えた ”POらしさ”
nb_rady
0
220
Featured
See All Featured
Building Applications with DynamoDB
mza
95
6.5k
Into the Great Unknown - MozCon
thekraken
40
1.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Why Our Code Smells
bkeepers
PRO
336
57k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Embracing the Ebb and Flow
colly
86
4.7k
Transcript
@hogelog 2024-10-15 Kaigi on Rails 2024 タイムテーブル解説会 なぜ Rack を理解すべきかプレトーク
なまえなど 2 - @hogelog (GitHub, Twitter X, 社, …) -
小室 直 (Komuro Sunao) - STORES 株式会社 ソフトウェアエンジニア
私とKaigi on Rails 3 - Kaigi on Rails 2022に登壇 -
オンライン、事前収録 - むずかしかった!
私とKaigi on Rails 4 - Kaigi on Rails 2024ワークショップ登壇(登壇?) -
Kaigi on Railsはじめてのワークショップ - おそらくまだ若干名の空きが……? (なかったらごめんなさい)
Rackとは
Rackとはなんですか 6 - RubyでHTTPアプリケーションを書くインターフェース - RackアプリケーションはHashを受け取り配列を返すだけ class HelloRack def call(env)
# CGI-style environment [ 200, # status {"content-type" => "text/html" }, # headers ["Hello, Rack!" ], # body ] end end
Rackアプリケーションを動かすRackアプリケーションサーバ 7 class HelloRack def call(env) # CGI-style environment [
200, # status {"content-type" => "text/html" }, # headers ["Hello, Rack!" ], # body ] end end
Rackアプリケーションを動かすRackアプリケーションサーバ 8 - Puma, Pitchfork, Unicorn, Thin, … class HelloRack
def call(env) # CGI-style environment [ 200, # status {"content-type" => "text/html" }, # headers ["Hello, Rack!" ], # body ] end end run HelloRack .new
Rails on Rack 9 - RailsはRackアプリケーションを記述するフレームワーク - `Rails .application` がRackアプリケーション
- Railsの多くはRackミドルウェアとして実装されている - `bin/rails middleware` require_relative "config/environment" run Rails .application Rails .application.load_server
よくあるRailsエンジニアの業務 10 - Rackアプリケーション: 書く - Rackミドルウェア: たまに書く - Rackサーバ:
あまり書かない
Rackアプリケーションサーバを理解する 11 - Rackをアプリケーション、ミドルウェア、サーバまで 一通り実装してみてRackを理解してみよう! - というワークショップをします、よろしくおねがいし ます