Answer the question
In order to leave comments, you need to log in
What are the ways to give data to the user?
Actually, the question is not new and there are implementations, a lot of services are already working. But I still don't understand how it all works. I know that in general it is called Comet and that's it.
Heard about
WebSocked
long poll
infinite iframe
But I do not understand the essence.
The questions I can't get answers to are:
What is needed to implement comet and in what cases? It is clear that nothing is needed to periodically poll the server, you can simply request data using setInterval and the server will go down. What is needed exactly in order to suspend the request and respond to it later? Which implementations load the server the least? Do I need a specific server, do I need specific settings for the server itself? What and how should be done step by step in order to implement continuous data exchange between the client and the server?
Answer the question
In order to leave comments, you need to log in
Hello. Your PHP is designed to process the request and die. In a proper client/server world, no one dies, everyone stays connected and remembers their state. That. you need to use anything a normal Socket can do. Further, anything can go on top of it (for example, WebSocket).
You can do it with PHP too, but it's not recommended.
Candidates: C++, Erlang, Lisp, Haskell, Python, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question