We have a web application that currently uses polling to handle continuous updates.
While switching to long polling may be a small bandaid to the issue, we wanted to implement a Websockets solution that will be durable and scalable.
My question is: what kind of architecture will be needed for this?
I have done some research myself and have found that the typical setup for an enterprise application is something like this: 
The execution flow of a connection then would be something like this:
- Initial handshake
- Client makes an
HTTPRequest toServeralong with JS to request a Websocket connection Serverresponds,Headercontains theUpgradedirective and switches protocols for that client- Websocket Server establishes a
Websocketconnection with client
- Client makes an
- Client submits a
POST/PUT/etc.Webserver(Apache/Nginx) fetches result from queryWebserversends result to theMQwhere it is added to the queueMessageis sent toWebsocketserver fromMQMessageis sent back to the client
Is this approach correct? Am I missing anything? Am I understanding something incorrectly?