On 01/20/2013 10:31 AM, MATSUMOTO Ryosuke wrote:
> Hi, all
> 
> I'm Ryosuke MATSUMOTO, a Ph.D. student at Okabe Lab,  Network
> Media Group Department of Intelligence Science and Technology
> Graduate School of Informatics, Kyoto University in Japan.
> 
> My English is not very good, but I am studying at the moment to communicate
> developers of the world.
> 
> I have been developing mod_mruby and ngx_mruby from Apr 2012.
> 
> mod_mruby is a web server extension mechanism using embeddable
> scripting language mruby which has been attracting attention now.
> 
> mod_mruby abstract:
> -----
> As the increase of services using Web servers, the number of incidents
> also is increasing rapidly. In order to solve those problems, it is necessary
> to extend a functionality of a Web server software.
> 
> In case of using Apache, developers are required high coding skill of C
> language and internal specifications of Apache in order to extend the
> functionality of it.
> 
> The development of a web server extension requires some high skills, and
> the maintainability is low since that extension need to compile a code.
> 
> Therefore, we propose mod_mruby that is a web server extension mechanism
> using embeddable scripting language mruby which has been attracting
> attention now. mod_mruby allows to extend the functionality of Apache
> easily by implementing a mruby script. mod_mruby provides an interface
> to hook and execute any mruby scripts in the various phases of processing
> requests inside Apache. When hooking mruby scripts, mruby scripts can
> process the data of processing requests inside Apache, taking advantage
> of the characteristics of a embeddable scripting language for C language.
> 
> We have designed that mod_mruby run at high speed by sharing the data
> of state transition and the extension library of mruby by multiple
> mruby scripts
> and using only different byte code each mruby script.
> 
> Many developers can implement a web server extension easily by mod_mruby
>  in cooperation with coding style of mruby which is the same as object 
> oriented
>  programming ruby which is widely used by web developers.
> -----
> 
> see slide share about mod_mruby architecture and performance compared with
> mod_lua, mod_per, and a module written by C language.(Sorry in Japanese)
> 
> http://www.slideshare.net/matsumoto_r/mrubyweb
> 
<snip>

Hi, Matsumoto,

Your project does indeed look interesting, and for those more accustomed
to Ruby, perhaps this is a good alternative.

I have tried to compile and install mod_mruby on my own machine to test
it, but there are too many compiler errors for it to work :( In
particular, you have a lot of declarations after statements in your
code, which is not C90 compliant, and needs fixing. There are also some
errors that force the source code to use 2.2 standards when compiling it
for 2.4 or 2.5 - this also needs to be addressed:

ap_mrb_connection.c:31 says: #ifdef __APACHE24__
This should probably change to: #if (AP_SERVER_MINORVERSION_NUMBER > 2)

I am very interested in how you got to the benchmark results you did.
Statistically speaking, Ruby is a very slow language compared to Lua
(and in particular LuaJIT which is extremely fast - if you attend my
talk at ACNA, I'll show you just how fast ;) ). Which optimizations did
you make to the configuration? Which scopes and code caching options did
you use for your testing? Did you test mod_lua fom the 2.4 branch or the
trunk?

I'd also be interested in an English version of your slides, as there
may be things to learn from it :)

We embrace competition here at Apache, so mod_mruby is a most welcome
addition, however I'd really like to get my hands on a working copy, so
I can test it out and see what it can really do. One advantage that I
could see from the source code is the ability to hook into the logging
part of httpd, which is something mod_lua currently lacks. I did not see
any filter hooks though - is this something you plan to add, or did I
just miss it?

With regards,
Daniel.

Reply via email to