Vincent's Blog


  • Home

  • Categories

  • Archives

  • Tags

Actor - Routing

Posted on 2017-05-10   |   In Scala , Akka
概况routing这个东西俗称路由.akka里面的主要角色,就是一个中专分发工作站.作为一个局部统一消息入口,根据不同的router 种类和配置 对管辖的routee进行消息分发,比较方便扩展,可以直接增加实例数量 Pool vs Group主要区别是 Pool下的routee都是router自己的 ...
Read more »

Nginx - 部署SPA

Posted on 2017-05-08   |   In Nginx
SPA要求 所有请求返回index页面 资源开启gzip index.htmllocation / { root html; index index.html index.htm; error_page 404 =2 ...
Read more »

Fault Tolerance

Posted on 2017-05-03   |   In Scala , Akka
实例解读 首先创建顶级Actor worker listener demoActor 订阅deadLetter 发给demoActor worker内的sender指向 listener,并向worker发送 Start消息 Worker 设置监管策略 // Stop the CounterSe ...
Read more »

Actor - Become/Unbecome

Posted on 2017-05-02   |   In Scala , Akka
class HotSwapActor extends Actor { import context._ def angry: Receive = { case "foo" => sender() ! "I am already angry?" case "b ...
Read more »

Actor - Stopping actors

Posted on 2017-05-02   |   In Scala , Akka
stop Actors are stopped by invoking the stop method of a ActorRefFactory, i.e. ActorContext or ActorSystem. Typically the context is used for stopping ...
Read more »

Actor - Receive timeout

Posted on 2017-05-02   |   In Scala , Akka
system.scheduler.scheduleOnce(5000 milliseconds) { demoActor ! 1000 } 5000ms后发送一次消息 context.setReceiveTimeout(1000 milliseconds) actor内部 ...
Read more »

Actor - Send Messages

Posted on 2017-04-28   |   In Scala , Akka
Actor 发送消息 tell (!) vs ask (?) vs forwardTellactorRef ! message发送干别的去了,不管后果 Askimport akka.actor.{ActorSystem, DeadLetter}import akka.util.T ...
Read more »

Actor - Actor API

Posted on 2017-04-27   |   In Scala , Akka
顶级Actorimport akka.actor.{ActorSystem, DeadLetter}object AkkaActor extends App { import DemoActor._ println("Hello, world!") val sys ...
Read more »

Actor - Creating Actors

Posted on 2017-04-27   |   In Scala , Akka
创建Actor - 最佳实践import akka.actor.ActorSystemobject AkkaActor extends App { import DemoActor._ println("Hello, world!") val system = ActorSystem ...
Read more »

SW初探

Posted on 2017-04-20   |   In JS
SW - Service Worker下面来简单解析下hello world register// TODO add service worker code here if ('serviceWorker' in navigator) { navigator .servi ...
Read more »
<i class="fa fa-angle-left"></i>1…101112…29<i class="fa fa-angle-right"></i>
Vincent Guo

Vincent Guo

the blog to remeber all things about code

290 posts
44 categories
103 tags
RSS
github twitter facebook google weibo
Links
  • KunLin
  • Rx Introduction
  • 三哥
  • 元龙
© 2024 Vincent Guo
Powered by Hexo
Theme - NexT.Mist