3 ms·
I don't want to be pedantic, but I'm going to be pedantic (sorry!) You can get Erlang style concurrency out of ... JVM languages (scala/akka; quasar) This i
by rozap 11y ago
I don't want to be pedantic, but I'm going to be pedantic (sorry!)
You can get Erlang style concurrency out of ... JVM languages (scala/akka; quasar)
This is a little misleading. Yea, akka gives you actors, and on the surface they look similar to erlang processes (they have a receive block, and a ! function call), but I think the more subtle differences are what make erlang interesting, and ultimately really pleasant to work with
1) akka is not preemptive multitasking. actors are multiplexed across a thread pool, so it's possible to do blocking IO and screw a bunch of other actors up inadvertently
2) the whole gc thing that applies across the vm.
all sorts of wonderful things fall out of the two properties above, things which you need to work really hard to get in an akka world.
as far as foreign interfaces to python, it's certainly possible with something like jinterface, but I'm not really sure what the point would be. generally you leave erlang behind for similar reasons you might leave python behind (things that are cpu bound). jinterface exists because java does a whole bunch of stuff well that erlang falls down at, so they can complement each other nicely. I'm not sure there are as many of those cases with python.
- phamilton 11y agoIt is my understanding that quasar gives you something awfully close to preemptive scheduling. It's not quite as strict as Erlang's reduction based appproach, but it essentially provides implicit cooperative scheduling. It allows you to do blocking IO without tying up execution. On top of quasar, using Azul as the garbage collector will get you a GC without Stop-The-World behavior on the JVM. It's neither open source nor cheap though. That said, I'm plenty happy with BEAM.