V
V
Vadym Masiuk2020-04-27 15:27:23
PHP
Vadym Masiuk, 2020-04-27 15:27:23

Server side for chat?

Good afternoon!
There is a self-written site/system in PHP + MySQL + React.js. There is a VPS: 4 Cores 2.6GHz, 8GB Ram, SSD
And now we want to add a real-time support chat with a history in the database. There will be up to 1000 clients at the same time.
If necessary, we can take it to a subdomain.
The question is, what is the best way to organize it on the server side? So far leaning towards Node.js due to websocket support, but what about the DB then?
But I see that for PHP there is an opportunity to implement it too ( https://phpsocket.io)...
I would like to know the opinion of the others about how best?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Filippenko, 2020-04-28
@7TyLe

Take a look at hasura.io
Very easy to learn but powerful. Requires PostgreSQL. They have a tutorial on how to create a chat on their YouTube channel. Everything is very simple there.

S
SEOD, 2020-04-27
@SEOVirus

So far leaning towards Node.js due to websocket support, but what about the DB then?

What is the problem with using Node.js with a database? Yes, at least use PostgreSQL.

I
Ismail, 2020-04-27
@gosugod

Try Rails + ActionCable(websocket) + PostgreSQL.
It's easy enough to set up and connect ReactJS to the Rails API via ActionCable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question