PHP Comet Trial

| |
2008/05/15 10:17 joedarkangel3
I tried to implement Comet application for the first time.

Dont know what is Comet , read my post on http://www.chendaping.info/post/39.htm

After serveral trials , here are some outcome by using server side long polling and client side long polling

Server Side Long polling: I use while(true) loop to keep connection alive, which in result use hugh resource, only two simutanous clients make server spike to 100%, so give applicaiton a break, do some sleep for the long running implementation.

Client Side Long Polling: I still use while loop on Javascript, but It turns out to be pretty well adjust to the client number, 10 simutanous client only use about 60% resource, I think It is because the connection setup give application a break.

the conclusion would be: give some break to long running application, never tie up all resource use while(true) infinite loop.

One more thought would be: Java multithreading model would come to play a big role on Comet application, However, I dont really a fan of Java.
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]