开发者

Distributed Actors in Akka

开发者 https://www.devze.com 2023-03-31 05:18 出处:网络
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 runni

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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消