Scenario: I have two services/applications.
Application A is a game server, which receives events from game clients. This application now needs to request information from Application B for certain information, such as registered users etc. It also needs to send events to Application B. The language used is Java and there is nothing I can do about this.
Application B is an application that handles storage of users, contains authorization logic among other things. It also acts as an API for the whole thing, only Application B can communicate with Application A. This application needs to request information from Application A about certain things, such as configuration and connected users/game clients. It also needs to send events to Application A of events triggered via API interaction.
I realise that both applications could be written as one, but I would rather write the API and logic in NodeJS, since I'm more comfortable doing that and would rather not use Java. I've briefly looked at WebSockets, Sockets, and standard HTTP requests as means of communication but don't know what kind of communication that would suit this kind of communication/coupling.