These people people got up to 2M concurrent TCP connections
http://blog.whatsapp.com/index.php/2012/01/1-million-is-so-2...
And on top of it, it is using isolated heaps. That is beautiful I think. Completely concurrent GC is beautiful.
I know Erlang syntax is not to for everyone's taste (I do like it though). There is also Elixir (http://elixir-lang.org/). But the underlying BEAM VM is an awesome piece of technology.
> The thought was to have a billion threads on a SPARCStation 10
There are some green-thread C libraries I've been playing with, like Protothreads ( http://dunkels.com/adam/pt/index.html ) and libconcurrency ( https://code.google.com/p/libconcurrency/ ) I think they use setjump/longjump trick. Some use setcontext()/getcontext() POSIX call.
I still like Erlang VM best.
Shameless plug for CPC, a compiler translating green-threads to event-driven code: http://gabriel.kerneis.info/software/cpc/
Used to compile coroutines in QEMU during the latest GSoC: http://gabriel.kerneis.info/research/files/qemu-cpc.pdf
I actually really like Erlang and would love to get more familiar with it, but there are very few small projects that are suited to Erlang's domain.
But it's quite difficult to hire.
Huh? OOP & Message Passing!
http://lists.squeakfoundation.org/pipermail/squeak-dev/1998-...
(I'm in the SF area, but a lot of the ads I see are for New York and parts of the Midwest.)
* it has to fill a need people have.
* people have to know about it.
* it has to have a mature implementation.
Age helps with point #2 and #3.
With regard to JavaScript, the web browser pretty much forces you to use it. So it doesn't really matter how good or bad it is, it will have adoption.
That's 3 years ago. I'm sure more can be handled now, with more memory and more cores.
Bundled Netty with a distributed system like Hazelcast, you can easily scale out to more machines.
I can give my sample usages. I mainly used it for organizing the cluster automatically, like managing membership, server joining or leaving, maintaining the master server address list. With a distributed hash scheme like Soda, any member server can accept work from any client. Scaling out is very simple, just boot up a machine from an image. It would use Hazelcast to join the cluster and become available.
I also used it for distributing jobs, nice to able to say - queue these jobs and the distributed workers pick them up automatically.
I avoid using it for shared memory stuff, using it like Memcached. That's what Memcached, Redis, and friends are for.
It sounds like you're saying that it wasn't faster? Can you explain a bit more about the motivation if so?
Any thoughts on whether we should have user-space threading in the JVM today? Maybe it could be implemented in RoboVM as an experiment (rather than wrestling with the JVM immediately)?
Initially it was slower because context switches are slower, and anything that had to context switch into and out of the kernel was thus slower. Later there were other reasons. "User level" or as I prefer "Single Context" [1] threads have the ability to be very fast because they have extra knowledge about what is going on and access to other address spaces (so you don't have to save something if you know how it's used). There has been lots of great work on this since the early 90's when this decision was made so I suspect the issue would be significantly less.
[1] At the time kernel threads were 'single context' and quite fast. Fast enough to be used for interrupts. There is a great paper on the threading system in Solaris which describes them. -- http://dl.acm.org/citation.cfm?id=202217
I hope to write about our context-switch results some day.
The thought was to have a billion threads on a SPARCStation 10 (that is like an old Pentium machine now). We never got close but it was a great goal. Definitely going to have to go back and revisit this topic now. Thanks for the excellent demo to play with!