Do it the way the database wants you to do it. Don’t use HTTP. Instead use TCP sockets (WebSockets when in the browser). Then put a tigger on the tables you care about.
Every time the table changes the DB sends a message to the browser in real time. Super simple.
Every time the table changes the DB sends a message to the browser in real time. Super simple.