Answer the question
In order to leave comments, you need to log in
What are the minimum means to make an existing chat realtime?
The bottom line is this: a chat has been created that works on the principle of checking for new messages every five seconds. It is required to make the chat instant, using minimal funds. "PHP" is used on the server side, "JavaScript" on the client side, "MySQL" on the DBMS, "nginx" on the server. What can you suggest?
Answer the question
In order to leave comments, you need to log in
If with very minimal means, then you can use the Saas comet service, for example , this one. If you already have experience in administering vps, you can deploy a ready-made open source comet server
. Integration with a ready-made chat will take little time. Just after the function of inserting a message into the database, you will need to add a call to the server's comets api and transfer the inserted message to it.
And on the frontend, instead of Ajax polling the server, subscribe via Javascript api to receive messages from the server's comets. You will need to add no more than 10 - 15 lines in php and about the same in Js.
Here is my article with a list of saas comet services
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question