Scala/Akka and JRuby

Hi everyone,

is there anyone that uses akka/scala together with jruby?

kind regards,

I am using Akka actors to process a data stream from Kafka. Similar to a
traditional ETL approach except with parallel processing branches.
Its been good so far. Took a bit to fully embrace the let it fail design

I started with the Mikka gem here:

and I created a fork to add enhancements I needed along the way


(replies inline)

On Wed, 01 Oct 2014, Alexander Fitterling wrote:

Hi everyone,

is there anyone that uses akka/scala together with jruby?

While not using Akka directly, The concurrent-ruby gem is well supported
JRuby and provides lots of the same concepts that Akka and Scala have:

  • R. Tyler C.

I use Akka extensively with jruby in

It pretty much just works. Only one thing I can think of that might
someone is that Akka now requires a factory for creating actors. So you
have to jump through a couple of hoops to make that work when your
is ruby and your actors are ruby classes that inherit from UntypedActor.

My abstraction layer for actors is in server/lib/game_machine/actor.

If you look at builder.rb and factory.rb, and also in the java class
ActorFactory, you should see how it all fits together. Basically I
have a
java factory that is just a proxy to my ruby factory, and a java
to make it possible for java to call the create method on my ruby

Only reason I haven’t broken out the actor abstractions into a separate
is I just haven’t had people asking for it, but my project is fairly
and not really targeted at what most people use jruby for, so I’m unsure
how much of a demand there really is.


thank you.
Am I able to run a parent actor on jruby and implement all child actors
in scala? so as they still would share the same environment?
Secondly: I was seeking informations on how to run scala code at all
from jruby. Couldn’t find something. Are there any hints?
kind regards,

Am 01.10.2014 um 18:43 schrieb Mike L. [email protected]:

ic, thank you indeed.
kind regards,

Am 01.10.2014 um 18:49 schrieb R. Tyler C. [email protected]:

Yes you can have jruby parent actors that have scala or java children
visa versa.

Scala classes compile to java bytecode. You access scala classes just
java classes for the most part. Here is some info from the jruby docs
the subject.

On Sun, Oct 5, 2014 at 5:04 AM, Alexander Fitterling <

Mike, it works. Do you know if I can use akkas microkernel as well?
kind regards,

Am 05.10.2014 um 22:38 schrieb snacktime [email protected]:

I havent tried it myself. However, it seems all you would need to do is
implement the Bootable interface.