On Fri, May 09, 2008 at 06:06:05PM +0200, Vasiljevic Zoran wrote: > > I saw somewhere that Lua can have global and per-thread state > > and that you can provide your own locking primitives they use > > to lock their own code, but I haven't dig deeper there... > > Damn again. This is a global lock that serializes everything. > A no go :-( > Same applies to others (Ruby, Phyton, Perl).
Zoran, are you SURE? Because from what I've read about Lua, it does NOT have any sort of single global lock limiting true parallelism to one cpu/core at a time the way Python and Ruby do. Lua's default behavior is coroutines cooperatively multitasking on just a single cpu, but AFAIK the Lua implementation is not inherently limited to that. Your application clearly wants to use many thousands of stateful lightweight processes. AFAIK Lua and especially Erlang both support that out of the box. Do you ALSO need to run 2 or 8 or more of those threads in parallel (at the exact same time) on a single multi-cpu server? Recent versions of Erlang definitely support that. I'm not sure whether or not Lua supports that out of the box, but it may be feasible to make it work. (Erlang's message passing design should also mean that you can easily start running stuff across two or more independent server boxes too. Lua has no equilvalent, AFAIK, although there must be people in the Lua community thinking about that sort of stuff.) -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel