Akka - 根据需要自动创建 Actor
我对 Akka 还很陌生,也许还不太理解其中的一些概念。
我正在尝试找到一种方法,让系统在邮箱超出某个限制时自动创建新的参与者实例。是否也可以在远程节点上执行此操作?
很高兴有任何评论。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我对 Akka 还很陌生,也许还不太理解其中的一些概念。
我正在尝试找到一种方法,让系统在邮箱超出某个限制时自动创建新的参与者实例。是否也可以在远程节点上执行此操作?
很高兴有任何评论。
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
Chris B 错过了 Akka 2.0-M4 中新的很棒的路由器调整器:
文档:http://akka.io/api/akka/2.0- M4/#akka.routing.DefaultResizer
所以,是的,您可以为路由器进行这种动态调整大小。
Chris B has missed the new awesome Resizers for Routers in Akka 2.0-M4:
Docs: http://akka.io/docs/akka/2.0-M4/scala/routing.html#dynamically-resizable-routers
ScalaDocs: http://akka.io/api/akka/2.0-M4/#akka.routing.DefaultResizer
So, yes, you can have that kind of dynamic resizing for Routers.
目前(Akka 2.0 里程碑 4),这种动态负载平衡/扩展不可用。新的 Actor 可以动态创建(这是 Actor 模型的基本原则),但没有内置的方法来衡量系统的负载并做出相应的反应。
2.1 版计划有许多令人兴奋的集群功能,希望其中包含您正在寻找的功能。
以下是 Akka 2.0 及更高版本的路线图:
https://docs.google.com/document/pub?id=1CMz_MEQA8oPcGw9oaFdq_KYYFB_5qZjsDYYwuXfZhBU&pli=1
Currently (Akka 2.0 milestone 4), this kind of dynamic load-balancing/scaling is not available. New actors can be created dynamically (this is a fundamental tenet of the Actor model), but there is no built-in way to gauge the load of the system and react accordingly.
There are lots of exciting clustering features scheduled for version 2.1, which hopefully will include what you are looking for.
Here is a roadmap for Akka 2.0 and beyond:
https://docs.google.com/document/pub?id=1CMz_MEQA8oPcGw9oaFdq_KYYFB_5qZjsDYYwuXfZhBU&pli=1