We are creating a trading web app with a node.js backend and react front end.
This app will be able to view tick data and place trades using broker’s APIs.
Broker’s APIs give stock quotes over WebSockets. However, the brokers APIs can’t be accessed directly from our REACT Front end due to CORS policy. All of broker’s APIs and Websocket communication shall happen through our node.js backend.
I am looking at possible solutions to route tick data from the broker to my react front end using node.js. What would be the ideal solution keeping scalability in mind.
I was leaning towards something like PUB/SUB kafka streams. I feel it may be an overkill and a simple redirect of websocket from broker to react front end may do ?
Any thoughts on how to implement such a redirect ?
Thanks