Re: [jruby-user] Scala/Akka and JRuby

snacktime <[email protected]>
Newsgroups gmane.comp.lang.jruby.user
Message-ID <CABFnarZBGjifhk2PocmN93y9UnO6S319h-JuZaSKeTtMtwXe9w@mail.gmail.com>
I use Akka extensively with jruby in
https://github.com/gamemachine/gamemachine.

It pretty much just works.  Only one thing I can think of that might throw
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 factory
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 interface
to make it possible for java to call the create method on my ruby factory
instance.

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

Chris



On Wed, Oct 1, 2014 at 9:49 AM, R. Tyler Croy <[email protected]> wrote:

> (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 on
> JRuby and provides lots of the same concepts that Akka and Scala have:
> <https://github.com/ruby-concurrency/concurrent-ruby>
>
> - R. Tyler Croy
>
> ------------------------------------------------------
>      Code: <https://github.com/rtyler>
>   Chatter: <https://twitter.com/agentdero>
>
>   % gpg --keyserver keys.gnupg.net --recv-key 3F51E16F
> ------------------------------------------------------
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.