How to transform the architecture based on Rest polling into the real-time push mechanism of websocket?

item is a digital currency quotation query APP.

the previous architecture is: front-end-- php-- (mysql)-- nodejs-- exchange API. What the exchange provides here is the webscoket interface, which is stored in the database after receiving the data through node. The front end polls every 5 seconds to obtain database data through the Restful API provided by PHP.

now we want to change to the front end to accept the data pushed by the third party in real time. Do you have any good suggestions?

it should be noted that there are dozens of docking exchanges, for example, each exchange will push the real-time price of bitcoin, and the front end may be the "real-time price" of these prices calculated by a certain algorithm. in addition, it is necessary to present some high-level data calculated from the original data of the exchange, so it is necessary to keep it in the database.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34845-342cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34845-342cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?