红联Linux门户
Linux帮助

php异步高并发扩展swoole-1.6.10版发布

发布时间:2014-01-26 15:55:40来源:红联作者:empast
简介: swoole是一个php版本的异步、高并发扩展,是国人被php官方pecl包收录的力作之一。

swoole项目在春节前发布了1.6.10版本:

内核更新:
- Enabled by default async_mysql (5.4版本默认开启async_mysql特性)
- UDP send no require from_id (udp 发送不包含 from_id)
- Add last_time and connect_time to tcp connection_info (连结信息添加属性:连接时间和最后消息到达时间)
- Add tcp heartbeat mechanism (内置tcp心跳检测模块)
- rebuild data_buffer (重构了data_buffer)

client模块:
- swoole_client on::Receive and on::Close no need to call recv/close (Receive和Close不需要相应的回调)

php方法变更:
- add heartbeart()方法 (swoole_server_heartbeart() or $serv->heartbeat())(手动进行心跳检测)

配置变更:
- add heartbeat_idle_time (心跳最大空闲时间)
- add heartbeat_check_interval (心跳定时检测时间)

扩展介绍:
Swoole是一个PHP的C扩展,可用来开发PHP的高性能高并发TCP/UDP Server。Swoole的网络IO部分基于多线程的epoll/kqueue事件循环,是全异步非阻塞的。 业务逻辑部分既可以像node.js一样全异步回调执行,也可以多进程同步阻塞方式来运行。这样既保证了Server能够应对高并发和大量TCP连接。又保证业务代码仍然可以简单的编写。

GitHub地址:https://github.com/matyhtf/swoole

官网:http://www.swoole.com

pecl地址: http://pecl.php.net/package/swoole

来自:开源中国社区
文章评论

共有 0 条评论