_
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. 统计C语言程序行数

    补充前一篇中统计C语言程序行数的程序 写得比较匆忙,可能有些失误,等弄明白GitHub的用法并完善程序后再补充完整代码链接 没有写成函数,但经过简单修改可以作为一个计算或判断函数使用 判断算法主要为以 ...

  2. List分页 参考

    public <T> List<List<T>> splitList(List<T> list, int pageSize) { int listSiz ...

  3. Opencv常用函数

    一.图像读写与简单处理 1. Mat cv::imread(const String& filename, int flags=IMREAD_COLOR). imread函数加载filenam ...

  4. 7.hibernat实现双向一对多(多对一)

    1.创建如下项目结构 2.在项目的src下创建hibernate.cfg.xml主配置文件 <?xml version="1.0" encoding="UTF-8& ...

  5. ResultSet 的Type属性 TYPE_FORWARD_ONLY, TYPE_SCROLL_I

    说明:Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY ...

  6. 解决Firefox访问12306"连接不受信任"的问题

    用Firefox访问12306.cn, 总是提示"This Connection is Untrusted", 曾经有个"Add Exception" 按钮, ...

  7. Dubbo协议与连接控制

    协议参考手册 (+) (#) 推荐使用Dubbo协议 性能测试报告各协议的性能情况,请参见:性能测试报告 (+) dubbo:// (+) (#) Dubbo缺省协议采用单一长连接和NIO异步通讯,适 ...

  8. MVC3+EF4.1学习系列(三)-----排序 刷选 以及分页

    上篇文章 已经做出了基本的增删改查    但这远远不足以应付实际的项目  今天讲下实际项目中 肯定会有的 排序 刷选  以及分页. 重点想多写点分页的 毕竟这个是任何时候都要有的 而且 我会尽量把这个 ...

  9. chapter 13_3 table访问的元方法

    前两节的算术类.关系类运算符的元方法都为各种错误情况定义了行为,它们不会改变语言的常规行为. 但是Lua还提供了两种可以改变table行为的方法: 一种是查询table中不存在的字段.一种是修改tab ...

  10. Openjudge-计算概论(A)-取石子游戏

    描述: 有两堆石子,两个人轮流去取.每次取的时候,只能从较多的那堆石子里取,并且取的数目必须是较少的那堆石子数目的整数倍.最后谁能够把一堆石子取空谁就算赢. 比如初始的时候两堆石子的数目是25和7 2 ...