D
D
dev-executor2017-08-13 18:56:16
JavaScript
dev-executor, 2017-08-13 18:56:16

Again about the architecture of the chat?

There is a main application, I'm thinking of attaching a chat to it in a separate process, and there are several questions here:
1. At the moment I plan to receive everything from the client via http and give it via ws. Whether such decision is correct or to do all ws?
2. I plan to use the process with ws only for sending and possibly receiving information. How to organize communication between processes correctly? Given that this is a separate process, I see three options, process.on, http or ws.
2.1. If we provide for the expansion and removal of the ws process to a separate machine, then only http and ws remain, which will be better?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sasha, 2017-08-13
@madmages

1. the sense why to segregate on http and ws is not clear. It is better to do everything on one side, so as not to complicate. And it’s not clear whether you will use a socket io wrapper, it will decide everything for you.
2. Well, if this is a whole separate process, then process.on
2.1 Well, if on a separate machine, then these are only your problems and not the user's. Communication between the main application and the chat is already via tcp \ udp

A
AStek, 2017-08-13
@AStek

You can also cut long-polling)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question