-1

Ok, let's say that there's a company (let's say e-commerce) that has to implement a support chat on its website. Do you know what are protocols/infrastructures needed?

I've seen XMPP but I don't know if it's really useful in my case...

Ty a lot!

DonRobbè
  • 1
  • 2

1 Answers1

1

If you need to implement all things yourself, and don't want to use XMPP server, you can create your own chat protocol.

Such a protocol can be based on JSON-RPC.
Also, you can make a simple protocol using only features from Socket.IO.
You can use Socket.IO both on the server and client-side.

You will also need a database for storing chats and messages.
If you anticipate very heavy traffic, you can use e.g Apache CASSANDRA, but a plain SQL (or noSQL) database will be sufficient for most implementations.
It is better to use a database you are familiar with. The PostgreSQL can be a good choice because it has nice JSON support.
If you prefer a noSQL database, MongoDB will be OK.

If you use React, for the frontend I recommend you to use a @chatscope/chat-ui-kit-react components together with the @chatscope/use-chat library (I'm the author of both of them).

Antek
  • 575
  • 3
  • 11