- 论坛徽章:
- 0
|
本帖最后由 hightman 于 2010-10-09 19:48 编辑
1. 关于 php-dws
php-dws 是 PHP Direct Web Server 的缩写, 是针对 php 的一个新型 sapi 工作模块,
通过 dwsgi 协议与 web server (如 nginx) 协同工作.
之所以叫 Direct , 是因为它在执行 php 脚本过程中是直接把输出结果传递给 http client 的
而不是转交 webserver(nginx) 再由 webserver 发送给 http client.
在多数情况下, php-dws 可以用于取代 php/fastcgi 的工作, 并且能更出色的完成.
详细了解请进这个贴子- [PHP-CGI]
- ============
-
- i)request header+body ii)request header+body
- +~~~~>~~~~>~~~~>~~~+ +~~~~~>~~~~~>~~~~>~~~~~+
- | | | |
- /|\ \|/ / \ \|/
- WebVisitor Web Server FastCGIServer
- (user) (nginx) (php-cgi)
- /|\ \ / /|\ \ /
- | | | |
- +~~~<~~~~<~~~~<~~~~+ +~~~~~<~~~~~<~~~~<~~~~~+
- iv)response header+body iii)response header+body
- [PHP-DWS]
- ============
- i)request header ii)request header
- +~~~~>~~~~>~~~~>~~~+ +~~~~~>~~~~~>~~~~>~~~~~+
- | | | |
- /|\ \|/ / \ \|/
- WebVisitor Web Server DWSCGI Server
- (user) (nginx) (php-dws)
- /|\ \ / /|\ \ /
- | | | |
- | +~~~~~~~~>~~~~~~~~~~~~>~~~~~~~~~~~~>~~~~~~~~+ |
- | iii) request body |
- | |
- +~~~~~~~~~~~~~<~~~~~~~~~~~<~~~~~~~~~~~~~<~~~~~~~~~~~~~~+
- iv)response header+body
复制代码 2. 安装与配置
相对比较复杂,包括 NGINX 模块和 PHP的 sapi 模块2个部分,详细进入我的论坛查看吧
http://www.hightman.cn/bbs/forumdisplay.php?fid=15
3. 后话
php-dws 还是一个实验性的产品,不推荐运行在生产环境,由于其另类的方式在某些WEB应用的
场合可能有需求。php-dws 的特别应用示例
或点击查看这个刷新显示效果:http://root.twomice.net/dws-test/sleep.phpd |
|