应用程序的多个参与者系统

编程入门 行业动态 更新时间:2024-10-26 02:37:04
本文介绍了应用程序的多个参与者系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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.

更多推荐

应用程序的多个参与者系统

本文发布于:2023-11-25 12:25:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1629742.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   参与者   应用程序   系统

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!