2
I am developing a chat for my site where a user sends an invitation to the other user, if the same accepted will be open and the system will be checking new messages.
For the system to do this check I use a while, and while no result returns, I take the last id from the memory I received, I create a query to bring results greater than that id provided. After performing a repeat and returning nothing I give a sleep of 1 second in the php not to overload.
I wonder if anyone could build a chat with a different system and how did? Is there any technique that is more performative than the long-time?
websocket? Related: Using Node.js or PHP with Websockets?
– rray
I’m gonna check :D
– Romario Pires