For example, I have two server-apps, one of them is the REST API, another one is the WebSocket server. So, what is a better approach enumerated below?
UI - HTTP request -> app1 UI - socket -> app2
Or I can create another app that makes similar for UI a work with all apps.
UI - socket1 -> new-app - HTTP request -> app1 UI - socket1 -> new-app - socket2 -> app2
UI - socket2 -> app2
If I choose the 2nd option, is it normal to have client and server socket in one application? Should I use two threads for that?
Do I need
RabbitMQ or something like that to speak between apps?