lua-users home
lua-l archive

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

	Hi Javier,

On Sat, 11 Dec 2004, Javier Guerra wrote:

> On Monday 06 December 2004 5:36 am, Tomas wrote:
> > We are proposing the creation of a persistent table, associated with each
> > Lua state of the launchers.  This table is created in the original launcher
> > environment and heird by the VEnv mechanism.  To allow the access to the
> > table a simple get/set API is provided.  The code follows:
> >
> > module (arg and arg[1] or "stable")
> > local persistent_table = {}
> > function get (i) return persistent_table[i] end
> > function set (i, v) persistent_table[i] = v end
> i had thought about something like this, and certainly covers most of the
> needs.  maybe another implementation for oldCGI (using hard disk or something
> else) would be nice, but that's another issue.
> my main wish still missing would be the 'function URLs'.  That way, it would
> be easy to treat some URLs as RPCs.
	But this could be achieved with the current implementation.
We test a simple XMLRPC server some time ago.

> ultimately, i'd like to do something like tica:tk  (, but less
> heavyweight.  for that it would be great to have a runtime that fully
> persists across http requests.
> imagine writing code like this:
> win = (x,y,w,h)
> in = (win)
> ok = (win, function (event) win.hide() end)
> while win.isvisible() do
>  ev= window.getevent ()
> end
> instring = in.getstring ()
> win.destroy()
> and having the user interface remotely visible using just any javascript
> compatible browser.  it's certainly possible using coroutines and a full
> cross-request persistence.
	Yes.  It is possible.  But if you want a cross request
persistence, you'll have to dedicate one process to each user
running the application or we'll have to implement something
equivalent inside the launcher.

> unfortunately, i have just started another short-deadline project, so i'm back
> to php...