Actor Model

Actors [1] provide a flexible model of concurrency for open distributed systems. Actors can be used to model traditional functional, procedural, or object oriented systems. Actors are independent, concurrent entities that communicate by exchanging messages asynchronously. Each actor encapsulates a state and a thread of control that manipulates this state. In response to a message, an actor may perform one of the following actions (see Figure 2.1):

  • Alter its current state, possibly changing its future behavior.
  • Send messages to other actors asynchronously.
  • Create new actors with a specified behavior.
  • Migrate to another computing host.

    这里写图片描述
    Figure 2.1: Actors are reactive entities. In response to a message, an actor can (1) change its internal state, (2) send messages to peer actors, (3) create new actors, and/or (4) migrate to another computing host.
    Actor Model

Actors receive messages not necessarily in the same order that they were sent. All the received messages are initially buffered in the receiving actor’s message box before being processed. Communication between actors is weakly fair: an actor infinitely often ready to receive a message will eventually get it. An actor can interact with another actor only if it has a reference to it. Actor references are first class entities. They can be communicated in messages to allow for arbitrary actor communication topologies. Because actors can create arbitrarily new actors, the model supports unbounded concurrency. Furthermore, because actors only communicate through asynchronous message passing, in particular because there is no shared memory, actor systems are highly reconfigurable.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值