-
Notifications
You must be signed in to change notification settings - Fork 4
Idea: Turbo Mode
Celluloid is an actor-based concurrent object framework (somewhat similar to Akka) written in pure Ruby. It presently uses Ruby Mutexes and ConditionVariables for synchronization. However, the JVM has many, many other options which could provide better performance.
Celluloid provides an ActorSystem
abstraction for supporting multiple different platform-specific backends, and we'd love to have one specific to jRuby
. The goal of this project would be to implement a Celluloid ActorSystem
which is a better fit with JRuby.
Some options to consider:
-
LMAX Disruptor: Disruptor is a library which supports a number of different patterns for multithreaded execution. Some work has already been done to implement Celluloid Mailboxes in terms of Disruptor
-
[ArrayBlockingQueue] (http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ArrayBlockingQueue.html): These are fast, fixed-sized data structures built atop arrays.
-
LinkedTransferQueue: Introduced in Java 7, LinkedTransferQueues are one of the most adaptable concurrency primitives available on the JVM today.
-
Fork/Join: a framework introduced in Java 7 for abstracting multicore execution on the JVM
-
concurrent-ruby: a cross-Ruby VM library containing many high-performance concurrency primitives. Leveraging this existing work would mean Celluloid would not need a JRuby-specific backend, but rather could use faster concurrency primitives on JRuby when available, and fall back to slower (single-threaded) ones on MRI.