lua-users home
lua-l archive

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


	Hi Javier,

On Tue, 14 Dec 2004, Javier Guerra wrote:
> On Tuesday 14 December 2004 11:16 am, Tomas wrote:
> > > what i propose is: just before checking for the
> > > luaPage file, check a table, if there's a function associated with that
> > > URL, call it instead of loading the luaPage.  if there's not, load it.
> > > simple, lightweight, fast.
> >
> >  You can build a script that does this.
>
> yep, but it would be far more efficient to do it before loading any external
> script.   unless it's already doing some cache... a simple weak table would
> be roughly equivalent to what i propose
	I don't have performance numbers yet (this is work for 2005 :-).
I think you want only the launchers layer, not entirely CGILua.  So, cut
it off!  A simple modification inside the launcher .lua files will do
what you want.

> > > not one process per user, just a coroutine.  the 'getevent()' function
> > > would do a yield, and the RPC would take a session id and retrieve the
> > > coroutine to resume.
> >
> >  Therefore you'll only respond one request at a time!  And
> > you'll have to manage this shared global environment amongst all
> > coroutines.
>
> right, that's the limitation of non-preemptive multitasking;
	(I think it would be worst with preemptive multitasking :-(

> but if every
> event is managed on sub-second times, it wouldn't be noticeable for a medium
> group of users.  for wide scalability, fastCGI with SA could help
	Yes.  SA seems to be a better solution.

> about the shared global environment, would that be too messy?
	I don't know.

	Tomas