本記事はmod_mruby ngx_mruby advent calendar 2014 20日目の記事です。 昨日は、 @inokappa さんによる「ngx_mruby で Nginx への接続数等の内部情報を取得して InfluxDB と Tasseo で可視化してみる」でした。 僕が担当した17日のアドベントカレンダー「mod_mrubyとngx_mrubyの設計思想とスクリプト間でオブジェクトを共有するためのアーキテクチャ概論」では、オブジェクトを共有しつつも、利用者が効率良く利用できるように最適化したアーキテクチャがどういうものかを説明しました。 そこで言及しつつも保留した以下の点について、今回は紹介したいと思います。 ただし、やはりインタプリタを共有するというアーキテクチャにはデメリットもあって、 グローバル変数や例外フラグ、クラス等のグローバルな状態を同一のインタプリタ上で