Needs advice
on
Socket.IO
React
and
PHP

Hi, I have to develop a chat support system. This will include the ability to embed a live chat widget on websites, while support agents will be available online on Android / iOS apps and web-based backend as well. Additionally, the chat widget on the host website will also behave like a chatbot before starting a chat session. It'll ask certain questions, and depending on the visitor's answers, it'll ask further questions or connect to a relevant support representative (the Agent).

I have already worked on a similar chat system, but that's based on the conventional Database and Webservice/API approach which is slow, non-real-time.

I need to make sure that the system is all Cloud Native with the modern scalable and highly available stack, preferably over AWS. I have basic AWS experience and pretty good experience with JavaScript ( Node.js / React ) and PHP Development.

What stack should I use for this kind of project?

READ LESS
10 upvotes12.2K views
Replies (3)
Avatar of maxmusing
Founder & CEO at BaseDash
Recommends
Socket.IO
at

Socket.IO is great for building real-time systems like chat. It's effectively a nice wrapper around WebSockets, with the ability to fallback to other methods for browsers that don't support it. We just used it to implement real-time collaboration at BaseDash, including a chat system like you're looking to build.

Node.js is probably the correct choice, especially if you're already familiar with it You'll probably still need to build an API to send requests to your server, and then use Socket.IO to push messages to your clients. This will let you authenticate users and store messages on your database so you can retrieve them later. PostgreSQL and MongoDB are good options for your database, you should be fine either way. Don't worry about speed, they'll both be sufficient.

React on the front end makes it really simple to handle real-time updating data. Again, even better since you're already familiar.

READ MORE
11 upvotes33.5K views
Avatar of ctovarun6818
CTO at Nugen Computer & I.T. Services

Socket.io with Node.js and socketio client for Reactjs would be perfect for this as Nodejs is very good in two way communication. I would suggest you to deploy the socket backend api on different server so that it does not slow down the I/O operations. In addition to this, you can use Redis if you want to enhance the application performance.

READ MORE
8 upvotes613 views
View all (3)
Avatar of Muhammad Asif Ali