lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Wed, Apr 23, 2008 at 2:57 PM, Stefan <stefan@outsourcedprinting.com> wrote:
Bertrand Mansion wrote:


That's very good news :)

I have tried mod_wombat some time ago and here are the problems I had:

- The cache setting "never" didn't work for me, I had to restart apache all the time to make sure my script was updated (on macosx at least)

This is very strange -- can you report it on dev@httpd.apache.org with a config where it happens?
 
- I was not happy with some environment variables like SCRIPT_NAME which were different from what I expected and from what other modules like WSAPI return (this could be solved with a WSAPI connector?)

mod_wombat doesn't set up any env variables, it exposes the request_req as is. It does not attempt to be CGI-lik, but you can pretty easily set up CGI style environment on top of it
 

- It's a bore to have to install libapreq2, it would be nice to get rid of this dependency

Agreed! I am just too lazy to reimplement uri and form parsing. Should probably detect availability of apreq2 and fallback to the code in CGIlua or something if not available.

The benefit to apreq2 is that apreq2 populates apr tables accessible from the request_rec, so once the post body is parsed it is available to both C modules and mod_wombat -- regardless of which one parsed it out.
 
- IIRC, the way GET and POST tables get populated in mod_wombat is different from the way other lua modules populate them (WSAPI and cgilua for example). This makes porting an application from one platform to another very difficult (ex: mod_wombat -> fastcgi)

See CGI comment :-)
 

- It would be nice to have a WSAPI connector now that WSAPI is almost ready, but this should be easy to do when mod_wombat gets closer to release state.

Yes!
 


A mod_dbd would indeed be nice, but IMO the above problems should be solved first. Unfortunately I don't know Apache2, HTTP, etc well enough to help so that's just my hopes.

Now, from a long time PHP web developer perspective, I think lua has more to offer to web developers than PHP in terms of raw power. The language itself is a lot cleaner and offers more "features" like closures, metatables and anonymous functions to start with. It is obvious lua was carefully planned from the ground up, unlike PHP which goes in every direction now. Lua is also easy to grasp which means its use could spread like fire once the infrastructure is ready. Mod_wombat, like WSAPI and its fcgi connector, would be the basis of the required infrastructure to allow all kind of interesting things to happen for lua on the web, that's why both are very important projects in my eyes. I would be very happy to see usage of lua for the web grow. With projects like mod_wombat, wsapi and luarocks I see this coming :)



--
Bertrand Mansion
Mamasam
Work : http://www.mamasam.com
Blog : http://golgote.freeflux.net




I have the opposite problem with the cache on FreeBSD. It always reloads on each request, so the scripts are run like CGI (one invocation per request). Still extremely fast though - much quicker then FastCGI + cgilua through Apache for some reason. Lighttpd on FreeBSD is quite buggy right now, so mod_wombat is what we are moving forward with.

FWIW - I recently submitted a FreeBSD port of mod_wombat to the official ports & package tree (PR 122701). So it should be available soon to everyone that uses that platform. Just 'make install clean' and you are good to go. I *do* still need to make a man page for it though...