Inter-communication microservices - How? : <p>I'm working on a personnal project which is to transform a monolithic web application into microservices (each service has its own database).</p>

<p>At this moment the monolithic backend is made with  NodeJS and is able to reply REST request. 
When I began to split the application into multiple services I faced the next problem : How to make the communication between them nicely ?</p>

<p>First I tried to use <strong>REST call</strong> with the next example : 
"Register Service" inserts interesting things into its database, then forward (HTTP POST) the user information to the "User Service" in order to persist it into the "user" database.
From this example we have 2 services thus 2 databases.</p>

<p>I realized at this moment <strong>it wasn't a good choice</strong>. Because my "Register Service" depends on "User service". They are kind of coupled and this is an anti-pattern of the microservices conception ( from what I read about ).</p>

<p>The second idea was to use a <strong>message broker</strong> like RabbitMQ. "Register Service" still insert interesting things into its own database and publish a message in a queue with the user information as data. "User Service" consumes this message and persists data into its "user" database. By using this conception, both of the services are fully isolated and could be a great idea.</p>

<p>BUT, <strong>how about the response to send to the client</strong> ( who made the request  to "Register Service"). With the first idea we could send "200, everything's ok !" or 400. It is not a problem. With the second idea, we don't know if the consumer ("User Service")  persisted the user data, so what do I need to reply to the client ?</p>

<p>I have the same problem with the shop side of the web application. The client post the product he wants to buy to "Order Service". This one needs to check the virtual money he has into "User Service" then forward the product detail to "Deliver Service" if the user has enough money. How to do that with fully isolated services ? </p>

<p>I don't want to use the http request time from the client to make async request/reply on the message broker. </p>

<p>I hope some of you will enlighten me.</p>
