2008-05-29

[zz]Emulate event driven i/o by IOCP

关键字: iocp event driven
原文 It may be possible to use IOCompletionPorts on Windows to implement apr_pollset_*. IOCPs aare very scalable but moving to IOCPs will require a complete rewrite of the apr_socket implementation on Windows. And there is the small matter of a simple technical issue that needs to be investigated. ...
IOCP 对于高并发的应用程序提供了良好的支持,使得开发高并发的应用程序的难度降低了很多。 IOCP 作为系统底层的 API ,保持了尽可能高的灵活性,对于很多复杂的情况,IOCP 也一样适用。 这种灵活性是一种双刃剑,对于复杂的情况,没有这种灵活性就没有办法完成工作。 但是对于简单的情况,这种灵活性就带来了额外的负担。 这里将要提到的这个服务器框架(spserver/iocp版),主要是针对以下的这几种典型的应用程序 1.echo/http 类型,server 不需要在多个 client 之间转发消息 2.chatroom 类型,server 在多个 client 之间转发消息 在使 ...
2008-05-17

mysql 6 网络层 IO 的设计

关键字: mysql 半同步半异步
mysql 6 中关于网络层 IO 的设计,在下面这个链接中讲了大体的思路 http://forge.mysql.com/worklog/task.php?id=441 首先提到了目前的设计,one_thread_per_connect 模型。 引用 ...... - A new thread is created to serve this socket. (Actually, with a thread cache, it might reuse an existing thtread.) ...... In short: The above design does not scal ...
2008-05-11

IOCP 的资源释放问题

关键字: iocp
在参考了一些资料,并且尝试了几次之后,也逐渐想到了一个用来安全释放 IOCP 资源的办法。 http://groups.google.com/group/dev4server/browse_thread/thread/29a91064931a628e 接着发现有人已经把这种方案描述的很清楚了 http://blog.codingnow.com/2007/07/robust.html#comment-12142 对大家的讨论不置可否,但是使用ID代替指针确实在某些方面是有益处的。 而某些时候我们无法使用智能指针。举个例子,完成端口中 GetQueuedCompletionStatus( ...
iunknown
搜索本博客
我的相册
562c81ee-a4d4-351b-aa82-57a3972c22c6-thumb
vim
共 2 张
最近加入圈子
存档
最新评论