何时使用本地与远程参与者? [英] When to use local vs remote actors?

查看:71
本文介绍了何时使用本地与远程参与者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该何时在Akka中使用Actor vs.Remote Actor?



我知道两者都可以扩展机器,但是只有远程Actor可以扩展,所以



如果远程Actor仅具有较小的初始设置开销,并且没有普通Actor的任何其他主要开销,则有实际的生产用途吗? ,那么我认为使用Remote Actor将是标准,因为它可以轻松扩展和扩展。即使永远不需要扩展生产代码,也可以选择(如果它不是随身行李的话)。



解决方案

远程Actor无法扩大规模,它们只是远程参考,因此不胜感激。



对于Akka 2.0,我们将引入集群的actor,它将允许您编写Akka应用程序并仅使用config进行扩展。 / p>

When should I use Actors vs. Remote Actors in Akka?

I understand that both can scale a machine up, but only remote actors can scale out, so is there any practical production use of the normal Actor?

If a remote actor only has a minor initial setup overhead and does not have any other major overhead to that of a normal Actor, then I would think that using a Remote Actor would be the standard, since it can scale up and out with ease. Even if there is never a need to scale production code out, it would be nice to have the option (if it doesn't come with baggage).

Any insight on when to use an Actor vs. Remote Actor would be much appreciated.

解决方案

Remote Actors cannot scale up, they are only remote references to a local actor on another machine.

For Akka 2.0 we will introduce clustered actors, which will allow you to write an Akka application and scale it up only using config.

这篇关于何时使用本地与远程参与者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆