Akka Concurrency: Akka Does Concurrency

Actor模型

Concurrency Through Messaging

actor之间通过消息传递信息,当你发送一个消息给actor,它会快速做出相应并返回处理结果.根据这种模式可以扩展出成千上网个actor,但整个系统还是合理简单的.

Concurrency Through Delegation

支持同时批量的发送消息给多个actor,而只接收第一个处理完的那个actor返回的结果.

Doing One Thing at a Time

一个actor在当前时间只处理一件事情,这就是并发模型.如果你需要同时处理更多事情,则需要创建更多的actor.

The Message is the Message

An Actor Is Behaviour