Akka(4)Chapter 2 General - Actor System
Chapter 2 General
2.1 Actor Systems
Hierarchical Structure
One actor might want to split up its task into smaller, more manageable pieces, for this purpose it starts child actors which it supervises.
Supervisor Details http://doc.akka.io/docs/akka/2.1.0/general/supervision.html#supervision
Each actor has exactly one supervisor, which is the actor that created it.
Configuration Container
The actor system as a collaborating ensemble of actors, it is the natural unit for managing shared facilities like scheduling services, configuration, logging, etc.
Several actor systems with different configuration may co-exist within the same JVM without problems.
Actor Best Practices
1. Actor should not block
2. Do not pass mutable objects between actors
…snip…
Blocking Needs Careful Management
2.2 What is an Actor
An actor is a container for State, Behavior, a Mailbox, Children and a Supervisor Strategy. All of this is encapsulated behind an Actor Reference.
Actor Reference
An actor object needs to be shielded from the outside in order to benefit from the actor model. Actors are represented to the outside using actor references.
The most important aspect is that it is not possible to look inside an actor and get hold of its state from the outside.
State
FSM module in details
http://doc.akka.io/docs/akka/2.1.0/scala/fsm.html#fsm-scala
Behavior
Every time a message is processed, it is matched against the current behavior of the actor.
Mailbox
The piece which connects sender and receiver is the actor's mailbox: each actor has exactly one mailbox to which all senders enqueue their messages.
There are different mailbox implementations to choose from, the default being a FIFO.
Children
Each actor is potentially a supervisor, it creates children for delegating sub-tasks, it will automatically supervise them.
All the children is maintained in the context of the actor, we can change that by creating content.actorOf(…) or stopping
Supervisor Strategy
The final piece of an actor is its strategy for handling faults of its children.
http://doc.akka.io/docs/akka/2.1.0/general/supervision.html#supervision
When an Actor Terminates
…go on…
References:
http://doc.akka.io/docs/akka/2.1.0/
http://doc.akka.io/docs/akka/2.1.0/general/index.html
AKKA 1~3
http://sillycat.iteye.com/blog/1767866
http://sillycat.iteye.com/blog/1768625
http://sillycat.iteye.com/blog/1768626
- 浏览: 2551732 次
- 性别:
- 来自: 成都
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
相关推荐
赠送jar包:akka-actor_2.11-2.5.19.jar; 赠送原API文档:akka-actor_2.11-2.5.19-javadoc.jar; 赠送源代码:akka-actor_2.11-2.5.19-sources.jar; 赠送Maven依赖信息文件:akka-actor_2.11-2.5.19.pom; 包含...
在本次讨论中,我们将聚焦于`akka-actor-1.0-RC2.jar.zip`这个压缩包,它包含了Akka Actor库的1.0 Release Candidate 2版本。 Akka的核心组件之一就是Actor系统,这是一个设计模式,用于处理并发和并行计算。在Akka...
赠送jar包:akka-actor_2.11-2.5.19.jar; 赠送原API文档:akka-actor_2.11-2.5.19-javadoc.jar; 赠送源代码:akka-actor_2.11-2.5.19-sources.jar; 赠送Maven依赖信息文件:akka-actor_2.11-2.5.19.pom; 包含...
赠送jar包:akka-actor_2.11-2.5.21.jar; 赠送原API文档:akka-actor_2.11-2.5.21-javadoc.jar; 赠送源代码:akka-actor_2.11-2.5.21-sources.jar; 赠送Maven依赖信息文件:akka-actor_2.11-2.5.21.pom; 包含...
赠送jar包:akka-actor_2.11-2.4.20.jar; 赠送原API文档:akka-actor_2.11-2.4.20-javadoc.jar; 赠送源代码:akka-actor_2.11-2.4.20-sources.jar; 赠送Maven依赖信息文件:akka-actor_2.11-2.4.20.pom; 包含...
赠送jar包:akka-actor_2.11-2.4.20.jar; 赠送原API文档:akka-actor_2.11-2.4.20-javadoc.jar; 赠送源代码:akka-actor_2.11-2.4.20-sources.jar; 赠送Maven依赖信息文件:akka-actor_2.11-2.4.20.pom; 包含...
赠送jar包:akka-actor_2.11-2.5.21.jar; 赠送原API文档:akka-actor_2.11-2.5.21-javadoc.jar; 赠送源代码:akka-actor_2.11-2.5.21-sources.jar; 赠送Maven依赖信息文件:akka-actor_2.11-2.5.21.pom; 包含...
akka-actor_2.11 jar包
Akka是JAVA虚拟机JVM平台上构建高并发、分布式和容错应用的工具包和运行时。Akka用Scala语言写成,同时提供了Scala和JAVA的开发...Akka处理并发的方法基于Actor模型。在Akka里,Actor之间通信的唯一机制就是消息传递。
`akka-typed-actor-1.0-RC2.jar`是Akka Typed Actor的特定版本库,包含了该版本的所有功能。在项目中引入此jar包,即可使用其中的类和API来开发和运行Typed Actor应用。 总结,Akka Typed Actor通过引入强类型的...
akka-actor_2.12 jar包
Akka是JAVA虚拟机JVM平台上构建高并发、分布式和容错应用的工具包和运行时。Akka用Scala语言写成,同时提供了Scala和JAVA的开发...Akka处理并发的方法基于Actor模型。在Akka里,Actor之间通信的唯一机制就是消息传递。
spark,akka,actor工具类,版本2.11;akka.actor override def receive: Receive = { case mess: Message => { if (mess.message.equals("")) { println(mess.message) } } }
赠送jar包:akka-stream_2.11-2.5.21.jar; 赠送原API文档:akka-stream_2.11-2.5.21-javadoc.jar; 赠送源代码:akka-stream_2.11-2.5.21-sources.jar; 赠送Maven依赖信息文件:akka-stream_2.11-2.5.21.pom; ...
akka-persistence-sql-async, 一个用于akka持久性的日志和快照存储 akka-persistence-sql-async 的日志和快照存储插件( akka持久化插件。 Akka-persistence-sql-async执行由 scalikejdbc异步查询,它提供非阻塞api来...
赠送jar包:akka-stream_2.11-2.5.21.jar; 赠送原API文档:akka-stream_2.11-2.5.21-javadoc.jar; 赠送源代码:akka-stream_2.11-2.5.21-sources.jar; 赠送Maven依赖信息文件:akka-stream_2.11-2.5.21.pom; ...
基于scala 、akka实现了一个简单的报表工具。该项目是个玩具项目,用于个人学习scala和akka。使用scala语言开发,基于akka-http, akka-stream,akka-cluster等新...流控 Back-Pressure, 避免OutOfMemory(akka-stream).
在实际项目中,使用“akka-actor-1.1.2.jar.zip”时,开发者通常会结合Akka的其他模块,如Akka Streams(用于处理数据流)、Akka Persistence(用于持久化Actor状态)等,构建出高度灵活和可扩展的应用程序。...
赠送jar包:akka-protobuf_2.11-2.4.20.jar; 赠送原API文档:akka-protobuf_2.11-2.4.20-javadoc.jar; 赠送源代码:akka-protobuf_2.11-2.4.20-sources.jar; 赠送Maven依赖信息文件:akka-protobuf_2.11-2.4.20....
赠送jar包:akka-protobuf_2.11-2.4.20.jar; 赠送原API文档:akka-protobuf_2.11-2.4.20-javadoc.jar; 赠送源代码:akka-protobuf_2.11-2.4.20-sources.jar; 赠送Maven依赖信息文件:akka-protobuf_2.11-2.4.20....