K
K
komarevtsev2016-06-24 19:34:52
JavaScript
komarevtsev, 2016-06-24 19:34:52

Am I doing the web socket server correctly?

I decided to divide my node js application into several microservices (chat, etc.) Each microservice needs to create web-socket events. I made a separate socket-server and store the state of all sockets there. And the socket server uses redis to communicate with microservices using the pub/sub mechanism.
Did I do the right thing? I'm embarrassed that I have to write much more code.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-06-24
Protko @Fesor

I'm embarrassed that I have to write much more code.

zeromq and from there pub/sub
And so you've created a single point of failure, or a god object if you like. You should have organized communication between services and not a single data bus.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question