News for hackers. Stuff that matters.
Re:Erlang Doesn’t Fit The JVM by glymor on Friday April 03, 2009 @11:11AM (#544981)
I remember his hashmap when he published it, state machines are a great way to do concurrency.

The Erlang way of handling concurrency is to spawn millions of "processes" (threads) obviously these can't be hardware threads so Erlang is hitting problems OS schedulers would handle (or not be able to handle) in the JVM's case.

I would argue that the JVM is eventually going to have to handle the threading itself if it's to support any actor based programming. OS schedulers have other uses they need to be fast for and hardware threads will always have higher overhead. Python's Stackless is perhaps an example of the amount of work it would require.

Re:Erlang Doesn’t Fit The JVM by johnm on Friday April 03, 2009 @11:31AM (#545003)
You might want to take a look at e.g., Scala and how it implements actors on the JVM.

It's basically doing a MxN actor to thread-pool scheduling.

Re:Erlang Doesn’t Fit The JVM by glymor on Friday April 03, 2009 @11:48AM (#545034)
The dispacter is probably a bottleneck, looking at the paper http://lamp.epfl.ch/~phaller/doc/haller07actorsunify.pdf I can't really tell how it's implemented.

How does the Scala run queue work? eg have a look at the Erlang article I linked to in my first post.