I am currently developing a PHP application that will use websockets for client-server communication. I have heard repeatedly that PHP should not be used for server applications due to the lack of streaming mechanisms, memory management (circular references) or an unmanaged socket library.
So far, everything is working pretty well. I use phpws as a websocket library and Doctrine DBAL to access various database systems; PHP - version 5.3.8. The server should serve no more than 30 clients. However, especially in recent days, I have read several articles that talk about the inefficiency of PHP for long-term applications.
Now I don't know if I should continue to use websockets with PHP or rebuild the entire server application. I tried Python with Socket.IO, although I did not get the expected results.
I have the following options:
- Keep it as it is.
- Make an Ajax application in conjunction with Socket.IO - for example. run a serveride script that calls ajax client calls when data is sent to the server.
The last point sounds pretty interesting, although it will take some work. Would it be a problem for the servers to execute all client requests in one go?
? PHP ( gc_collect , ) ? , ( ,...) , PHP ?