apache - How does comet work with the client side -
I have a question regarding comet implementation I know that this is used to handle asynchronous requests Which can now be achieved through servlet 3.0 async functionality. Even then what I do not understand is how to push for the calling client.
In Web Sockets we open the connection by providing IP and port. With a comet, when the server pushes the data, how do you connect to the server to get a call back?
There is a very good resource on Wikipedia page for this question (sorry it is very clear) ).
Comet uses an HTTP and HTTP server to simulate a two-directional connection between the client and the server, eventually you make the server an HTTP request and try to open it (long voting and streaming) . With a long voting, that connection closes after an interval or when the data is returned. It is possible to stream the connection as long as possible and the new connection is sent to the existing connection.
How are these different between a web browser - that is why the comet is classified as a hack. Then, the Wikipedia page should provide you with almost all the necessary information.
I wrote an article covering the history of realtime web communication (with focus on client) and why.
Comments
Post a Comment