Akka(1)Introduction
1. Introduction
1.1 What is Akka?
Design to write correct concurrent, fault-tolerant and scalable applications.
Akka implements a unique hybrid
Actors
Simple and high-level abstractions for concurrency and parallelism.
Asynchronous, non-blocking and highly performant event-driven programming model.
lightweight event-driven processes, 2.7 million actors per GB RAM
Scala documents: http://doc.akka.io/docs/akka/2.1.0/scala/actors.html#actors-scala
Fault Tolerance
Fault handling in Practice for scala
http://doc.akka.io/docs/akka/2.1.0/scala/fault-tolerance.html#fault-tolerance-scala
Location Transparency
All interactions of actors use pure message passing and everything is asynchronous.
http://doc.akka.io/docs/akka/2.1.0/general/remoting.html#remoting
Transactors
transactors combine actors and Software Transactional Memory(STM) into transactional actors.
http://doc.akka.io/docs/akka/2.1.0/scala/transactors.html#transactors-scala
Scala APIs
http://doc.akka.io/docs/akka/2.1.0/scala/index.html#scala-api
Akka can be used in 2 different ways
As a library in WEB-INF/lib
As a microkernel, stand-alone kernel
http://doc.akka.io/docs/akka/2.1.0/scala/microkernel.html#microkernel-scala
1.2. Why Akka?
…snip...
1.3 Getting Started
Getting Started Guides and Template Projects
Install Typesafe Stack
Follow the document here: http://typesafe.com/stack/download-agreed
Install scala, set, maven and giter8. But I already have all of them except giter8.
>sudo port install giter8
And download the file from here http://downloads.typesafe.com/typesafe-stack/2.0.2/typesafe-stack-2.0.2.tgz
Unzip and place in working directory.
I already have all the tools, so I do not need type safe stack bin, I just will go through the example.
Visit this page, you can find all the examples:
https://github.com/typesafehub
Modules
akka-actor Classic Actors, Typed Actors, IO Actor etc.
akka-remote Remote Actors
akka-testkit
akka-kernel Akka microkernel for running a bare-bones mini application server
akka-transactor Transactional actors
akka-agent
akka-camel
akka-zeromq ZeroMQ integration
akka-slf4j
akka-filebased-mailbox
Using a release distribution
Download the file from here: http://typesafe.com/stack/downloads/akka
Using with sbt
"typesafe repo" at "http://repo.typesafe.com/typesafe/releases/",
"com.typesafe.akka" %% "akka-actor" % "2.1.0",
"com.typesafe.akka" %% "akka-testkit" % "2.1.0",
"com.typesafe.akka" %% "akka-transactor" % "2.1.0",
How can I use and deploy Akka
…snip…
References:
http://akka.io/
http://doc.akka.io/docs/akka/2.1.0/
http://typesafe.com/resources/tutorials/getting-started-with-akka-scala.html#getting-started-with-akka-scala
https://github.com/typesafehub
分享到:
相关推荐
Akka入门与实践作者在工作中有很多使用Java 8 和Scala 来编写Akka 应用程序的经验,但是在编 写本书的过程中,学到了很多更深入的Akka 细节。这本书很好地介绍了为什么要使用 Akka,以及如何使用Akka,并且展示了...
Introduction ##### 1.1 What is Akka? Akka 是一个高性能、分布式服务框架,基于 Actor 模型设计,适用于构建高并发、分布式和容错性强的应用程序。Akka 的核心是 Actor 模型,它提供了一种轻量级的并发模型,能够...
Chapter 1: Introduction to Reactive Streams Chapter 2: Existing Models of Concurrency in Java Chapter 3: Common Concepts Chapter 4: RxJava Chapter 5: Reactor Chapter 6: Akka Streams Chapter 7: Android...
akka学习文档,英文、java、scale; 中文版请参考 http://udn.yyuap.com/doc/akka-doc-cn/2.3.6/scala/book/chapter1/introduction.html
1. **Reactive**: Akka Stream遵循Reactive Manifesto,强调响应性、弹性、容错性和消息驱动。这意味着系统可以优雅地处理故障,并在资源有限的情况下保持高效率。 2. **Backpressure**: Akka Stream支持背压机制,...
Explore frameworks such as SparkJava, Vert.x, Akka, and JavaFX Boost your knowledge about the dialects of other well-known programming languages that run on JVM, including JavaScript, Python, and Ruby
#### Introduction to Akka **Akka** is a toolkit and runtime designed for building highly concurrent, distributed, and fault-tolerant systems on the Java Virtual Machine (JVM). It leverages the actor ...
Chapter 1: An Introduction to SMACK Chapter 2: The Model - Scala and Akka Chapter 3: The Engine - Apache Spark Chapter 4: The Storage - Apache Cassandra Chapter 5: The Broker - Apache Kafka Chapter 6:...
Chapter 1. Introduction to FP, Reactive, and Scala Chapter 2. Creating Your App Architecture and Bootstrapping with SBT Chapter 3. Developing the UI with Play Framework Chapter 4. Developing Reactive ...
The book begins with an introduction to the functional capabilities of the Scala programming language that are critical to the creation of machine learning algorithms such as dependency injection and...
“Quick introduction to Play”则为不熟悉Play框架的读者提供了快速的入门教程;“Futures”部分涉及到Scala中的Future,这在反应式编程中用于处理异步操作;“Actors”讲解了Akka中的actor模型,这是构建并发和...
一、基本介绍(The Introduction) Kubernetes作为一种容器化部署和运维平台,因其易部署、运维,更高的资源利用率以及更好的资源隔离和安全性等特点,在京东得到了广泛的应用。容器化历程可以概括为2018年6月开始有20...
In the first chapter, I will provide a fuller introduction to the book architecture and chapter contents. I will describe the big data stack structure as well as extended topics such as scaling and ...