S
S
sintezzzz2018-12-10 01:18:22
Node.js
sintezzzz, 2018-12-10 01:18:22

How to properly use redis in nodejs?

Hello.
There is an application in php, it drops notifications (notifications for the user) into the radish, the node picks up content from the radish and sends it to the user via websockets.
Bottom line: At the moment, the node checks the radish for new notifications in the setInterval cycle, everything works fine, but I have a doubt that setInterval is not the right solution. I’ve only dealt with the node for the 3rd day, before that I had no experience with the node.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Laud, 2018-12-10
@kshshe

Try looking at Publish / Subscribe , maybe that's what you need.

I
Ivan Shumov, 2018-12-10
@inoise

replace Redis with RabbitMQ and get Push instead of Pull

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question