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的后台应用开发手册

http://wenku.baidu.com/link?url=aixo8_UPSQLw21ptfsrGfrNSy9T6okD9VsFTYqposHnupsmwTAvOCFjSyBOhfhX9DRn-4chxcK_hWc6gIMIiup8fiMERm4Iw-TCSDQSYLNy

Akka分片集群的实现

http://wenku.baidu.com/link?url=R9B9R6VJ_oVhZcyCByEdlJSkHprMLhB77L181ax7VpoRRfdFofzZ3wPc41QA_pY99d6WVU9ZuONu6K_kS58Mj4JzJZcDXMye8m7NjVpIjyG

使用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 简介与入门的更多相关文章

  1. JS面向对象(1) -- 简介,入门,系统常用类,自定义类,constructor,typeof,instanceof,对象在内存中的表现形式

    相关链接: JS面向对象(1) -- 简介,入门,系统常用类,自定义类,constructor,typeof,instanceof,对象在内存中的表现形式 JS面向对象(2) -- this的使用,对 ...

  2. python3-day1-python简介及入门

    python简介及入门 python简介 Python的创始人为Guido van Rossum.1989年圣诞节期间,在阿姆斯特丹,Guido为了打发圣诞节的无趣,决心开发一个新的脚本解释程序,做为 ...

  3. Robot Framework-工具简介及入门使用

    Robot Framework-Mac版本安装 Robot Framework-Windows版本安装 Robot Framework-工具简介及入门使用 Robot Framework-Databa ...

  4. Linux内核学习笔记-1.简介和入门

    原创文章,转载请注明:Linux内核学习笔记-1.简介和入门 By Lucio.Yang 部分内容来自:Linux Kernel Development(Third Edition),Robert L ...

  5. 【转】Docker简介与入门

    转自:https://segmentfault.com/a/1190000000448808 Docker是个新生的事物,概念类似虚拟化.网上关于Docker入门的东西已经很多了.不过本文探讨了Doc ...

  6. Quartz入门例子简介 从入门到菜鸟(一)

    转: Quartz入门例子简介 从入门到菜鸟(一) 2016年11月19日 22:58:24 爱种鱼的猫 阅读数:4039   刚接触quartz这个词并不是在学习过程中...而是WOW里面的界面插件 ...

  7. [转] AKKA简介

    [From] https://blog.csdn.net/linuxarmsummary/article/details/79399602 Akka in JAVA(一) AKKA简介 什么是AKKA ...

  8. Lombok简介及入门使用 (转载)

    Lombok简介及入门使用 lombok既是一个IDE插件,也是一个项目要依赖的jar包. Intellij idea开发的话需要安装Lombok plugin,同时设置 Setting -> ...

  9. Shiro简介、入门案例、web容器的集成

    目的: shiro简介 Shiro入门案例 Shiro与web容器的集成 shiro简介(中文官网:https://www.w3cschool.cn/shiro/andc1if0.html) 1.什么 ...

随机推荐

  1. Linq 导出Excel

    var d = db.User; Repeater1.DataSource = d.ToList(); Repeater1.DataBind(); string guid = Guid.NewGuid ...

  2. cocos2d-x 3.1.1 学习笔记[2]Sprite 精灵

    Sprite应该是用到最多的一个类吧.无法想像一个游戏没有精灵将怎样进行愉快的玩耍. Sprite继承于Node 和 TextureProtocol. Sprite是一个2d的图像. Sprite能够 ...

  3. I深搜

    <span style="color:#330099;">/* I - 深搜 基础 Time Limit:1000MS Memory Limit:10000KB 64b ...

  4. 如何解决Windows8.1(32bit&amp;64bit)下Cisco VPN Client拨号时报442错误的问题

    Cisco VPN Cient大多数网络管理员.技术支持project最流行的教师和最终用户VPNclient一间.对于外部网络访问内部网络,技术类人员. 随着Windows8.1的推出.Cisco ...

  5. 网络协议——IP

    IPv4地址 不论什么网络设备能够经过一个网络接口卡(NIC)接入网,假定该设备要能够访问的其它设备,然后该卡必须有一个唯一的地址.候接入多个网络,相应地该设备就有多个地址.假设这个设备是主机的话.一 ...

  6. Linux下一个C(编程入门.h档,.c档,而路多文件的调用)

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdG90b3R1enVvcXVhbg==/font/5a6L5L2T/fontsize/400/fill/I0 ...

  7. android 设置默认启动network mode

    network mode常见类型 WCDMA preferred : 0 GSM only : 1 WCDMA only : 2 GSM UMTS : 3 CDMA : 4 ... (参考RILCon ...

  8. 潜水 java类加载器ClassLoader

    类加载器(class loader)用于装载 Java 类到 Java 虚拟机中.一般来说.Java 虚拟机使用 Java 类的方式例如以下:Java 源程序(.java 文件)在经过 Java 编译 ...

  9. 小米2S TWRP 3.0.2-0 最新中文版本Recovery

    注意:此版本为合并分区后的twrp  小米2S 合并分区教程:http://forum.xda-developers.com/mi-2/orig-development/flashtools-mifl ...

  10. Objective C (iOS) for Qt C++ Developers(iOS开发,Qt开发人员需要了解什么?)

    Qt/C++开发人员眼中的Obj-C      对于我们第一次自己定义iOS应用来说,对于来自Qt/C++开发人员来说,我不得不学习Objective-C相关语法与知识 为了让读者可以更easy理解这 ...