I've seen many apps use two separate servers to handle traffic. These services have a RESTful HTTP api server AND a websocket gateway.
I guess I'm not sure how the websocket gateway interacts with the database of the RESTful server. Does the websocket server make HTTP GET,PUSH,etc commands to the RESTful API in the background? Does the websocket server have direct write access to the database? Or should the websocket and API server be seperate?