问题标签 [actor-model]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - TPL 数据流,替代 JoinBlock 限制?
我寻找可以通过 n-TransformBlocks 链接到 JoinBlock 的替代方法,并将所有 TransformBlock 源块的消息连接/合并在一起,以便将此类集合传递到另一个数据流块。
JoinBlock 可以很好地完成这项工作,但仅限于连接最多 3 个源块。它还存在很多效率低下的问题(连接 2 个源块的偶数值类型(整数)非常慢)。有没有办法让从 TransformBlocks 返回的 Tasks 并等到所有 TransformBlocks 都有完成的任务才能在接受之前传递Task<item>
?
有什么替代的想法吗?在传递加入的项目集合之前,我可能有 1-20 个这样的转换块,我需要将哪些项目连接在一起。每个变换块保证为每个“变换”的输入项准确返回一个输出项。
编辑:要求澄清:
根据我之前的一个问题,我将 JoinBlocks 设置如下:
uml - 阿卡。如何在 UML 中说明演员?
我如何在 UML 图中说明 Akka 角色?特别是如何说明演员之间传递的消息?任何例子都可以。谢谢。
scala - How does Scala attain parallelism?
I am taking a course on distributed systems and we have to make our project using Scala. Our instructor told us that Scala is good in the sense that it uses multiple cores to do the computation and uses parallelism to solve problems while being integrated with the actor model.
This is a theoretical question. I have learned some basics about the actor model using Akka and my question is that, while programming, does the user have to provide the details to the compiler so that various actors work on multiple cores, or does Scala take care of that and use multiple cores for various actors?
In a nutshell my question is: when we declare multiple actors using the Akka libraries in Scala, does Scala compiler automatically use the multi-core CPU power to distribute various actors among cores, or does the programmer have to provide some input to do this?
python - Python中的“Actor模型”和“Reactor模式”有什么区别?
https://en.wikipedia.org/wiki/Actor_model,该项目被称为“脉冲星”
https://en.wikipedia.org/wiki/Reactor_pattern,项目是 Twisted 和 Tornado
理论和实践有什么区别?
scala - 通信顺序过程 [CSP] 是 Scala 中参与者模型的替代方案吗?
在Hoare 1978 年的一篇论文中,我们提出了一个名为 Communicating Sequential Processes 的想法。Go、Occam和 Clojure 中的core.async都使用了它。
是否可以使用 CSP 作为 Scala 中 Actor 模型的替代品?(我看到的是JCSP,但我想知道这是否是唯一的选择,它是否成熟,以及是否有人使用它)。
编辑 - 我还看到通信 Scala 对象作为 Scala 中 JCSP 的替代方案。但是这些似乎与真正的线程相关联 - 这似乎错过了 CSP 的好处之一,即摆脱保持大量线程始终处于活动状态的内存资源成本。
c# - 数据流(任务并行库)和异步等待
假设我在 .NET 中使用数据流块。据说“这个数据流模型促进了基于参与者的编程”,这正是我想要在这里得到的。
但是,如果我处理来自 aBufferBlock<T>
和消息处理器中的消息,我决定使用async
/ await
,这会将执行分叉到当前线程和等待任务的工作线程。
有什么方法可以防止参与者/消息处理器中的并发执行吗?
如果等待的任务使用带有本机回调的非阻塞 IO 操作执行,那很好。但我真的很想确保任何 .NET 代码只同步执行。
scala - Is it possible/advisable to have a different supervision strategy for different children of an Akka 2 actor?
I'm playing with Akka and I have a design in which a supervisor actor has a child playing role A and several children playing role B. I want to define a supervision policy such as A failures are escalated (terminating the supervisor) and B ones produces the individual actors to be restarted.
Is this possible? Is it advisable?
c# - WCF调用中基于请求参数的并行性?
有没有什么干净的方法可以让 WCF 调用根据请求参数应用最大并行度 1?
假设以下代码:
我想在这里根据 entityId 处理最多 1 个并行调用。我知道我可以为 WCF 设置并发选项,但这是并发的或单线程的。但是当我只需要每个 entityId 的单个调用时,将其设置为整个操作的单个调用似乎有点过于激烈。
我想我必须手动处理这个,但是如果不涉及演员模型库,我最好的选择是什么?
.net - Updated example of using Stact
I see many references to using Stact to implement ActorModel in C#. But I don't see any recent examples, and the documentation makes it hard to figure out what is the pit of success (which is unfortunate because TopShelf and MassTransit both have decent documentation). Are there any updated usage examples that go past the simple Receive examples, an integrate with something like an IoC container to create concrete Actor classes?
java - java中的任何actor模型是否允许对任务进行分组?
我在 mysql 中有 1000 行数据,我需要根据某些逻辑进行更新,由于某种原因,这些逻辑无法在 mysql 中使用批量更新完成,必须在 java 中完成。我需要将作业拆分为 20 个可管理的单元,每个单元有 50 个任务,所以对于每个小组,我将有 50 名演员来完成这项工作。
我制作了这张图来说明我的意思
java中的什么演员模型可以让我以这种方式对演员进行分组?