_
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. ZOJ 1003 Crashing Balloon

    #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using ...

  2. Android 消息传递之Bundle的使用——实现object对象传输(一)

    UI更新--消息处理massage 对于安卓内部消息得处理,实现对界面UI得更新操作,不能在线程中直接更新ui.至于为什么不能,在学习安卓开发的时候,在线程中操作会使程序崩溃. 为什么,可以看看诸多大 ...

  3. App提交Appstore审核流程【转】

    这是一个app提交到iTunces Connect被拒了4次摸索出来的经验,说多了都是泪,先让我擦擦...好了,话不多说,为了让中国的app不再那么容易被拒,或者被拒了不知道该咋办,我把我的小经验在这 ...

  4. html5权威指南:标记文字、组织内容、文档分节

    HTML5新增及删除标签:http://www.cnblogs.com/starof/archive/2015/06/23/4581850.html 第八章:标记文字                 ...

  5. DOM和BOM

    DOM:http://www.cnblogs.com/slfyeye/articles/850247.html BOM : http://www.cnblogs.com/zfc2201/p/34531 ...

  6. 通过this获取当前点击选项相关数据

    很多时候jquery只能或者应该回去一个集合.然后通过this获取触发时间的对象及相关属性 this.jq('#needsType').on("click", ".sel ...

  7. luci编译错误

    make[3]: Entering directory '/home/hbg/test1214/package/feeds/luci/luci'*** Repository layout change ...

  8. 创建透明CEdit控件

    1.在资源编辑器中将Edit控件的Border设为none(当然也可以在代码中修改窗口样式) 2.在重载CEdit的类中响应MSG_OCM_CTLCOLOREDIT消息,在处理函数中将背景模式设为透明 ...

  9. chapter8_1 编译执行和错误

    1.编译 前面介绍的,dofile是一个运行lua代码块的基本操作,实际上它是一个辅助函数. loadfile才真正做了核心的工作.dofile(打开文件,执行里面的代码块)和loadfile(从文件 ...

  10. ubuntu 12.04添加桌面启动器

    Ubuntu 12.04版本上,无法通过桌面右键菜单建立应用程序启动器:这里参考一个网上方法进行了建立: ubuntu 12.04中,每个应用程序启动器都对应 /user/share/applicat ...