Akka 2.4 M2 发布,此版本包括一些 2.4-M1 的改进:
incorporate Patrik’s akka-data-replication under the new module name akka-distributed-data-experimental (see akka-data-replication migration guide), the Distributed Data module is useful for sharing eventually consistent data (CRDTs) between nodes in an Akka Cluster
improved support for Akka Persistence event migrations by Serializer with String Manifest and Event Adapters
make Akka Persistence failure handling more robust and support rejections of events
Persistent FSM , thanks to an awesome contribution from leonidb
various improvements in Akka Persistence aiming to finalize its APIs, refer to the migration guide or closed persistence tickets for details
use custom failure detection in Cluster Client to avoid quarantining in case of transient network failures
support graceful shutdown in Cluster Sharding
various API and configuration improvements of Cluster Sharding, Cluster Singleton, Distributed PubSub and Cluster Client
Akka 2.4.0-RC1 将会包括的新特性:
complete the Java API and the documentation for Akka Typed
finalize Akka Persistence on the Write Side (i.e. PersistentActor will be non-experimental; the work on the Read Side will be deferred until Akka 2.5)
incorporate Streams & HTTP once ready (to become an experimental module, as usual)
更多改进内容请看 发行说明 。
下载: https://github.com/akka/akka/archive/v2.4-M2.zip 。
Akka 是一个用 Scala 编写的库,用于简化编写容错的、高可伸缩性的 Java 和 Scala 的 Actor 模型应用。
Actor模型并非什么新鲜事物,它由Carl Hewitt于上世纪70年代早期提出,目的是为了解决分布式编程中一系列的编程问题。其特点如下:
系统中的所有事物都可以扮演一个Actor
Actor之间完全独立
在收到消息时Actor所采取的所有动作都是并行的,在一个方法中的动作没有明确的顺序
Actor由标识和当前行为描述
Actor可能被分成原始(primitive)和非原始(non primitive)类别
非原始Actor有
由一个邮件地址表示的标识
当前行为由一组知识(acquaintances)(实例变量或本地状态)和定义Actor在收到消息时将采取的动作组成
消息传递是非阻塞和异步的,其机制是邮件队列(mail-queue)
所有消息发送都是并行的