in Education by
So, let's consider group of Websocket applications. Each user is connected to one of these servers. I need to implement chat application, in which each user can send message to any user. I am looking for fast, reliable, scalable approach, how to do it. I think, that I need some good implementation of event bus. Each user, when he connects to websocket, has to be registered (or subscribed) in event bus. Then, when some another user sends message to given user, event bus publish message to given user. So, what event bus should I use? Of course, I know about Redis Pub/Sub, but I am not sure, that this is the best option in 2019 year. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Redis Pub/Sub is a really good option. One thing you need to actually worry about is the number of connection limit in certain scenarios. Since you know WebSockets are long-lived connections, load balancing of this thing works little different then Http. I suggest you read this thing I am sure you will find some good resources for this.

Related questions

0 votes
    How do machine learning and artificial intelligence technology businesses use their enterprise data effectively Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    Packet filtering firewalls work effectively in _________ networks. (a) very simple (b) smaller (c) large (d) very ... Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
0 votes
    Testing can be done effectively only on a system connected to the internet. 1) False 2) True...
asked Oct 25, 2020 in Technology by JackTerrance
+1 vote
    Which of the following can slow down your ability to deliver code effectively? (1)Enterprise Alignment (2)Test Automation (3)Technical Debt (4)Infrastructure as Code...
asked Oct 13, 2020 in Technology by JackTerrance
0 votes
    How many WebSocket events are available? (a) 2 (b) 3 (c) 4 (d) 5 The question was asked ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    My websocket application accepting connections like this: wsServer.on('request', function(request) { console.log( ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 8, 2022 in Education by JackTerrance
0 votes
    Here is the story: My server is a cloud server running centos, and serves a few bunch of web ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I want to implement Web sockets for a couple of Web services. How will the stateful HTTP connections impact Blue- ... . Please help. Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    What does the value 2 of the WebSocket attribute Socket.readyState indicate? (a) Closed connection (b) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which of the following is not a WebSocket event? (a) open (b) close (c) error (d) deny The ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which method is used to close the WebSocket? (a) Socket.flush() (b) Socket.close() (c) Socket. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which value of Socket.readyState atribute of WebSocket indicates that the connection has been closed or could not be opened? A - 0 B - 1 C - 2 D - 3...
asked Dec 2, 2020 in Technology by JackTerrance
0 votes
    Which value of Socket.readyState atribute of WebSocket indicates that the connection is going through the closing handshake? A - 0 B - 1 C - 2 D - 3...
asked Dec 2, 2020 in Technology by JackTerrance
0 votes
    Which value of Socket.readyState atribute of WebSocket indicates that the connection is established and communication is possible? A - 0 B - 1 C - 2 D - 3...
asked Dec 2, 2020 in Technology by JackTerrance
...