jump to navigation

The Golden Wombat of Destiny March 15, 2008

Posted by nathany in : mod_wombat , add a comment

The Golden Wombat of Destiny was a text adventure game (interactive fiction) written by Huw Collingbourne in early `80s. I honestly never got very far in that game, preferring Colossal Cave and The Hitchhiker’s Guide to the Galaxy in the days of the Kaypro IV.

Today we’re going to talk about a different wombat, with a different destiny.

Spear-headed by Brian McCallister, mod_wombat embeds the Lua programming language into the Apache HTTP server in the same fashion as mod_perl, mod_php and mod_python bring their respective languages into the Apache world of web development.

How mod_wombat differs has a lot to do with how Lua differs from other languages. Lua is a very lightweight scripting language originally designed for non-programmers to customize the software it is embedded in. It is simple to pick up, while offering a good amount of flexibility and power. Its popularity in game scripting has pushed its’ interpreter towards being very efficient and multi-thread ready.

Apache is the heavy-weight champion of HTTP servers, responsible for serving up half the Internet. Apache 2.x was a substantial reworking, providing:

Lua is designed for embedding in C-based programs, which allows mod_wombat to take advantage of the substantial infrastructure Apache provides. More than any other language module, mod_wombat endeavors to work with Apache.

Matthew Burke is looking for students to work on mod_wombat as part of the 2008 Google Summer of Code. If you are a student who is interested, you should definitely get in touch with Matthew Burke and Brian McCallister to discuss your ideas. Who knows, this could be your destiny? :-)

This is gonna be great

Lua atop Apache could make for a very sweet development platform for web applications, both large and small.

Ideas

If you are a student joining the GSoC, you will need to come up with your own proposal. I’m not a student, so I don’t qualify, but I will post here a few of the basic ideas that I believe are of general consensus.

Simplify installation

For mod_wombat to become a platform of choice, it needs to be dead-simple to deploy, whether as a development environment or a production server. This would be served by relying only on those modules included with the Apache distribution.

There has been a desire to remove the dependency on libapreg2, which is used to parse HTTP cookies, query-strings and POST data. The required functionality would need to be incorporated into mod_wombat directly.

Tighter integration with Apache HTTP Server 2.2

There is a lot that can be done to further integrate Lua with Apache, whether using Lua to configure Apache, or to pull Apache functionality into Lua.

Perhaps the most significant and obvious, would be integration with Apache’s Database Framework. With DBD, the database drivers for your web application are bundled with Apache, and Apache manages a pool of database connections in an intelligent way appropriate for the MPM being used. With mod_wombat, Lua could be the first language to really take advantage of this feature, new to Apache 2.2.

Write something with it

What mod_wombat provides is an API to higher-level web frameworks and applications. It’s hard to know how those APIs should be written without using them. Building a small project atop mod_wombat could go a long way in designing a concise and friendly API.

Preferably using some sort of code standards.

Resources

If you choose to partake in this endeavor, there a few things you must know.

And that’s all there’s to it. Ready to get coding?

Follow-up

Maxime Petazzoni has accepted the role of working on mod_wombat for GSoC this year. See the Apache mailing list.