PHP real time chat with ajax polling?

Comet is programming technique - not a language - specifically designed to address the absence of push in HTTP. Conventionally, a browser sends a request, the webserver creates a response then sends it back to the client. With Comet, the webserver waits until either: 1) there is some update to include in the response 2) a timer expires Before sending the response.

A consequence of this is that it results in a high number if inactive connections to the webserver - which can cause performance issues An alternative approach is to use HTTP to delver a client program to run in the browser which the connects to the chat server using a different protocol. Its possible to do this with ActiveX, Java or flash - all of which have major drawbacks - not least portability There are several pre-written solutions out there using PHP and javascript - hint - if the docs don't mention Naggle then they've probably not thought about scalability/performance C.

Or I need to use other server side languages No - that's not really relevant - the biggest problem is that HTTP does not support push notifications - so the language you use on the web server is pretty much irrelevant. Server-comet? Comet is programming technique - not a language - specifically designed to address the absence of push in HTTP.

Conventionally, a browser sends a request, the webserver creates a response then sends it back to the client. With Comet, the webserver waits until either: 1) there is some update to include in the response 2) a timer expires Before sending the response. A consequence of this is that it results in a high number if inactive connections to the webserver - which can cause performance issues.An alternative approach is to use HTTP to delver a client program to run in the browser which the connects to the chat server using a different protocol.

Its possible to do this with ActiveX, Java or flash - all of which have major drawbacks - not least portability. There are several pre-written solutions out there using PHP and javascript - hint - if the docs don't mention Naggle then they've probably not thought about scalability/performance.C.

It depends how many users you have I guess. It will work when you don't have many users(That's how they did it in the past). But in my opinion the chat is not real-time because you can have delays up too x seconds(polling interval).

With a lot of concurrent users the polling model will not scale. Then you should really look into non-blocking long-polling(at least). I think if at all possible you should look into the non-blocking long-polling technique because that's how the big sites do real-time application.

But your server should allow you to install other programming languages because PHP is not right for this technique.

No - that's not really relevant - the biggest problem is that HTTP does not support push notifications - so the language you use on the web server is pretty much irrelevant.

It depends how many users you have I guess. It will work when you don't have many users(That's how they did it in the past). But in my opinion the chat is not real-time because you can have delays up too x seconds(polling interval).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions