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, that acts as the gateway for the end users. In much simpler terms, JHipster creates a gateway (an edge service that handles all the user requests) and the individual services that talk via the gateway to the users.

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

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 that 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:

As you can see, we have a gateway application running on port 8080, which will be the user-facing application. Then, we have two microservice applications with their own databases. The gateway will route requests to these services via ports 8081 and 8082. There is also JHipster Registry running on port 8761 providing service discovery and config management.

In the next section, we'll learn how to create this architecture using JHipster.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.33.87