How Node Js perform real time checking on database?

In node.js how they perform database check for real time notificaion?

Is it using any framework like "ondatabaseupdate"'s function? Or just use setInterval at node js every second to perform check db?

I'm quite new on node.js i'm not sure im gonna to use redis to store data or mysql.


That's called message queuing. Redis has an inbuilt PubSub adapter that can be used for this.

The basic idea is that clients can publish (emit) events on a defined channel, and other clients can subscribe (listen) to whatever is coming in. The listener could be routing incoming data to a pool of workers, which, for example, write your data in a database.

The Redis site has an article about pub/sub which is quite detailed.

Need Your Help

Catching an event when spinner drop down is dismissed

android drop-down-menu android-spinner

I want to catch an event when spinner drop down is dismissed. We can catch it when the user clicks on any item in the onItemSelected(). But I want to catch even when user touches outside of the dro...