rfcs/2-jhipster-rfc-jhipster-control-center.md
jhipster_control_centerAs of JHipster 6.5, the JHipster administrator's management and monitoring UI is spread out to various places (JHipster Registry, angular/react/vue pages) which causes code duplication and slows down their evolution. This RFC proposes to move this functionality to an external application that can be used in different development and production scenarios. In the following, this application will be referred to as the JHipster Control Center.
In recent years, the technology landscape has changed significantly for Java and non Java based microservices but JHipster has somehow failed to adapt because we invested too much in maintaining our Eureka based solution: the JHipster registry. Although this solution is great and very productive for developers, it is not a very popular choice nowadays and our support for microservices without Eureka is lacking. Moreover, if we want to support more languages and technologies (.NET, Node.JS, Micronaut, Quarkus) and integrate them in the JHipster platform, non portable technologies such as Spring Cloud and Eureka cannot be made mandatory.
In the meantime, our experience with the JHipster Registry has showed that in a microservice architecture, it is very valuable to have an overview of your running applications instances either in development or production. Currently this overview is provided as part of the application itself (for JHipster monoliths) or the JHipster Registry (for JHipster microservices). The goal of this RFC is to describe a solution that provides this overview in a new external application which can be used to cover all current use cases and more.
The JHipster Control Center is a standard web application that connects to one or several JHipster applications through their management API endpoints. Those management endpoints can either be exposed on the standard API port (typically 8080, 8081, ...) or preferably on a dedicated management port (typically 9999) so that they are isolated from the outside world.
/---------\ +---------------+
| Browser | :1337 | JHipster |
\----+----/-------------+-----------> Control Center|
| | +----+----------+
| | |
|:8080 |:8081 |
+----v-----+ +-----v----+ |
| JHipster | | JHipster | |
| App 1 | | App 2 | |
+----------+ +----------+ |
:9999/management :9999/management |
^ ^ |
| | |
+-----------------+--------------------+
Once logged into the JHipster Control Center, the user will be able to view their administrator UI which presents operational data coming from their JHipster applications. Typical data available will include:
The goal of the JHipster Control Center is to be used in combination with any kind of JHipster application (monoliths, gateways, back-end only microservices, front-end only UIs, etc.). Its aim is to accompany the application developer through all phases of development and production by providing useful management features.
In every JHipster app, docker-compose files are present in the src/main/docker folder to launch associated services such as databases, message brokers, and registries using Docker. Among them, a jhipster-control-center.yml will let the users start the JHipster control-center which will then be available at http://localhost:1337. By default, the docker-compose file will be generated in such a way that the Control Center will be able to connect to the locally running JHipster application out of the box. Another possible way to run the JHipster Control Center in development would be to develop a simple CLI that allows to start the JHipster Control Center server quickly. Such a CLI tool could be embedded into the JHipster package distributed on NPM.
Once deployed on a production server, the JHipster Control Center can be configured to discover JHipster application instances automatically by plugging into service discovery backends (Eureka, Consul, Kubernetes) or using a static list of application URLs provided in the configuration.
Implementation details will be left to the discretion of the JHipster Control Center developers but the following guidelines will need to be followed:
Compared to today's situation, the proposed solution would have the following advantages:
Some existing similar or related solutions :
Possible future evolutions: