actor
_
timcharper
1月 20 02:18
@timcharper , so what app the actor model can help, and what app the thread modle can help, could you please give me some advice? say, a heavy traffic app, for example a instant message server is ok using actor model, bussy logic is not very complicated. :point_up: January 18, 2016 10:39 PM
@bonafideyan depends on the properties of your system. If you have high concurrency, using the actor model can allow you to manage mutable state without needing to use mutexes, and also can run more efficiently since it can allow a single core to be devoted to a single task (reducing expensive context switches). It does this with relatively low overhead. Avoiding locks is almost always a win nowadays because it allows you to horizontally scale your processes better.
Also, the actor model is more elastic than, say, what Kafka provides. In Kafka, you can't modify partitions on the fly, and partitions are effectively round-robin. (if you have a consumer group processing a partition quickly, then they can't just use their spare resources to help out with the other partition). etc. So, Kafka has lower overhead because it has a simpler model for distributing messages, but with that simpler model comes constraints that may not work for your well for your needs.
In general, I would probably pick Kafka something that did high data throughput (log processing), was processed asynchronously, and has with more lenient SLAs (in terms of data freshness). If you require something more real-time, I'd go with the Actor model.
actor的更多相关文章
- [翻译]AKKA笔记 -ACTOR SUPERVISION - 8
失败更像是分布式系统的一个特性.因此Akka用一个容忍失败的模型,在你的业务逻辑与失败处理逻辑(supervision逻辑)中间你能有一个清晰的边界.只需要一点点工作,这很赞.这就是我们要讨论的主题. ...
- [翻译]AKKA笔记 - ACTOR生命周期 - 基本 -5
原文地址:http://rerun.me/2014/10/21/akka-notes-actor-lifecycle-basic/ (请注意这了讨论的生命周期并不包括 preRestart 或者pos ...
- actor concurrency
The hardware we rely on is changing rapidly as ever-faster chips are replaced by ever-increasing num ...
- .NET的Actor模型:Orleans
Orleans是微软推出的类似Scala Akka的Actor模型,Orleans是一个建立在.NET之上的,设计的目标是为了方便程序员开发需要大规模扩展的云服务, 可用于实现DDD+EventSou ...
- [Scala] akka actor编程(一)
Akka基础 Akka笔记之Actor简介 Akka中的Actor遵循Actor模型.你可以把Actor当作是人.这些人不会亲自去和别人交谈.他们只通过邮件来交流. 1. 消息传递 2. 并发 3 ...
- 如何在插件中添加Actor类
只要按照BlueprintFunctionLibrary的那个模板做就好了,把用编辑器生成的代码复制到插件对应的目录 之后需要注意做以下修改 1.H文件中的 GENERATED_UCLASS_BODY ...
- scala中的Actor
1.介绍 2.简单示例 3.第二个程序 4.通信程序 package day01 import scala.actors.Actor case class Message(content: Strin ...
- UE4 中在 Actor 中动态 Create Component 与ChildActor 的 小笔记
Note:旧版本的UE4 的Attach 和12.13版本有些不一样 创建Component: UCpp_MyComponent* temp_imageCom = NewObject<UCpp_ ...
- akka实现的actor
定义一个 Actor 类 要定义自己的Actor类,需要继承 Actor 并实现receive 方法. receive 方法需要定义一系列 case 语句(类型为 PartialFunction[An ...
- ERROR actor.OneForOneStrategy: org.apache.spark.SparkContext
今天在用Spark把Kafka的数据往ES写的时候,代码一直报错,错误信息如下: 15/10/20 17:28:56 ERROR actor.OneForOneStrategy: org.apache ...
随机推荐
- HDU 5867 Water problem
处理出1-99的,之后的加上多少hundred和and即可.整百和一千的时候注意一下. #pragma comment(linker, "/STACK:1024000000,10240000 ...
- HttpWebRequest的简单使用
新建新的空网站和一个default.aspx页面测试,实验例子: using System; using System.Collections.Generic; using System.IO; us ...
- 实时计算storm流程架构总结
hadoop一般用在离线的分析计算中,而storm区别于hadoop,用在实时的流式计算中,被广泛用来进行实时日志处理.实时统计.实时风控等场景,当然也可以用在对数据进行实时初步的加工,存储到分布式数 ...
- magento数据查询
一.查询出所有的数据: 1.以mysql查询语句在magento里执行,以此来查询你所需要的语句! $read = Mage::getSingleton('core/resource')->ge ...
- html5权威指南:嵌入另一张HTML文档、通过插件嵌入内容、嵌入数字表现形式
嵌入另一张HTML文档.通过插件嵌入内容.嵌入数字表现形式:http://www.cnblogs.com/yc-755909659/p/5928125.html
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案[转]
关于昨天下午说的MySQL服务无法启动的问题,解决之后没有进入数据库,就直接关闭了电脑. 今早打开电脑,开始-运行 输入“mysql -uroot -pmyadmin”后出现以下错误: “Access ...
- reshape2 数据操作 数据融合 (melt)
前面一篇讲了cast,想必已经见识到了reshape2的强大,当然在使用cast时配合上melt这种强大的揉数据能力才能表现的淋漓尽致. 下面我们来看下,melt这个函数以及它的特点. melt(da ...
- [转]Ubuntu系统下常用的新建、删除、拷贝文件命令
我们在Ubuntu系统中安装程序时,经常要在usr目录下新建.拷贝文件,此文件夹在Linux类系统中需要root权限才能访问,因此用常规的鼠标右键菜单操作是无效的,今天分享一下在终端中使用命令新建.拷 ...
- netty初探(1)
参考目录: 1. user-guide : http://netty.io/wiki/user-guide-for-4.x.html 2. demo: http://netty.io/wiki/ 3. ...
- 一步一步学EF系列 【7、结合IOC ,Repository,UnitOfWork来完成框架的搭建】
前言 距离上一篇已经有段时间了,最近这段时间赶上新项目开发,一直没有时间来写.之前的几篇文章,主要把EF的基础都讲了一遍,这批文章就来个实战篇. 个人在学习过程中参考博客: Entity Framew ...