High throughput Java actors--much faster than Akka
I worked in Scala for 2 years and was constantly frustrated with the speed of the actors. So I rolled my own, in Java. Orders of magnitude faster, though the speed increase really has nothing to do with the choice of language.
Most of the speed gain comes from avoiding thread switching as much as possible. I developed the idea of commandeering, where an actor which sends a message to another actor that is idle can safely process the message sent on the same thread.
Additional speedups came from message buffering and the optional use of 2-way messages for implicit flow control.
Message passing between actors runs between 80 and 200 million per second on an i7, depending on the mode of delivery.
Currently looking for early adopters as I believe this is production ready.
https://github.com/laforge49/JActor
4 comments
[ 3.4 ms ] story [ 21.7 ms ] threadThread switching is certainly costly and not really necessary for high-performance systems as proved by the the LMAX/Disruptor architecture.
I've since put together an in-memory database built on JActor that processes a million ACID transactions a second (on an i7 with ssd). https://github.com/laforge49/JFile
What I didn't like about the disruptor pattern is that it seems to require a lot of architecture, and I like to keep things as fluid as possible.
My proposal is that a high-throughput actor framwork (like JActor) is close to ideal for building vertically scalable server software.
Btw since, language is not important, why didn't you write this in Scala?