_
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的更多相关文章

  1. [翻译]AKKA笔记 -ACTOR SUPERVISION - 8

    失败更像是分布式系统的一个特性.因此Akka用一个容忍失败的模型,在你的业务逻辑与失败处理逻辑(supervision逻辑)中间你能有一个清晰的边界.只需要一点点工作,这很赞.这就是我们要讨论的主题. ...

  2. [翻译]AKKA笔记 - ACTOR生命周期 - 基本 -5

    原文地址:http://rerun.me/2014/10/21/akka-notes-actor-lifecycle-basic/ (请注意这了讨论的生命周期并不包括 preRestart 或者pos ...

  3. actor concurrency

    The hardware we rely on is changing rapidly as ever-faster chips are replaced by ever-increasing num ...

  4. .NET的Actor模型:Orleans

    Orleans是微软推出的类似Scala Akka的Actor模型,Orleans是一个建立在.NET之上的,设计的目标是为了方便程序员开发需要大规模扩展的云服务, 可用于实现DDD+EventSou ...

  5. [Scala] akka actor编程(一)

    Akka基础 Akka笔记之Actor简介  Akka中的Actor遵循Actor模型.你可以把Actor当作是人.这些人不会亲自去和别人交谈.他们只通过邮件来交流.  1. 消息传递 2. 并发 3 ...

  6. 如何在插件中添加Actor类

    只要按照BlueprintFunctionLibrary的那个模板做就好了,把用编辑器生成的代码复制到插件对应的目录 之后需要注意做以下修改 1.H文件中的 GENERATED_UCLASS_BODY ...

  7. scala中的Actor

    1.介绍 2.简单示例 3.第二个程序 4.通信程序 package day01 import scala.actors.Actor case class Message(content: Strin ...

  8. UE4 中在 Actor 中动态 Create Component 与ChildActor 的 小笔记

    Note:旧版本的UE4 的Attach 和12.13版本有些不一样 创建Component: UCpp_MyComponent* temp_imageCom = NewObject<UCpp_ ...

  9. akka实现的actor

    定义一个 Actor 类 要定义自己的Actor类,需要继承 Actor 并实现receive 方法. receive 方法需要定义一系列 case 语句(类型为 PartialFunction[An ...

  10. ERROR actor.OneForOneStrategy: org.apache.spark.SparkContext

    今天在用Spark把Kafka的数据往ES写的时候,代码一直报错,错误信息如下: 15/10/20 17:28:56 ERROR actor.OneForOneStrategy: org.apache ...

随机推荐

  1. Linux用户相关的操作命令

    1.建用户: adduser phpq       //新建phpq用户 passwd phpq        //给phpq用户设置密码 2.建工作组 groupadd test      //新建 ...

  2. .net core 12

  3. STS中Maven配置

    最近接触maven, 配置过程中记录一下. STS是解压版的,启动后,可以看到已经有了Maven插件, , 但是,STS也同时给你了一个Maven,但是通常不建议使用STS自带的maven.使用默认的 ...

  4. asp.net javascript客户端调用服务器端方法

    如何用js调用服务器端方法.首先服务器端方法的格式如下 [System.Web.Services.WebMethod]        public static void serverMethod(s ...

  5. json_encode转成带 花括号的{ } 和 中括号的[ ] 2种 形式 json数据

    //提交多个出差人员 .命名为数组 name="apply_members[] " //php接收到数据 为 数组  $aa = array('0'=>11,'1'=> ...

  6. storm配置

    配置 Storm 有大量配置项用于调整 nimbus.supervisors 和拓扑的行为.有些配置项是系统级的配置项,在拓扑中不能修改,另外一些配置项则是可以在拓扑中修改的. 每一个配置项都在 St ...

  7. chapter 13_1 算术类的元方法

    假设用table来表示集合,用function去计算集合的交集.并集. 为了保持名称空间的整齐,将这些函数存入一个名为Set的table中. 现在,假设用“+”来计算两个集合的并集,那么就要让所有用于 ...

  8. incallui中如何查询联系人数据

    联系人信息显示在CallCard中,提示当前正在通话的联系人号码.姓名.头像.号码类型等信息: 代码中在两个地方发起对当前联系人的查询, Init():startContactInfoSearch(c ...

  9. Alyona and mex

    Alyona and mex time limit per test 2 seconds memory limit per test 256 megabytes input standard inpu ...

  10. 转:应用JMeter测试solr请求

    使用JMeter测试solr请求 一.安装JMeter 在官网http://jmeter.apache.org/download_jmeter.cgi下载JMeter 直接解压JMeter安装包 Li ...