Scenario:
Currently, we have multi-tier architecture in this pattern
DBLayer => Tasks to DB
SouthBound => Talks to other devices like router/controller
SrvcLayer => Talks to both SouthBound and DBLayer
UILayer => Talks to UI and SrvcLayer
The application is built on Spring 4.2, Java 8, MongoDB
.
Requirement:
We need to decouple SouthBound as a separate App or can say Micro Service.
Issue:
We are thinking of 2 ways
Exposing services in SouthBound as REST API and use them in SrvcLayer. It will add some latency issue and need to figure out the security part as well.
Use Message queue like RabbitMQ. But these calls have to be synchronous. So I am not sure RabbitMQ will help us.
Which approach will be suitable. Any other suggestion on how to build this usecase.