[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: ANN: coxpcall 1.6 (was RE: Xavate crash and coxpcall missing 'arg' variable)
- From: Javier Guerra <javier@...>
- Date: Mon, 16 May 2005 21:46:35 -0500
On 16 may 2005, at 8:11 PM, Romulo Bahiense wrote:
it certainly doesn't look like a bug in Lua code. for me at least,
LuaSocket is wonderfully stable; so it might be a compile or link
To resolve the problem I just renamed my lua5.dll and lualib5.dll to
liblua.dll and liblualib.dll, respectively.
glad to hear it's ok now :-)
Now 2 semi-off-topic questions:
1) How does Xavante handle concurrency? eg: One user is uploading a
large file and another is browsing a web site hosted by the same http
server at the same time?
copas handles several coroutine-based 'threads'. these yield at any
netwok I/O long files are not a problem.
2) Would be difficult to implement an async request? e.g.: A very slow
request - like a database query returning many records - yelding
periodically to not block other requests.
that's far more difficult. the first versions of luahttpd used
preemptive multithreading with LuaThreads; but i knew coroutine
switching is much faster than thread switching (even under Linux, but
the breach is closing), so i wanted to first solve the http serving,
and then move to a different structure, using far less threads and more
when Andre showed me Copas, i decided to move luahttpd to run with it,
eventually that became the main Xavante project. I designed (and even
managed to make it work) a weird 'thread under coroutine' that let any
handler to spawn a new preemptive thread when needed, but I couldn't
make i stable enough. I think there's an issue with LuaThreads,
especially between different versions of the Lua core.
Since LuaThreads is a very pervasive addition to Lua (and not a neat
module, like LuaSocket), i decided to let it wait and try again when we
have a final Lua5.1
I can send you the helper threads code, if you can compile a
threads-capable lua core to test it.
in short: i'd love to have that too, but currently Xavante is _very_
fast for small queries (try Sajax!), so it can wait a bit
Would it be too difficult to convince the author(s) of LuaSocket to
use the same DLLs from LuaBinaries?
he'll have to answer that himself...