Abstract

The mod_lua module for the Apache HTTP Server is lacking a strong and comprehensive binding to the APR. APR and APR-util provide many useful facilities, which should be made available to mod_lua scripts, as currently the only facilities exported are reading and writing keys in APR tables. Bindings to APR, APR-util (and mod_dbd) could give efficient database access, directory access facilities, XML parsing and socket access, to list but a few things.

About Me

I am Peter Cawley, a student from England. In October 2009, I'll be starting the Maths and Computer Science course at Keble college, Oxford*. This is my first year applying for GSoC, but I have previously participated in the GHOP contest, where I completed 15 tasks for the Drupal project and then was chosen as their grand prize winner. Like 99% of web developers, I have used Apache httpd, and contributing to such a behemoth is an exciting prospect. I have done alot of work with Lua, including identifying bugs in the Lua source code (i, ii, iii) and I've dabbled slightly with using mod_lua (i, ii, iii). I'm also fluent in C++, so understanding and extending the C codebase of mod_lua should not be an issue.

* This university place is conditional upon A-level results, which come out in August 2009. I am still eligible for GSoC (having explicitly checked with LH).

Other commitments

While GSoC will be my only "job" as such over the summer (assuming I'm accepted), I do have eight A-level exams:

Project break-down

I have identified the following areas where useful APR functionality can be made visible to Lua:

As noted, some of the functionality which would be provided by an enhanced binding to the APR can already be found in existing Lua libraries, so initially it might seem redundant to provide these features via the APR. On the contrary, I think that it would be beneficial to provide a binding to the APR to provide these features. If something is possible using pure Lua, then doing through the APR instead would likely be faster (while Lua is fast, C is faster) and the code in the APR has likely been through alot more testing than some hacked together Lua code. If something is possible by pulling in an external library, then that can bring its own issues - such libraries would have to be compiled, and in shared hosting contexts, Lua's DLL/SO loading capabilities may be neutered for security reasons. Furthermore, having a more comprehensive out-of-the-box library for mod_lua would be useful for users who want to start coding and not have to pull in external libraries to perform "trivial" tasks.

The first phase of my project would be to write the aforementioned bindings to the APR, doing so in the Lua "style" where possible. The second phase would be documenting this binding so that developers are aware of its functionality. The third phase would be writing some (small) sample pages which make use of this functionality.

As the APR is a portable (i.e. cross-platform) library, it makes sense to develop and test on at least 2 different platforms. Therefore, my work will be done on:

Contact

Website: www.corsix.org
Email: [email protected]