Answer the question
In order to leave comments, you need to log in
How to listen to the base from node.js for new records?
Messages from users are written to the database table. About 3 messages come in per second. With the help of a node, I want to process these messages, but it is not yet clear how. I see two options, the first one is to run the node every second (which is bad in my opinion, since the table can be empty at this time) and the second one, to track new entries in the table with the node and process them.
Answer the question
In order to leave comments, you need to log in
It's not PHP, nodejs applications are long lived. You start the application once and check the database in setInterval (more precisely, in setTimeout).
You can hang a trigger on the insert, which will pull sys_exec, and sys_exec will call curl at the right address, and on the other side, at least php, at least node, it doesn’t matter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question