@inproceedings{oai:ipsj.ixsq.nii.ac.jp:00096465,
 author = {松本, 亮介 and 岡部, 寿男 and Ryosuke, Matsumoto and Yasuo, Okabe},
 book = {インターネットと運用技術シンポジウム2013論文集},
 month = {Dec},
 note = {Web サービスの大規模・複雑化に伴い,Web アプリケーションの開発だけでなく,Web サーバソフトウェアの機能拡張も必要になる場合が多い.Web サーバの機能拡張において,高速かつ軽量に動作する事を重視した場合,C 言語による実装が主流であったが,生産性や保守性を考慮した場合はスクリプト言語で機能拡張を行う手法も提供されている.しかし,従来手法は,Web アプリケーションの実装だけでなく,Web サーバの内部処理を拡張する事を主目的とした場合,高速性・省メモリ・安全性の面で課題が残る.そこで,スクリプ卜言語で安全に機能拡張でき,かつ,高速・省メモリに動作する Web サーバの機能拡張支援機構を提案する.Web サーバプロセスから内部処理としてスクリプトが呼び出された際,高速に処理するために,インタプリタの状態を保存する状態遷移保存領域の生成を,サーバプロセス起動時に生成しておいて,それを複数のスクリプ卜で共有して実行するアーキテクチャをとった.また,メモリ増加量を低減し,かつ,状態遷移保存領域を共有する事により生じるスクリプト間の干渉を防止して安全に機能拡張するために,スクリプト実行後に状態遷移保存領域からメモリ増加の原因となるバイトコード,及び,任意のグローバル変数・例外フラグを開放するようにした.このアーキテクチャの実装には,組み込みスクリプト言語 mruby と Apache を利用し,Ruby スクリプトによって容易に Apache 内部の機能拡張を行えるようにした.この Apache の機能拡張支援機構を mod_mruby と呼ぶ事にする., As the increase of large-scale and complex Web services, not only a development of Web applications but also an implementation of Web server extensions is required in many cases. The Web server extensions were mainly implemented in C language because of fast and memory-efficient behavior, and extension methods using scripting language also are provided with consideration of maintainability and productivity. However, if the existing methods primarily intended to enhance not the implementation of Web applications but the implementation of internal processing of the Web server, the problem remains in terms of fast, memory-efficiency and safety. Therefore, we propose a fast and memory-efficient Web server extension mechanism using scripting language. We design the architecture that a server process create the region to save the state of the interpreter at the server process startup, and multiple scripts share the region in order to process fast when the script is called as internal processing from a Web server process. The server process free any global variables, the exception flag and the byte-code which cause the increase of memory usage mainly, in order to reduce the memory usage and extend safely by preventing interference between each scripts because of sharing the region. We implement the mechanism that can extend the internal processing of Apache easily by Ruby scripts using Apache and embeddable scripting language mruby. It's called "mod_mruby".},
 pages = {79--86},
 publisher = {情報処理学会},
 title = {mod_mruby: スクリプト言語で高速かつ省メモリに拡張可能なWebサーバの機能拡張支援機構},
 volume = {2013},
 year = {2013}
}