I need to build a 2 way communication between a browser and an REST API service.
One of the most complex thing I am facing is checking the API for updates every second.
I have two types of communication
I tried different techniques to handle this, but none of them worked good and all were not scale-able.
Here are some techniques I tried
setInterval()function inside a ShardWorker.
I am hoping I can do this communication using a WebSocket and node.js.
How can WebSocket handler both communication types listed above?