I am creating a PHP web application and I have come to the point that I need to create a comet server because I need to update my users whenever new data is available (almost like FB). I spent so much time searching the Internet, and I came to the conclusion that the best way to create a Comet server is to build it with erlang. I also found that apache-php is not a good combination for this, because a process for each request arises. Therefore, I need to create a lightweight HTTP server for a comet application.
I am completely new to the erlang world, but I am thinking about implementing a Comet server in erlang and make it function as a client-only update interface. For the rest of the functions of my web application, I still want to continue implementing them with PHP. Thus, sending requests for client updates to the erlang server and sending other requests to the apache-php server.
It seems very complicated. I need to know what is the best way to learn erlang for the sake of building a Comet server and how to combine the two languages (erlang and php) to work together, as when I got new information. to be clicked on by clients, I need to make new changes available to the comet, and then it pushes the information to users. So how can I capitalize on php and erlang and get them to work together.
Sorry for the long explanation, but I really need your helpers and any advice you can give me to find out and implement what I want. Thank you very much in advance.
EDIT: Should I consider learning Python and Twisted to achieve what I want?
source
share