zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    正式搬家到博客园
    (SQL 技术篇)主键,外键,唯一约束,check约束
    Firefox 多个版本共存
    HTML5的视频格式之争
    jquery 提示简单效果插件 cluetip
    C# GUID的使用
    免费的jquery ui 收集
    js 验证身份证号码
    加速Web开发的9款知名HTML5框架
    Jquery中的CheckBox、RadioButton、DropDownList的取值赋值实现代码
  • 原文地址:https://www.cnblogs.com/jvava/p/5161299.html
Copyright © 2011-2022 走看看