- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试对 Erlang 中的参与者进行非常基本的解释。它应该尽可能简单,但不遗漏理论的关键特征或它的 Erlang 实现。这是我的解释:
The actor model is a mathematical model of concurrent computation that treats actors as the universal primitives of concurrent computation. The actor is a computational entity that, in response to a message it receives, can concurrently (1) send a finite number of messages to other actors, (2) create a finite number of new actors, and (3) designate the behavior to be used for the next message it receives.
In Erlang, each actor is a separate process in the virtual machine, implemented by a function. Processes communicate by sending messages to each other. Every message is explicit, traceable and safe. The messages are received in a mailbox and stored in the order in which they are received. They are stored there until the receiving process takes them out to be read. This is called asynchronous message passing.
大家怎么看?可以吗?我应该添加或更改任何内容吗?谢谢。
最佳答案
我认为,如果您不将 actor 与 Erlang 进程混淆,您就会对自己有所帮助。你从维基百科对 Actor 模型的描述开始,只是为了无缝地开始写关于 Erlang 进程的文章,就像它是一个一样的。 Actor 模型是一种数学模型,可以通过多种不同的方式实现,包括纯 C 或 C++ 低级实现。另一方面,Erlang 进程是轻量级的抢占式语言特性,与使用 native 系统进程甚至线程相比,它可以更有效地并行运行大量进程。碰巧它们是根据数学模型建模的,但这是基于 specific requirements 的设计决策。 .
我认为,如果您将 Actor 模型本身作为一个数学模型进行简要讨论,然后再讨论它是如何在 Erlang 中实现的,并指出 Erlang 特有的任何差异和特性,我认为它们会更好地结合在一起。
关于multithreading - Erlang中Actor的基本解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36789810/
我有一个数据框: title | cast ------------------------------ movie1 | cast1,cast2,cast3 movie2
据我所知,Actor 模型是一种关于并发的理论。 Erlang 和 Scala 都实现了这个理论模型,但它们的实现都不完全符合 Actor 模型。 从计算机科学家的角度来看,Erlang、Scala
我是 akka 流的新手。我将 kafka 用作源(使用 ReactiveKafka 库)并通过流对数据进行一些处理并使用订阅者 (EsHandler) 作为接收器。 现在我需要处理错误并通过错误处理
考虑以下代码示例(版本 1)。此处父 actor (ActorA) 向子 actor (ActorB) 发送消息,然后停止自身。由于父 actor 的自停止,在高负载下,子 actor 甚至在从邮箱中
我有以下 Scala 代码: package dummy import javax.servlet.http.{HttpServlet, HttpServletRequest => H
如何描述“数据流编程”和“ Actor 模型”之间的区别?据我了解,它们并非无关,但又不相同。 DF 是否是一个更广泛的概念,其要点是与控制流模型的区别,而 Actor 模型是更详细的和理论上有根基的
GPars 中的 Actor 有自己的消息队列(邮箱)。假设一个参与者有 15 条待处理的消息,然后系统突然宕机(比如由于电源故障)。这 15 条消息会发生什么。当系统再次启动并运行时,消息队列会自动
我刚刚开始使用 AKKA,并且有一个关于非参与者代码如何与参与者代码对话的基本问题。 非参与者代码如何调用参与者并获得响应?我试过使用 Patterns.ask 从非 Actor 调用 Actor ,
这个问题在这里已经有了答案: 关闭 9 年前。 Possible Duplicate: Casting vs using the ‘as’ keyword in the CLR 我最近了解到一种不同
我在设置边界矩形位置时遇到麻烦,这就是我问这个的原因。当我设置 Actor 类型的对象的边界矩形位置时,看来我传递给 [setBounds(x,y,with,height)] 2 的坐标相对于 Act
我是 Actor 模型的新手。任何人都可以解释 Actor 模型中 Actor 的生命周期吗?我一直在文档中寻找答案,但找不到任何令人满意的内容。 我对 Actor 完成后做什么很感兴趣onRecei
例如,我有两个 Actor ——一个父 Actor 和一个子 Actor 。当 parent 收到一条消息时,它会产生与消息中指定的一样多的子actor。如何测试此功能?有没有办法模拟上下文或其他方法
我目前在 Futures 编程,我对 Actor 很好奇。我想听听有经验的声音: Actor 相对于 future 有什么优势? 我什么时候应该使用一种而不是另一种? 据我所知, Actor 持有状态
Actor 模型框架(例如 Orleans )和复杂事件处理 (CEP)(例如 Apache Storm )之间有什么区别? 其中每种方法都适用(或者一种方法比另一种方法更适用)的使用示例肯定会有所帮
你们中的任何人都可以帮助我理解传入的基本消息吗scala 使用 Actor 模型? 我正在尝试编写一个包含 3 个 Actor 的简单程序。 Actor “BossActor”创建了 2 个 Acto
Akka 1.1.3 文档指出“become 方法对于许多不同的事情都很有用,但它的一个特别好的例子是它用于实现有限状态机 (FSM) 的示例”。在运行时热交换 Akka actor 的实现还有哪些其
我正在尝试使用参与者实现消息处理管道。管道的步骤包括读取、过滤、扩充以及最后存储到数据库中等功能。类似于此:http://sujitpal.blogspot.nl/2013/12/akka-conte
可以使用 actor.send() 或 actor.offer() 向 Actor 发送消息一旦我的 Actor 从其 channel 收到消息,我想返回响应。我该怎么做呢?我没有看到任何明显的内置方
你们中的任何人都可以帮助我理解传入的基本消息吗scala 使用 Actor 模型? 我正在尝试编写一个包含 3 个 Actor 的简单程序。 Actor “BossActor”创建了 2 个 Acto
我目前正在尝试保存特殊 Actors所以如果加载旧 map ,我可以再次将它们放在 map 上。因此我想将它们放入 HashMap> monsterAtMap 中并从那里删除它们Stages .所以我
我是一名优秀的程序员,十分优秀!