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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
hogelog
October 15, 2024
Technology
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
なぜ Rack を理解すべきかプレトーク / Why should you understand Rack - Pre-talk
2024-10-15 Kaigi on Rails 2024 タイムテーブル解説会
hogelog
October 15, 2024
More Decks by hogelog
See All by hogelog
スマホでゲームをするか、漫画を読むか、開発をするか / Gaming, Reading or Coding on my phone.
hogelog
1
140
dentaku - Ruby製の電卓CLI / dentaku - A Ruby CLI Calculator
hogelog
0
65
"複雑なデータ処理 × 静的サイト" を両立させる、楽をするRails運用 / A low-effort Rails workflow that combines “Complex Data Processing × Static Sites”
hogelog
3
6.5k
Javaアプリケーションの配布とパッケージング / Distribution and packaging of Java applications
hogelog
4
1k
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
1.3k
ruby/irbへのコントリビュートと愉快な仲間たち / RubyKaigi 2024 Wrap Party
hogelog
0
270
RubyKaigi 2024 LT: Visualize the internal state of ruby processes in Real-Time
hogelog
0
340
Talk about CI and testing of the STORES
hogelog
2
640
小3の子がいるエンジニアの昔と今。
hogelog
0
1.8k
Other Decks in Technology
See All in Technology
QAエンジニア起点で進める、SmartHRにおける信頼性向上について
kaomi_wombat
1
140
Bits Agent Builder の⼊⾨と活⽤事例
nulabinc
PRO
0
140
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
150
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
240
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
認知負荷をGemini で溶かす — GKE 基盤「Orbit」における AI エージェントの実践
sansantech
PRO
1
300
ホームラボ紹介
y_sera15
0
160
攻撃と防御で学ぶAI時代のプロダクトセキュリティ演習
recruitengineers
PRO
9
2.7k
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.2k
まちスペース®とデジタルツインと「まちづくり」
hiro_ogi
0
110
私がブラウザを自作したくなった理由
supurazako
1
230
LLM・AIエージェントシステムベストプラクティス
shibuiwilliam
6
1.2k
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
9
900
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
260
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
460
Building an army of robots
kneath
306
46k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
170
Prompt Engineering for Job Search
mfonobong
0
400
Measuring & Analyzing Core Web Vitals
bluesmoon
9
950
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
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を理解してみよう! - というワークショップをします、よろしくおねがいし ます