题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1314The terrorist group leaded by a well known international terrorist Ben Bladen is b...
分类:
其他好文 时间:
2015-02-02 17:19:35
阅读次数:
161
本文参考Doug Lea的Scalable IO in Java.网络服务随着网络服务的越来越多,我们对网络服务的性能有了更高的要求,提供一个高性能,稳定的web服务是一件很麻烦的事情,所以有了netty框架帮我们完成。我们对各种各样的网络服务进行抽象,得到最基本的业务流程:1:读取请求信息2:对请...
分类:
其他好文 时间:
2015-01-21 01:17:30
阅读次数:
322
实现了私聊,公聊。用户名密码存在redis。为了拓展,做了简单的模块。#coding=utf8from twisted.internet import reactor, deferfrom twisted.protocols.basic import LineReceiverfrom twisted...
分类:
其他好文 时间:
2015-01-20 17:15:08
阅读次数:
186
http://www.infoq.com/cn/articles/netty-threading-modelhttp://www.jdon.com/concurrent/reactor.htm
分类:
Web程序 时间:
2015-01-16 18:50:56
阅读次数:
170
一. Reactor模式简介Reactor释义“反应堆”,是一种事件驱动机制。和普通函数调用的不同之处在于:应用程序不是主动的调用某个API完成处理,而是恰恰相反,Reactor逆置了事件处理流程,应用程序需要提供相应的接口并注册到Reactor上,如果相应的时间发生,Reactor将主动调用应用程...
分类:
其他好文 时间:
2015-01-08 14:47:40
阅读次数:
164
reactor design pattern 详见:http://en.wikipedia.org/wiki/Reactor_pattern The reactor design pattern is ??an event handling pattern for handling service requests delivered(交付的)concurrently(...
分类:
其他好文 时间:
2015-01-07 19:22:10
阅读次数:
178
Reactor模式是处理并发I/O比较常见的一种模式,用于同步I/O,中心思想是将所有要处理的I/O事件注册到一个中心I/O多路复用器上,同时主线程阻塞在多路复用器上;一旦有I/O事件到来或是准备就绪(区别在于多路复用器是边沿触发还是水平触发),多路复用器返回并将相应I/O事件分发到对应的处理器中。...
分类:
其他好文 时间:
2015-01-07 10:54:26
阅读次数:
246
本文将详细分析Kafka SocketServer的相关源码。...
分类:
其他好文 时间:
2015-01-04 23:07:13
阅读次数:
253