Structure of chat application and required technologies

I plan to create a site with chat features. Users will have profiles (for example, on a social network), and each of them should be able to open a new chat room with another user. I need to be able to save chat history, and I also need to know which user is online now.

Below is a diagram of the structure that I created for this project:

diagram

Apache . Node.js Socket.io. , , , , (/). . , Node.js.

? ?

+4
3

, .

.

, .

- , , . SSL , . , , , , , . ( , MITM JavaScript, , - HTTPS).

XMPP - ( @Schwertfisch), . , JavaScript, Strophe.js, , , .

, , - . , , , , . NoSQL, MongoDB PaaS-like DynamoDB.
NoSQL, , . DynamoDB .

, - , . , .., Node.js. Node.js, , , Node.js.

Client A > Chat Server 1 > Chat Server 2 > Client B

, MPI Message Queue .

, , , . , , , , - , , .

: , , Facebook.

, .

+5

, , , Pub/Sub WebSockets. , WebSocket , Pub/Sub (-), , . - , Pub/Sub, .

, , , WebSocket Pub/Sub.

As for scalability, Pub / Sub Services can be easily scaled, and you can simply scale the application servers horizontally to handle more traffic.

Here is a list of some of the programs and services that support Pub / Sub :

+1
source

Source: https://habr.com/ru/post/1531186/


All Articles