You may also check out SpiderMonkey javascript. It is thread safe and 
runtime is not very big.

Vasiljevic Zoran wrote:
> On 10.05.2008, at 06:13, Andrew Piskorski wrote:
> 
>> 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.
> 
> Coroutines are something similar, (purists outthere, note: _similar_)
> to Tcl event loop in terms that they work on a single processor.
> This is not real MP multithreading that we need in order to scale.
>  From the programing perspective, they are indeed very interesting
> because they don't force me into the "event-loop" shoe. I have
> nothing against event-loop. It is just that it is really targeted to
> a GUI type of apps.
> I was greping to "lua_lock" calls arround the code and found mostly:
> 
>     something () {
>        lua_lock(L);
>        //...
>        lua_unlock(L);
>     }
> 
> OK, this must _not_ mean they are absolutely serialized, but it
> really appears to me like that on the first glance.
> What I plan to do is go to Lua developers and ask couple of
> questions...
> 
>>
>> 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.
> 
> Yep, Erlang is something that looks very good as well. I just stumbled
> across that yesterday.  Clever, clever... still I have to see how
> they works internally and what are the gotchas of their message-passing.
> 
> Cheers
> Zoran
> 
> 
> 
> 
> -------------------------------------------------------------------------
> 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
> 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-------------------------------------------------------------------------
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

Reply via email to