欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Actor model
来自开放百科 - 灰狐
(版本间的差异)
小 (→项目) |
小 (→链接) |
||
(未显示1个用户的29个中间版本) | |||
第4行: | 第4行: | ||
==简介== | ==简介== | ||
+ | An actor is a container for State, Behavior, a Mailbox, Children and a Supervisor Strategy. | ||
+ | |||
+ | Actor 由状态(state)、行为(behavior)、邮箱(mailbox)三者组成。 | ||
+ | |||
+ | 参与者是封装状态和行为的对象,参与者仅通过交换消息进行通信,Actor 模型的本质就是消息传输。 | ||
+ | |||
+ | 作为一种计算实体,Actor 与原子类似。 | ||
+ | |||
参与者是一个运算实体,回应接受到的消息,同时并行的: | 参与者是一个运算实体,回应接受到的消息,同时并行的: | ||
第18行: | 第26行: | ||
参与者模型的特征是,参与者内部或之间进行并行计算,参与者可以动态创建,参与者地址包含在消息中,交互只有通过直接的异步消息通信,不限制消息到达的顺序。 | 参与者模型的特征是,参与者内部或之间进行并行计算,参与者可以动态创建,参与者地址包含在消息中,交互只有通过直接的异步消息通信,不限制消息到达的顺序。 | ||
− | ==项目== | + | ==语言&项目== |
+ | *[[ActorX]] | ||
*[[Akka]] | *[[Akka]] | ||
− | *[ | + | *[[Akka.NET]] |
*[[Erlang]] | *[[Erlang]] | ||
+ | *[https://github.com/actix/actix Actix][[Rust]], Actix actors support for [https://github.com/actix/actix-web actix web framework] | ||
+ | *[https://github.com/puniverse/pulsar pulsar] for [[Clojure]] | ||
+ | *[https://github.com/ponylang/ponyc Pony] is an open-source, actor-model, capabilities-secure, high performance programming language | ||
+ | *[https://github.com/jodal/pykka Pykka] is a Python implementation of the actor model | ||
+ | *[https://github.com/stagas/drama drama] is an Actor model implementation for JavaScript and Node.js | ||
+ | *[https://github.com/benlau/nactor nactor] [[Node.js]] actor model framework for game | ||
+ | *[https://github.com/lichuang/qnode qnode(cute node)] - C + Lua + Actor Model = Erlang-like system | ||
+ | *[https://github.com/videlalvaro/phacterl phacterl] The Actor Model in [[PHP]] | ||
+ | *[https://github.com/xfguo/luactor LuActor] - Actor Model for Lua | ||
*[[GearPump]] | *[[GearPump]] | ||
*[https://github.com/actor-framework/actor-framework CAF] [[C++ Actor Framework]] | *[https://github.com/actor-framework/actor-framework CAF] [[C++ Actor Framework]] | ||
第27行: | 第45行: | ||
*[[Orleans]] Distributed Virtual Actor Model in [[.NET]] [https://github.com/OrleansContrib OrleansContrib] [https://dotnet.github.io/orleans/Community/Who-Is-Using-Orleans.html Orleans用户] [https://www.halowaypoint.com 尤其Halo游戏的成功应用] | *[[Orleans]] Distributed Virtual Actor Model in [[.NET]] [https://github.com/OrleansContrib OrleansContrib] [https://dotnet.github.io/orleans/Community/Who-Is-Using-Orleans.html Orleans用户] [https://www.halowaypoint.com 尤其Halo游戏的成功应用] | ||
*[https://github.com/fsprojects/Cricket Cricket] An actor framework for [[F Sharp|F#]] | *[https://github.com/fsprojects/Cricket Cricket] An actor framework for [[F Sharp|F#]] | ||
+ | *[https://github.com/VaughnVernon/ReactiveMessagingPatterns_ActorModel Reactive Messaging Patterns with the Actor Model--Applications and Integration in Scala and Akka] | ||
+ | *[https://github.com/nousxiong/gce Game Communication Environment (GCE)] | ||
+ | *[[Apache Mesos]]使用[https://github.com/apache/mesos/blob/bf507a208da3df360294896f083dd163004324aa/3rdparty/libprocess/README.md Actor编程模型]进行消息传递。 | ||
+ | *[[Ruby]] 现在是多核的时代,并发性很重要。有了 Ractor(它是一个基于 Actor 模型的并发抽象层,提供了无需担心线程安全的并行环境) 和异步 Fiber,Ruby 将会成为一门真正的并发语言。—— Matz | ||
==图集== | ==图集== | ||
<gallery> | <gallery> | ||
+ | image:actor.png|Actor | ||
+ | image:Orleans-as-a-Stateful-Middle-Tier.png|Actor中间层 | ||
+ | image:Actor-Model-as-Stateful-Middle-Tier.png|Actor中间层 | ||
+ | image:akka-actor-hierarchy.png|Akka actor层次结构 | ||
+ | image:Akka.NET-IoT-Architecture.png|Akka.NET | ||
image:actor-lifecycle.png|生命周期 | image:actor-lifecycle.png|生命周期 | ||
+ | image:Actor-framework-class-diagram.png|类型 | ||
+ | image:squbs-actor-hierarchy.png|squbs | ||
</gallery> | </gallery> | ||
==链接== | ==链接== | ||
+ | *[http://www.csharpkit.com/actor-model.html .NET Actor模型] | ||
[[category:actor model]] | [[category:actor model]] | ||
+ | [[category:erlang]] | ||
[[category:Concurrent computing]] | [[category:Concurrent computing]] | ||
+ | [[category:huihoo]] |
2023年11月12日 (日) 14:26的最后版本
您可以在Wikipedia上了解到此条目的英文信息 Actor model Thanks, Wikipedia. |
参与者模型推崇的哲学是“一切皆是参与者”,这与面向对象编程的“一切皆是对象”类似,但是面向对象编程通常是顺序执行的,而参与者模型是并行执行的。
目录 |
[编辑] 简介
An actor is a container for State, Behavior, a Mailbox, Children and a Supervisor Strategy.
Actor 由状态(state)、行为(behavior)、邮箱(mailbox)三者组成。
参与者是封装状态和行为的对象,参与者仅通过交换消息进行通信,Actor 模型的本质就是消息传输。
作为一种计算实体,Actor 与原子类似。
参与者是一个运算实体,回应接受到的消息,同时并行的:
- 发送有限数量的消息给其他参与者;
- 创建有限数量的新参与者;
- 指定接受到下一个消息时的行为。
以上操作不含有顺序执行的假设,因此可以并行进行。
发送者与已经发送的消息解耦,是参与者模型的根本优势。这允许进行异步通信,同时满足消息传递的控制结构。
消息接收者是通过地址区分的,有时也被称作“邮件地址”。因此参与者只能和它拥有地址的参与者通信。它可以通过接受到的信息获取地址,或者获取它创建的参与者的地址。
参与者模型的特征是,参与者内部或之间进行并行计算,参与者可以动态创建,参与者地址包含在消息中,交互只有通过直接的异步消息通信,不限制消息到达的顺序。
[编辑] 语言&项目
- ActorX
- Akka
- Akka.NET
- Erlang
- ActixRust, Actix actors support for actix web framework
- pulsar for Clojure
- Pony is an open-source, actor-model, capabilities-secure, high performance programming language
- Pykka is a Python implementation of the actor model
- drama is an Actor model implementation for JavaScript and Node.js
- nactor Node.js actor model framework for game
- qnode(cute node) - C + Lua + Actor Model = Erlang-like system
- phacterl The Actor Model in PHP
- LuActor - Actor Model for Lua
- GearPump
- CAF C++ Actor Framework
- Skynet game framework
- Orleans Distributed Virtual Actor Model in .NET OrleansContrib Orleans用户 尤其Halo游戏的成功应用
- Cricket An actor framework for F#
- Reactive Messaging Patterns with the Actor Model--Applications and Integration in Scala and Akka
- Game Communication Environment (GCE)
- Apache Mesos使用Actor编程模型进行消息传递。
- Ruby 现在是多核的时代,并发性很重要。有了 Ractor(它是一个基于 Actor 模型的并发抽象层,提供了无需担心线程安全的并行环境) 和异步 Fiber,Ruby 将会成为一门真正的并发语言。—— Matz
[编辑] 图集
[编辑] 链接
分享您的观点