著者
松本 亮介 岡部 寿男
出版者
一般社団法人情報処理学会
雑誌
情報処理学会論文誌 (ISSN:18827764)
巻号頁・発行日
vol.55, no.11, pp.2451-2460, 2014-11-15

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".

言及状況

Twitter (1 users, 1 posts, 1 favorites)

CiNii 論文 -  mod_mruby:スクリプト言語で高速かつ省メモリに拡張可能なWebサーバの機能拡張支援機構 http://t.co/9DBOfUbYVS #CiNii #hackt #hackt_k

収集済み URL リスト