Concurrency in Lua / accessing the Erlang website...

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Concurrency in Lua / accessing the Erlang website...

Joseph Stewart
The discussions on this list recently about concurrency got me wondering how "threads" are implemented in Erlang. Apparently they are very lightweight, and issues of portability between Windows/Linux/BSD/OSX have been addressed in some kind of efficient manner.

I wonder if the work done for Erlang might have relevance for Lua.

Via Google, I've seen references to a paper that might go into further detail before digging into the code. The document mentioned is http://www.erlang.se/publications/xjobb/0890hedqvist.pdf.

Unfortunately, it seems my access to www.erlang.org and www.erlang.se is non-existant (and has been for the past 14 hours).

When I have access to the Erlang site, I may have more to offer, but in the meantime, does anyone want to weigh in on this as a possibility in the Lua arena (ErLua)?

-joe
Reply | Threaded
Open this post in threaded view
|

Re: Concurrency in Lua / accessing the Erlang website...

Joseph Stewart
I found the paper mentioned below at (citeseer)

http://citeseer.ist.psu.edu/rd/0%2C320453%2C1%2C0.25%2CDownload/http://citeseer.ist.psu.edu/cache/papers/cs/15643/ftp:zSzzSzftp.csd.uu.sezSzpubzSzpaperszSzmasters-theseszSz0089-hedqvist.pdf/hedqvist98parallel.pdf

Just started reading it...

-joe

On 2/1/06, Joseph Stewart <[hidden email]> wrote:
The discussions on this list recently about concurrency got me wondering how "threads" are implemented in Erlang. Apparently they are very lightweight, and issues of portability between Windows/Linux/BSD/OSX have been addressed in some kind of efficient manner.

I wonder if the work done for Erlang might have relevance for Lua.

Via Google, I've seen references to a paper that might go into further detail before digging into the code. The document mentioned is <a href="http://www.erlang.se/publications/xjobb/0890hedqvist.pdf" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.erlang.se/publications/xjobb/0890hedqvist.pdf.

Unfortunately, it seems my access to <a href="http://www.erlang.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.erlang.org and <a href="http://www.erlang.se" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.erlang.se is non-existant (and has been for the past 14 hours).

When I have access to the Erlang site, I may have more to offer, but in the meantime, does anyone want to weigh in on this as a possibility in the Lua arena (ErLua)?

-joe

Reply | Threaded
Open this post in threaded view
|

Re: Concurrency in Lua / accessing the Erlang website...

Lisa Parratt
Joseph Stewart wrote:
>     When I have access to the Erlang site, I may have more to offer, but
>     in the meantime, does anyone want to weigh in on this as a
>     possibility in the Lua arena (ErLua)?

I may be vaguely confused, but how is this any different from running a
number of independent Lua VMs in different threads, using message queues
for IPC?

--
Lisa
http://www.thecommune.org.uk/~lisa/
Reply | Threaded
Open this post in threaded view
|

Re: Concurrency in Lua / accessing the Erlang website...

Taj Khattra
> I may be vaguely confused, but how is this any different from running a
> number of independent Lua VMs in different threads, using message queues
> for IPC?

depends on how many "threads" you want to scale to:

http://ll2.ai.mit.edu/talks/armstrong.pdf
http://www.sics.se/~joe/ericsson/du98024.html
Reply | Threaded
Open this post in threaded view
|

Re: Concurrency in Lua / accessing the Erlang website...

Robert Raschke-2
In reply to this post by Lisa Parratt
Lisa Parratt wrote:
> Joseph Stewart wrote:
>>     When I have access to the Erlang site, I may have more to offer, but
>>     in the meantime, does anyone want to weigh in on this as a
>>     possibility in the Lua arena (ErLua)?
>
> I may be vaguely confused, but how is this any different from running a
> number of independent Lua VMs in different threads, using message queues
> for IPC?

In Erlang, processes are not threads, neither are they OS processes.
They are extremely lightweight.  In a typical Erlang appllication, you
end up creating as many processes as are needed, usually in the
thousands (but that obviously depends on your application).  I think
there have been tests to see how the systems scales when you get into
the territory of hundreds of thousands of processes and it was very
positive (I would need to hunt for references).  There's a web server
(yaws) written in Erlang that compares very favourably against Apache.

I have wanted to create a binding between Erlang and Lua for a while
now, but have never had enough time.  It would be fabulous to use
Erlang's massive support for distributed, fault tolerant programming
to manage the execution small Lua scripts.

I believe there was a power outage that took down the machines hosting
www.erlang.org . Not sure when it'll be back up.

Robby

Reply | Threaded
Open this post in threaded view
|

Re: Concurrency in Lua / accessing the Erlang website...

Chris Marrin
I couldn't resist :-)

Robert Raschke wrote:
> ...
> I have wanted to create a binding between Erlang and Lua for a while
> now, but have never had enough time.  It would be fabulous to use
> Erlang's massive support for distributed, fault tolerant programming
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> to manage the execution small Lua scripts.
>
> I believe there was a power outage that took down the machines hosting
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> www.erlang.org . Not sure when it'll be back up.

How ironic :-)

--
chris marrin                ,""$,
[hidden email]          b`    $                             ,,.
                         mP     b'                            , 1$'
         ,.`           ,b`    ,`                              :$$'
      ,|`             mP    ,`                                       ,mm
    ,b"              b"   ,`            ,mm      m$$    ,m         ,`P$$
   m$`             ,b`  .` ,mm        ,'|$P   ,|"1$`  ,b$P       ,`  :$1
  b$`             ,$: :,`` |$$      ,`   $$` ,|` ,$$,,`"$$     .`    :$|
b$|            _m$`,:`    :$1   ,`     ,$Pm|`    `    :$$,..;"'     |$:
P$b,      _;b$$b$1"       |$$ ,`      ,$$"             ``'          $$
  ```"```'"    `"`         `""`        ""`                          ,P`
"As a general rule,don't solve puzzles that open portals to Hell"'