I am running two programs one which runs 24/7 coded in javascript which is running from a console in node.js. The other is written in Java and is a plugin. I am looking to run a function in the javascript program when something happens in the Java program. I am going to be putting data into the database in Java and reading from it in Javascript. I have thought about checking for updates in the database or just running the function every 5 minutes. However that seems like an inefficient way of doing it. I have tried googling and cannot find a good solution.
Thanks in advance!