Take the 2-minute tour ×

Just discovered Comet, and am very confused. Can someone tell me what the consensus is on the best method for implementing Comet? I am trying to discover which method I should use, or if I need to use different methods across browsers for the best results.

Also, I use PHP on the server side, is there a problem with mod_php and Comet, with holding long requests - I am willing to switch to Python if so. Any links, opinions, or information is very much appreciated. I just want to know the right direction to go in.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

HTML5 implements a comet method of sorts that will be the best way, but it is not widely supported yet.

Currently I would use long polling with php, but you have to keep re-establishing the link before php timeout. This is a fairly server resource intensive process though, as the server is waiting and keeping the socket open, it blocks other processes from starting.

The best way, is to use a javascript based server - probably node.js to deliver content and long polling to collect it. Node.js has the advantage of being non-blocking whilst waiting, so does not eat server resources.

share|improve this answer
add comment

Your Answer


