lua-users home
lua-l archive

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


> 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!
	The environment is not totally recreated.  VEnv inherits all
globals from the original environment.  Also, libraries loaded with
require are "cached" avoiding reloading code from the file.

> 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.
	The main reason is to protect one script from another.

> 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.
	Maybe I've missed the point but currently CGILua does not share
Lua States over threads.

> 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?
	We'll release the next version (alpha 4) until the end of
november.  We included a sessions library which still needs thorough tests
and some improvements but is working.  The documentation also lacks some
examples (but this is just another alpha :-) etc.  Well, give it a try and
tell us what you think!