L
L
likejavascript2014-01-08 10:35:24
Message Queues
likejavascript, 2014-01-08 10:35:24

How to implement message dialogs (for NodeJS)?

There is a task to implement correspondence (dialogues) of users on one large site. I want to know from you how to make sure that nothing is bent with a lot of activity. In theory, I know that it is necessary to accumulate message queues and, at a certain interval (for example, via cron), run a script to parse this queue and send a bunch of messages at once.
The questions are:
1. What is the most suitable database for storing queues and user dialogs for this task (given that I have NodeJS)?
2. Are there any examples of a step-by-step implementation of a similar task?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily, 2014-01-08
@VasiliyIsaichkin

Dig towards RabbitMQ and other message queue managers

B
buzzi888, 2014-01-08
@buzzi888

base for storing messages and queuing + pub / sub mechanism - definitely Redis - very fast and simple.
in a node, there is usually no need to use cron, all messages are delivered instantly to the client if it is connected (for example, web sockets or ajax) or accumulated in the same redis and merge when the client connects.
functionality - chat, look for examples, there are a lot of them for a node and a radish

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question