Actor 開發模型庫,Akka 2.4 RC1 發布
Akka 是一個用 Scala 編寫的庫,用于簡化編寫容錯的、高可伸縮性的 Java 和 Scala 的 Actor 模型應用。
Actor模型并非什么新鮮事物,它由Carl Hewitt于上世紀70年代早期提出,目的是為了解決分布式編程中一系列的編程問題。其特點如下:
-
系統中的所有事物都可以扮演一個Actor
-
Actor之間完全獨立
-
在收到消息時Actor所采取的所有動作都是并行的,在一個方法中的動作沒有明確的順序
-
Actor由標識和當前行為描述
-
Actor可能被分成原始(primitive)和非原始(non primitive)類別
-
非原始Actor有
-
由一個郵件地址表示的標識
-
當前行為由一組知識(acquaintances)(實例變量或本地狀態)和定義Actor在收到消息時將采取的動作組成
-
消息傳遞是非阻塞和異步的,其機制是郵件隊列(mail-queue)
-
所有消息發送都是并行的
Akka 2.4 RC1 發布,相比最后一個 M 版本,主要改進如下:
-
Persistence Query types for LevelDB
-
protobuf serialization for Cluster Sharding, Cluster Client and Cluster Singleton
-
possibility to use Distributed Data module as storage for the state of the sharding coordinator instead of using Akka Persistence, contribution by Evgeniy Ostapenko
-
improvements of the ReceivePipeline, contribution by jeremystone
Akka 2.4.0 主要改進如下:
-
we dropped support for Java 6 & 7 as announced in the last roadmap update, and now require Java 8 or later
-
we dropped support for Scala 2.10, kept 2.11 and added 2.12 (which is at milestone 2 currently); this is in keeping with our policy to support the Scala version that is “current” when the first milestone comes out plus any later version that is published during this series’ lifetime
-
Akka Persistence was promoted to a fully supported module (not experimental)
-
added experimental stream based API for the Query Side of Akka Persistence (implementations must be provided by query plugins corresponding to the journal plugins for the various data stores)
-
improved support for Akka Persistence event migrations by Serializer with String Manifest and Event Adapters and prepared comprehensive documentation of strategies for schema evolution of persistent events
-
made Akka Persistence failure handling more robust and support rejections of events
-
Akka Persistence can now use multiple different Journals within one ActorSystem (thanks to Andrei Pozolotin, who also split out ClusterMetrics into their own module)
-
introduced Persistent FSM, thanks to an awesome contribution from leonidb
-
simplified setting up Akka Clusters behind NAT (including inside Docker containers)
-
we added the experimental Akka Typed module previously codenamed Project G?lbma, a new way of formulating Actor interactions with full type-system support
-
we promoted the ClusterSingleton, ClusterClient, DistributedPubSub and ClusterSharding patterns to fully a supported Cluster Tools module, including various API and configuration improvements
-
ClusterSharding also learnt a few new tricks (graceful shutdown, asynchronous shard allocation, reviving entries after migration thanks to Dominic Black, and more flexible use of roles [thanks to Richard Marscher)
-
use custom failure detection in ClusterClient to avoid quarantining in case of transient network failures
-
added experimental Akka Distributed Data which was previously known as Akka Data Replication (see akka-data-replication migration guide), the Distributed Data module is useful for sharing eventually consistent data (CRDTs) between nodes in an Akka Cluster
-
the SLF4J logging adapter can now apply the log filtering rules prior to sending to the EventStream, see the migration guidebut the biggest feature is probably that Akka 2.4 will be binary backwards compatible with Akka 2.3, see the detailed description below.
下載:https://github.com/akka/akka/archive/v2.4.0-RC1.zip。