1

I have a monolithic Java application (frontend/services) running in Tomcat. I'm trying to come up with a design that will allow me to slowly migrate all the parts of the application as individual tiers to (one or more) Akka actor system(s). As a first redesign, I want to keep the client facing frontend in Tomcat and rewrite some of the middle tier logic in Akka.

I have a couple questions about how to go with this redesign:

  • What's the most efficient way for the frontend to communicate with Akka? I was considering REST but I was wondering if there was anything faster;
  • How hard is it to reuse the existing JPA/hybernate entity model from within Akka? I am looking for documentation/gotchas.

Thanks

Giovanni Botta
  • 9,626
  • 5
  • 51
  • 94

2 Answers2

2

Akka supports remoting, which is actors talking to actors on other systems. You can have actors in your Tomcat app communicate with actors in the services running elsewhere.

Since JPA/Hibernate/JDBC is blocking you should take special care on how you use it in your actor-based apps.

sourcedelica
  • 23,940
  • 7
  • 66
  • 74
  • This is very interesting. I read the section about remoting and it looks to me like I can just add code to lookup my remote actor from my Tomcat app, am I right? And that'll use the remoting protocol I specify? – Giovanni Botta Nov 12 '13 at 14:21
  • Right- though I would recommend using the remote transport as shown in the "Preparing your ActorSystem for Remoting" section. – sourcedelica Nov 12 '13 at 14:30
0

If you just want to split your application and need a high IPC/Network link, consider a brokerless messaging lib instead of akka, e.g. https://code.google.com/p/fast-cast/

R.Moeller
  • 3,436
  • 1
  • 17
  • 12
  • What I'm trying to do is to slowly migrate all the services to Akka, but I will leave the frontend unchanged for now. – Giovanni Botta Nov 12 '13 at 00:44
  • Ok, then you might want to add this to your post :-) – R.Moeller Nov 12 '13 at 00:49
  • 1
    I thought the sentence "I'm trying to come up with a design that allows me to move some of the middle tier services to an Akka actor system to start porting the whole application" was pretty clear... – Giovanni Botta Nov 12 '13 at 14:07