应用程序的多个参与者系统 [英] Multiple actor systems for an application

查看:89
本文介绍了应用程序的多个参与者系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文章讨论了我们如何不应该创建太多参与者系统。但是文档说:

This article talks about how we should not create 'too' many actor systems. But the docs say:


ActorSystem是一个重量级结构,它将分配1…N
线程,因此在每个逻辑应用程序中创建一个线程。

An ActorSystem is a heavyweight structure that will allocate 1…N Threads, so create one per logical application.

我无法理解在应用程序中使用多个actor系统的真正问题是什么。另外,来自不同角色系统的角色是否可以互相发消息?

I am unable to understand what is the real issue here with using multiple actor systems in an application. Also, is it possible for actors from different actor system to message each other?

推荐答案

使用多个系统没有问题。创建太多个潜在的问题。原因是使用 ActorSystem 会带来一些不可忽略的开销-主要是因为每个人都会分配自己的fork-join池。

There is no issue with using multiple systems. There is a potential issue with creating too many of them. The reason is that with an ActorSystem comes some non-negligible overhead - mainly because each one would allocate its own fork-join pool.

我建议您阅读此博客文章以获取更多信息。

I recommend you read this blogpost for more info.

来自不同 ActorSystem s 的演员可以互相发送消息,但AFAIK需要通过远程处理。这是将系统隔离作为本地模式并没有真正意义的另一个原因。

Actors from different ActorSystems can message each other, but AFAIK this needs to happen through remoting. This counts as yet another reason why system segregation doesn't really make sense as a local pattern.

这篇关于应用程序的多个参与者系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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