Distributed Actors in Akka
Asked Answered
R

2

9

I'm fairly new to Akka and new to distributed programming in general. Using Akka's Mist component, I've created supervised actors to handle HTTP requests asynchronously. Everything is currently running on one physical machine with local actors. What I don't understand is how to build a truly fault-tolerant system with more than one box. As stated in the Akka docs:

Also, you (usually) need to know if one box is down and/or the service you are talking to on the other box is down. Here actor supervision/linking is a critical tool for not only monitoring the health of remote services, but to actually manage the service, do something about the problem if the actor or node is down. Such as restarting actors on the same node or on another node.

How do I do this? I'm looking for an example or pointers on how to begin making my application distributed. Other services in our group use Apache gateways in front of multiple Tomcat instances, so the event of a Tomcat server going down is transparent to the user. I'm deploying my service to the Akka microkernel and need to achieve a similar level of high availability across more than one physical box.

I'm using Akka 1.1.3.

Responsive answered 26/8, 2011 at 16:3 Comment(0)
U
2

Remote supervision works only with client-managed remote actors for the Akka 1.x series.

Akka 2.0 that is currently under development will support transparent clustering, cluster-wide supervision and cluster-wide lifecycle monitoring.

Urquhart answered 27/8, 2011 at 10:27 Comment(1)
What is the estimated release date for 2.0?Responsive
K
1

You might consider putting an HTTP load balancer in front of Akka Microkernel instances running Mist, this would match what your group does with 'Apache gateways'.

Another approach would be to expose remote actors on a number of instances and then use Akka's LoadBalancer or Actor Pool to send messages around, see here

The second approach is a bit of a pain if you have a dynamic pool of machines, because the pool of devices wants to be specified programatically. Akka 2.0 addresses this with cluster support that is setup in the akka.conf file.

As far as the release date of 2.0, for what its worth 1.2 was just recently released on 2011-Sept-19.

Kentish answered 27/9, 2011 at 16:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.