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
340
なぜ 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
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
180
RubyKaigi 2024 LT: Visualize the internal state of ruby processes in Real-Time
hogelog
0
220
Talk about CI and testing of the STORES
hogelog
2
540
小3の子がいるエンジニアの昔と今。
hogelog
0
1.4k
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
自分相手にアプリケーションをつくり得られるもの
hogelog
0
1k
Other Decks in Technology
See All in Technology
ペアーズにおける評価ドリブンな AI Agent 開発のご紹介
fukubaka0825
7
2k
AI駆動で進化する開発プロセス ~クラスメソッドでの実践と成功事例~ / aidd-in-classmethod
tomoki10
1
800
Simplify! 10 ways to reduce complexity in software development
ufried
1
190
AI-in-the-Enterprise|OpenAIが公開した「AI導入7つの教訓」——ChatGPTで変わる企業の未来とは?
customercloud
PRO
0
110
Compose におけるパスワード自動入力とパスワード保存
tonionagauzzi
0
190
地味にいろいろあった! 2025春のAmazon Bedrockアップデートおさらい
minorun365
PRO
2
550
コードや知識を組み込む / Incorporating Codes and Knowledge
ks91
PRO
0
160
日経電子版 for Android の技術的課題と取り組み(令和最新版)/android-20250423
nikkei_engineer_recruiting
1
610
Computer Use〜OpenAIとAnthropicの比較と将来の展望〜
pharma_x_tech
6
960
より良い開発者体験を実現するために~開発初心者が感じた生成AIの可能性~
masakiokuda
0
230
Databricksで完全履修!オールインワンレイクハウスは実在した!
akuwano
0
140
クラウド開発環境Cloud Workstationsの紹介
yunosukey
0
220
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
Bash Introduction
62gerente
612
210k
Unsuck your backbone
ammeep
671
57k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.5k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
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を理解してみよう! - というワークショップをします、よろしくおねがいし ます