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
mrubyとWebサーバ
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
MATSUMOTO Ryosuke
PRO
June 22, 2013
Programming
1.3k
6
Share
mrubyとWebサーバ
mrubyをWebサーバソフトウェアに組み込む
MATSUMOTO Ryosuke
PRO
June 22, 2013
More Decks by MATSUMOTO Ryosuke
See All by MATSUMOTO Ryosuke
問いを起点に、社会と共鳴する知を育む場へ
matsumoto_r
PRO
0
800
さくらインターネット研究所 アップデート2025年
matsumoto_r
PRO
0
870
リモートワークにおけるパッシブ疲労
matsumoto_r
PRO
6
5.5k
エンジニアのキャリアパスはどう描く? まつもとりーさんと考える後悔しないキャリア選択
matsumoto_r
PRO
10
2.4k
まつもとりーのこれまでとCOGNANOのこれから
matsumoto_r
PRO
0
360
2022年の研究所の評価制度振り返りと今後
matsumoto_r
PRO
0
880
VUCAワールドから紐解く組織や評価制度の変遷と再設計
matsumoto_r
PRO
9
26k
コンテナの研究開発から学ぶLinuxの要素技術
matsumoto_r
PRO
2
1.6k
開発者体験をさらに向上させる 事業と研究との連携
matsumoto_r
PRO
2
2.5k
Other Decks in Programming
See All in Programming
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
150
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
260
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
840
Coding as Prompting Since 2025
ragingwind
0
820
存在論的プログラミング: 時間と存在を記述する
koriym
5
860
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
Swift Concurrency Type System
inamiy
0
480
飯MCP
yusukebe
0
500
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
890
Java 21/25 Virtual Threads 소개
debop
0
340
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
190
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
160
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
190
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
93
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
130
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
710
Building an army of robots
kneath
306
46k
[SF Ruby Conf 2025] Rails X
palkan
2
940
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
Odyssey Design
rkendrick25
PRO
2
570
WENDY [Excerpt]
tessaabrams
9
37k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
150
Transcript
mrubyとWebサーバ Kyoto University okabe lab MATSUMOTO, Ryosuke
• 松本 亮介 (@matsumotory) • 京都大学 岡部研 博士課程
– ウェブサーバの高度化に耐えうる基盤設計 – 大規模、運用、セキュリティ、性能、拡張 • フリーランスエンジニア
Agenda • mrubyの概要 • mod_mrubyとngx_mruby • ab-‐mruby
mrubyの概要 • 組み込みスクリプト言語 – C/C++ホストアプリケーションを主 • 最適化が容易
– Pluggable、組み込みAPI • 拡張の書きやすさ – mrubyをC実装のフレームワークのようにも使える • 応用範囲が広い – 組み込み機器、アプリ組み込み • 数年後を見据えて – mrubyの要求するスペックに組み込み機器が追いつく
mod_mrubyとngx_mruby • Apache、nginxモジュールをRubyで書ける – Rubyの記述による生産性の向上 – Webサーバを容易に拡張 • 高速性・軽量性
– ApacheCon NA 2013でmod_luaと速度比較された – mod_mrubyをかなり意識 • Rubyアプリの延長でWebサーバ拡張 – Webサーバソフトウェアの違いをmrubyで吸収 – mrubyによるWebサーバ拡張記述の標準化
VirtualHost by mod_mruby
Proxy by mod_mruby
BasicAuth by mod_mruby
BasicAuth with Redis by mod_mruby
suEXEC by mod_mruby
Access control by traffic
demo • Apacheの内部情報をmod_mrubyでAPI化 • node.jsからAPI経由で情報をグラフ化 • hYp://mon.matsumoto-‐r.jp/ Apache
api.rb (Ruby) node.js browser WebSocket JSON mod_mruby
ab-‐mruby • abコマンドのmruby拡張 • Rubyでベンチマークパターンを記述 • Rubyでテストスイートを記述
• URLを元に動的に記述できる
ベンチマークパターン
テストスイート
ab-‐mruby実行 ab-‐mruby –m config.rb -‐M test.rb hYp://192.168.12.251/
まとめ • mod_mrubyとngx_mruby – Webサーバ拡張の敷居を下げたい – 高速性・軽量性
– mod_mruby、ngx_mrubyによる拡張記述標準化 • Register Underflow (hYps://registerunderflow.org/) – Stack Overflowのようなコンピュータ技術共有サイト – 日本語版 TwiYer: @matsumotory