Application architecture

We built an online e-commerce shop using JHipster in Chapter 3, Building Monolithic Web Applications with JHipster. It was built as a monolith since the scope was small and it was an easier choice to start with. Let's say that our e-commerce store has grown tremendously in terms of users and scope, resulting in a more demanding situation. The team is finding it difficult to roll out features faster with the monolithic architecture, and would like to have more control over individual parts of the application.

One of the solutions to this problem would be to adopt a microservice architecture. The application was created using JHipster; the option to move to microservices is much easier to accomplish. JHipster follows the proxy microservice pattern in which there is an aggregator/proxy in front of the services, which acts as the gateway for the end users. In much simpler terms, JHipster creates a gateway (which handles all the user requests) and the individual services that talk via the gateway to the users.

This said, we need to have a gateway service, along with one or a few microservice applications that can run alone.

Our customers are facing some issues regarding invoicing, since it is taking longer for the system to respond. Customers are also complaining that they are not receiving notifications so they can track their orders. To solve this, we will remove the invoice service from our monolithic application and make it a separate service, and then create a separate Notification Service that will take care of the notifications. For the former, we will stick with the same SQL database. For the latter, we will use the NoSQL database.

Let's have a look at the application architecture that we are going to generate: