注册

介绍一个Python网络服务框架:greenev

从oschina搬运过来,地址:http://www.oschina.net/p/greenev
github:https://github.com/Hevienz/greenev

greenev是一个基于greenlet协程,事件驱动,非阻塞socket模型的Python网络服务框架,它使得可以编写同步的代码,却得到异步执行的优点。

本项目受到gevent, openresty, alilua, skynet, clowwindy/ssloop的启发

reactor模式采用基于epoll, kqueue, poll, select的IO复用机制
基于底层的reactor完成上层greenlet协程的调度
在CentOS6.5, Ubuntu12.04, FreeBSD10.1, Windows7上测试通过
只需调用g.parent.switch挂起当前的协程,而无需管理其中的细节
测试前请修改如下系统参数(CentOS):

net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_syn_backlog = 8192
fs.file-max=65535
net.ipv4.tcp_max_tw_buckets = 20000
net.nf_conntrack_max = 65000
net.netfilter.nf_conntrack_tcp_timeout_established = 1200

已邀请:
真是好人啊~~











static/image/common/sigline.gif
90%打工小伙一生都不可能知道的秘密 http://67177.miyue999.com/
很好!很强大!











static/image/common/sigline.gif
90%打工小伙一生都不可能知道的秘密http://user.qzone.qq.com/82175487

要回复问题请先登录注册