Akka - 根据需要自动创建 Actor

发布于 2025-01-05 10:00:57 字数 116 浏览 3 评论 0 原文

我对 Akka 还很陌生,也许还不太理解其中的一些概念。

我正在尝试找到一种方法,让系统在邮箱超出某个限制时自动创建新的参与者实例。是否也可以在远程节点上执行此操作?

很高兴有任何评论。

I'm pretty new in Akka and maybe didn't understanded yet some of it concepts well.

I'm trying to find a way to make the system automatically creates new actor instances if mailbox is exceed over some limit. Is it also posible to do it on remote nodes?

Be glad for any comments.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

懒的傷心 2025-01-12 10:00:57

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.

辞旧 2025-01-12 10:00:57

目前(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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文