lua-users home
lua-l archive

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


Hi

I'm evaluating CGILua for a project i'm doing.  Currently, the web part is 
done with PHP, and the back processes that do most of the work are pure Lua.

Unfortunately, extending the web part is getting cumbersome, because most of 
the low level functions are written in Lua.  I find myself reimplementing 
some Lua functions in PHP.  Therefore, i'd want to pick up just one language.  
As much as i like PHP, Lua is the clear winner in this case, so i need CGILua 
or something like that.

Several times before, i've thought of modifying the FastCGI version of PHP to 
allow for persistent processes.  I think this is the only real advantage of 
Java (J2EE, etc) over PHP.  So now i think it's a great opportunity to do it 
with Lua instead of PHP.

Reading the FastCGI version of CGILua, it seems so close to that feature; 
especially after finding that the main event loop is in a Lua script and not 
the C caller.  But there is that venv() call for every event!  totally 
recreating the statelessness of PHP and old-style CGI!

I'm sure i could just take it off, and use a single global environment, but it 
would make a mess when trying to use several different applications on the 
same server.  also, i think it must be there for a good reason that i just 
don't get.

Also, i'm afraid that some queries can take a few seconds to be processed, and 
the single event loop would make every query to wait single-threadedly on a 
queue.

I've just glossed over the fcgi docs, there are a few hints of interleaving 
the HTML requests for a single FastCGI server, but i can't find any useful 
example.

Also, at the kepler project page there's a mention about CGILua alpha4, which 
should do persistent sessions... can we see that code? is it progressing? is 
it stalled?  should i try to do my own session system instead of the current 
"venv() for every request" scheme?

-- 
Javier

Attachment: pgp0Qvh4i0ZGO.pgp
Description: PGP signature