Akka 简介与入门
Akka 简介与入门
http://www.thinksaas.cn/group/topic/344095/
参考官网 http://akka.io/
开源代码 https://github.com/akka/akka
Slogan:
Build powerful concurrent &distributed applications more easily.
轻松构建健壮的并发和分布式应用
Akka是什么?
Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM.
Akka是一个在JVM上构建高并发、分布式和可快速恢复的消息驱动应用的工具集和运行时。
Akka特性
Simple Concurrency &Distribution 简单的并发和分布式
Asynchronous and Distributed by design. High-level abstractions like Actors, Futures and STM.
Resilient by Design 快速恢复设计
Write systems that self-heal. Remote and/or local supervisor hierarchies.
High Performance 高性能
50 million msg/sec on a single machine. Small memory footprint;~2.5 million actors per GB of heap.
Elastic &Decentralized 弹性和去中心化
Adaptive load balancing, routing, partitioning and configuration-driven remoting.
Extensible 可扩展
Use Akka Extensions to adapt Akka to fit your needs.
重要概念/术语
Actors
Actors are very lightweight concurrent entities. They process messages asynchronously using an event-driven receive loop. Pattern matching against messages is a convenient way to express an actor's behavior. They raise the abstraction level and make it much easier to write, test, understand and maintain concurrent and/or distributed systems. You focus on workflow—how the messages flow in the system—instead of low level primitives like threads, locks and socket IO.
Remoting
Actors are location transparent and distributable by design. This means that you can write your application without hardcoding how it will be deployed and distributed, and then later just configure your actor system against a certain topology with all of the application’s semantics, including actor supervision, retained.
Supervision
Actors form a tree with actors being parents to the actors they've created. As a parent, the actor is responsible for handling its children’s failures (so-called supervision), forming a chain of responsibility, all the way to the top. When an actor crashes, its parent can either restart or stop it, or escalate the failure up the hierarchy of actors. This enables a clean set of semantics for managing failures in a concurrent, distributed system and allows for writing highly fault-tolerant systems that self-heal.
中文资料
基于AKKA的后台应用开发手册
Akka分片集群的实现
使用Akka的Actor和Future简单地实现并发处理
http://www.th7.cn/Program/java/2012/03/29/67015.shtml
Java中使用akka手记一
http://2014.54chen.com/blog/2014/04/14/how-to-use-akka-in-java/
示例代码
public class Greeting implements Serializable {public final String who;public Greeting(String who) {this.who=who;}}public class GreetingActor extends UntypedActor {LoggingAdapter log=Logging.getLogger(getContext().system(), this);public void onReceive(Object message) throws Exception {if (message instanceof Greeting) log.info("Hello " + ((Greeting) message).who);}}ActorSystem system=ActorSystem.create("MySystem");ActorRef greeter=system.actorOf(Props.create(GreetingActor.class), "greeter");greeter.tell(new Greeting("Charlie Parker"), ActorRef.noSender());
Akka 简介与入门的更多相关文章
- JS面向对象(1) -- 简介,入门,系统常用类,自定义类,constructor,typeof,instanceof,对象在内存中的表现形式
相关链接: JS面向对象(1) -- 简介,入门,系统常用类,自定义类,constructor,typeof,instanceof,对象在内存中的表现形式 JS面向对象(2) -- this的使用,对 ...
- python3-day1-python简介及入门
python简介及入门 python简介 Python的创始人为Guido van Rossum.1989年圣诞节期间,在阿姆斯特丹,Guido为了打发圣诞节的无趣,决心开发一个新的脚本解释程序,做为 ...
- Robot Framework-工具简介及入门使用
Robot Framework-Mac版本安装 Robot Framework-Windows版本安装 Robot Framework-工具简介及入门使用 Robot Framework-Databa ...
- Linux内核学习笔记-1.简介和入门
原创文章,转载请注明:Linux内核学习笔记-1.简介和入门 By Lucio.Yang 部分内容来自:Linux Kernel Development(Third Edition),Robert L ...
- 【转】Docker简介与入门
转自:https://segmentfault.com/a/1190000000448808 Docker是个新生的事物,概念类似虚拟化.网上关于Docker入门的东西已经很多了.不过本文探讨了Doc ...
- Quartz入门例子简介 从入门到菜鸟(一)
转: Quartz入门例子简介 从入门到菜鸟(一) 2016年11月19日 22:58:24 爱种鱼的猫 阅读数:4039 刚接触quartz这个词并不是在学习过程中...而是WOW里面的界面插件 ...
- [转] AKKA简介
[From] https://blog.csdn.net/linuxarmsummary/article/details/79399602 Akka in JAVA(一) AKKA简介 什么是AKKA ...
- Lombok简介及入门使用 (转载)
Lombok简介及入门使用 lombok既是一个IDE插件,也是一个项目要依赖的jar包. Intellij idea开发的话需要安装Lombok plugin,同时设置 Setting -> ...
- Shiro简介、入门案例、web容器的集成
目的: shiro简介 Shiro入门案例 Shiro与web容器的集成 shiro简介(中文官网:https://www.w3cschool.cn/shiro/andc1if0.html) 1.什么 ...
随机推荐
- HTTPDNS成为移动互联网的标配–原因与原理解析(转)
DNS,作用就是将域名解析成IP.一个DNS查询,先从本地缓存查找,如果没有或者已经过期,就从DNS服务器查询,如果客户端没有主动设置DNS服务器,一般是从服务商DNS服务器上查找.这就出现了不可控. ...
- oracle数据库恢复与备份
一.oracle数据库恢复 1.恢复刚才删除的一条数据 delete from emp e where e.empname='SMITH' select * from flashback_transa ...
- QVector<QString> 显示器里面的动态数组元素QString和char *转变
QVector类是一类提供了动态数组模板. QVector<T>是Qt普通容器类的一种. 它将自己的每个对象存储在连续的内存中.能够使用索引號来高速訪问它们.QList<T>. ...
- 利用sendmsg和recvmsg来指定发送接口或者获取接收数据接口
前言 sendmsg和recvmsg函数是一对相对下层的套接字发送.接受函数. 通过这对函数,我们能够设置或者取得数据包的一些额外的控制信息.这些信息中比較经常使用的就是本文要介绍的发送.接受 ...
- WPS2012交叉引用提示word比wps这种强烈的更新参考
WPS2012交叉引用技巧,word比wps这点强更新參考文献 到时生成仅仅有有一条线,好像WPS不能够,word能够,假设谁知道能够补充.^_^ 1.写论文,參考文献的改动非 ...
- 【iOS】彩虹渐变色 的 Swift 实现
首先很感谢大家的支持与关注.<Web Color 的 Swfit 实现>一文一经公布.訪问量迅速攀升,让本人受宠若惊. 为表达感激之情,今天早上把彩虹渐变也顺手实现了. 最新代码& ...
- Socket规划(1)
socket定义 于Linux网络编程是通过socket进行的. 人们常说的socket是一种特殊的I/O接口,他也是一个文件描写叙述符.socket是一种经常使用的进程之间通信机制,通过它不仅能实现 ...
- 使用cm-12.0源代码编译twrp
Select the newest branch available. This step is not necessary with Omni because Omni already includ ...
- 安卓反汇编工具arm-eabi-objdump
安卓反汇编工具 在Arm平台系统自带的反编译工具在android/prebuild/linux-/toolchail/arm-abil-/bin目录下的arm_eabi-objdump进行反汇编 ar ...
- selinux 工具下载地址
http://userspace.selinuxproject.org/releases/ 里面包含了 Name Last modified Size Description Parent Direc ...