Akka是个什么鬼?

来源:互联网 发布:win7装ubuntu双系统 编辑:程序博客网 时间:2024/04/28 09:15

What is Akka?Akka是什么?

Scalable real-time transaction processing 可伸缩实时事务处理

We believe that writing correct concurrent, fault-tolerant and scalableapplications is too hard. Most of the time it's because we are using the wrongtools and the wrong level of abstraction. Akka is here to change that. Usingthe Actor Model we raise the abstraction level and provide a better platform tobuild scalable, resilient and responsive applications—see theReactiveManifesto for more details. Forfault-tolerance we adopt the "let it crash" model which the telecom industryhas used with great success to build applications that self-heal and systemsthat never stop. Actors also provide the abstraction for transparentdistribution and the basis for truly scalable and fault-tolerant applications. 我们认为编写正确的并行、容错和可伸缩的程序是非常困难的。大多数的时候是由于我们使用了错误的工作和错误的抽象层级。Akka就是为了改变此而来。Akka使用Actor模型我们提升了抽象层级,提供了一个编写可伸缩、有弹性和响应式的程序--访问ReactiveManifesto看更多细节。容错方面我们采用“随它崩溃”的模型,这种模型在电信行业应用得很成功,用此模型我们可以构建自愈且永不停止的程序。Actors 也提供了清晰的分布式程序的抽象,和构建真正的可伸缩容错程序的基础。

Akka is Open Source and available under the Apache 2 License.Akka是在Apache2协议下的开源软件。

Download from http://akka.io/downloads.在此网址下载。

Please note that all code samples compile, so if you want direct access to the sources, have a lookover at the Akka Docs subproject on github: forJavaand Scala.请注意,如果你像查看源码,请访问github。

Akka implements a unique hybrid Akka实现了独有的混合

Actors

Actors give you: Actors 让你:

  • Simple and high-level abstractions for concurrency and parallelism.并行或并发程序的简单而高层级的抽象。
  • Asynchronous, non-blocking and highly performant event-driven programming model.异步、非阻塞和高性能的时间驱动编程模型。
  • Very lightweight event-driven processes (several million actors per GB of heap memory).超轻量化时间驱动进程(内存堆中每GB可有数百万actors)

See the chapter for Scala or Java. 请看相关章节。

Fault Tolerance 容错

  • Supervisor hierarchies with "let-it-crash" semantics.“随它崩溃”模型的多层次监督。
  • Supervisor hierarchies can span over multiple JVMs to provide truly fault-tolerant systems.跨多台JVM的多层次监督,提供真正的容错系统。
  • Excellent for writing highly fault-tolerant systems that self-heal and never stop.高效编写高容错、自愈且永不停止的系统

See Fault Tolerance (Scala) and Fault Tolerance (Java). 请看相关章节。

Location Transparency 位置透明性

Everything in Akka is designed to work in a distributed environment: allinteractions of actors use pure message passing and everything is asynchronous.Akka中的任何事物都是为了运行在分布式系统下而设计:actors间的交互都仅仅是通过消息传递来进行,所有都是异步的。

For an overview of the cluster support see the Javaand Scala documentation chapters.集群支持方面,请查看相关章节。

Persistence 持久化

Messages received by an actor can optionally be persisted and replayed when the actor is started orrestarted. This allows actors to recover their state, even after JVM crashes or when being migratedto another node.一个actor收到的消息可以选择性的持久化和在启动或重新启动的时候重播。这就使得actors可以修复状态,甚至在JVM崩溃或者迁移到其它节点的时候。

You can find more details in the respective chapter for Java or Scala.请查看相关章节。

Scala and Java APIs 编程接口

Akka has both a Scala Documentation and a Java Documentation.Akka 分别拥有Scala与Java的文档。

Akka can be used in two different ways Akka有两种用法

Akka can be used and deployed in different ways: Akka可以有两种使用和部署的方法:

  • As a library: used as a regular JAR on the classpath and/or in a web app, tobe put intoWEB-INF/lib作为库:作为常规的jar包,配置在classpath中或者webapp 的lib目录下
  • Package with sbt-native-packager  用sbt-native-packager打包
  • Package and deploy using Typesafe ConductR. 用Tpyesafe_ConductR打包和部署。
1 0
原创粉丝点击