zoukankan      html  css  js  c++  java
  • AKKA初体验

    关于thread和actor下面这段话讲的很好
    Experienced developers have learned to be very careful with unrestricted threads and various blocking mechanisms of a (real-time) operating system, because they often lead to programs that are unsafe and difficult to reason about. Instead, experts apply the following best practices of concurrent programming:1.Keep data isolated and bound to threads. Threads should hide (encapsulate) their private data and other resources, and not share them with the rest of the system.2.Communicate among threads asynchronously via messages (event objects). Using asynchronous events keeps the threads running truly independently, without blocking on each other.3.Threads should spend their lifetime responding to incoming events, so their mainline should consist of an event-loop that handles events one at a time (to completion), thus avoiding any concurrency hazards within a thread itself.While these practices can be applied manually on top of the "free threading" approach, a better way is to use the Active Object (Actor) pattern, which inherently supports and automatically enforces the best practices of concurrent programming.

    这个 是介绍Akka在线程封装 隐藏通信~ 线程低耦合 复用执行上面的优点~

    还是从未来的 分布式 并发编程 门槛降低的视角 再介绍akka~

    Netty的使用!

  • 相关阅读:
    常用SQL语句大全总结
    修改 Mac 默认 PHP 运行环境
    mac下更新自带的PHP版本到5.6或7.0
    apache php 开启伪静态
    酒店迎接新技术变革:用智能手机开门
    百度地图显示多个标注点
    百度地图api简单使用方法
    Spring mvc 配置详解
    Spring MVC入门知识总结
    Bootstrap 按钮
  • 原文地址:https://www.cnblogs.com/drawwindows/p/5220331.html
Copyright © 2011-2022 走看看