Akka v2.5.0-RC1 發布,Actor 模型開發庫

jopen 7年前發布 | 7K 次閱讀 Actor Java Scala 模型應用 AKKA

 

Akka 是一個用 Scala 編寫的庫,用于簡化編寫容錯的、高可伸縮性的 Java 和 Scala 的 Actor 模型應用。它已經成功運用在電信行業。系統幾乎不會宕機(高可用性 99.9999999 % 一年只有 31 ms 宕機)。

Actor模型并非什么新鮮事物,它由Carl Hewitt于上世紀70年代早期提出,目的是為了解決分布式編程中一系列的編程問題。其特點如下:

  • 系統中的所有事物都可以扮演一個Actor
  • Actor之間完全獨立
  • 在收到消息時Actor所采取的所有動作都是并行的,在一個方法中的動作沒有明確的順序
  • Actor由標識和當前行為描述
  • Actor可能被分成原始(primitive)和非原始(non primitive)類別
  • 非原始Actor有
    • 由一個郵件地址表示的標識
    • 當前行為由一組知識(acquaintances)(實例變量或本地狀態)和定義Actor在收到消息時將采取的動作組成
  • 消息傳遞是非阻塞和異步的,其機制是郵件隊列(mail-queue)
  • 所有消息發送都是并行的

更新日志

  • The Java API for AbstractActor was promoted to fully stable API. While doing this we made some small, yet important, improvements to the API that will require some mechanical changes of your source code.Thanks to@ortigali for help.
  • Faster and more flexible Akka Streams materializer, which matters for short lived streams, such as HTTP requests.
  • Distributed Data was promoted to a fully stable module. Several improvements were also included, such as:
    • Support for delta-CRDTs in Distributed Data to reduce the amount of data that is replicated, thanks to help from @gosubpl.
    • Generic type for the key in Distributed Data ORMap, thanks to @jgordijn
  • Coordinated shutdown to facilitate ordered stopping of actors and services and perform registered tasks during the shutdown process. This greatly simplifies tasks involved in graceful leaving of Akka Cluster.
  • Support remembering entities in Cluster Sharding with the Distributed Data (ddata) mode. ddata is now also the default mode for Cluster Sharding.
  • New Java API for Testkit taking advantage of lambas, thanks to @Hawstein
  • Fix performance regression for Scala 2.12, due to change in scheduling fairness of the JDK8 ForkJoinPool implementation
  • We added @ApiMayChange and other annotations which can be used to mark experimental API inside stable modules, primarily for use in Akka HTTP. API improvements of Akka Typed, including Java API

下載

本站原創,轉載時保留以下信息:
本文轉自:深度開源(open-open.com)
原文地址:http://www.baiduhome.net/news/view/38e50a97

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!