This proof of concept includes 8 micro services. Each of it represents an Java Spring feature. This document helps you to get an overview of the project and a guide.
The repository contains the following micro services.
- Service Addressbook
- Service People
- Service Client
- Service Eureka
- Service Gateway (Zuul)
- Service Hystrix
- Service Monitor (Spring Admin)
- Service Zipkin
The following picture is summarizing the architecture of the project.
Please install the following tools on your local machine:
- Java JDK 11 (https://www.java.com/de/download/help/download_options.xml)
- The newest version of git (https://git-scm.com)
- The newest version of maven (https://maven.apache.org)
There are two ways to start this spring feature poc:
- manual via maven
- automatically via maven
After cloning the complete repository to your local computer, change to the subfolder and start each micro service with maven:
mvn -DDOCKER_MACHINE_IP=127.0.0.1 -DEUREKA_PORT=8761 -DZIPKIN_PORT=9411 spring-boot:run
Please be sure to start the services in this order:
- service-eureka
- service-addressbook
- service-people
- service-client
To start all services via the shell-script, type the following command:
.\build_local.sh
The Addressbook service creates an address book with people in it. The amount of people can be defined as an url parameter (e.g. 10). The service gets all the people from the service "service-people".
There are two possibilities to get an address book. The endpoint "getAddressbookMultiple" calls the service-people once to get all the people. The endpoint "getAddressbookSingle" calls the service-people multiple times.
- Service-Request: http://127.0.0.1:8762/getAddressbookMultiple/10
- Service-Request: http://127.0.0.1:8762/getAddressbookSingle/10
- Info: http://127.0.0.1:8762/info
- Swagger-Doku: http://127.0.0.1:8762/swagger-ui.html
- Swagger-JSON: http://127.0.0.1:8762/v2/api-docs
This service creates people. The amount of people can be defined as a url parameter (e.g. 10). The service generates random names and details.
- Service-Request: http://127.0.0.1:8767/getPeopleMultiple/10
- Service-Request: http://127.0.0.1:8767/getPeopleSingle
- Info: http://127.0.0.1:8767/info
- Swagger-Doku: http://127.0.0.1:8767/swagger-ui.html
- Swagger-JSON: http://127.0.0.1:8762/v2/api-docs
This service creates an HTML/AngularJS web page. There it is possible to see the service url from the address book service and requests an specific amount of people.
- Service-Request: http://127.0.0.1:8764
- Info: http://127.0.0.1:8764/info
This service starts an eureka server. With this you can manage and see all available services.
- Service-Request: http://127.0.0.1:8761
- Info: http://127.0.0.1:8761/info
This service starts an Spring Zuul server. With this you can use load balancing and proxy requests in the project.
- Service-Request: http://127.0.0.1:8765
- Info: http://127.0.0.1:8765/info
This service starts an Spring Hystrix dashboard which can visualize the turbine or hystrix streams.
- Service-Request: http://127.0.0.1:8768/hystrix
- Info: http://127.0.0.1:8768/info
- Hystrix-Stream: http://127.0.0.1:8768/turbine.stream
This service starts an Spring Boot Admin server. With this you can have an detailed view for each micro service. Its also possible to see all calls, logging or version details. Also an ram usage is available.
- Service-Request: http://127.0.0.1:8766
- Info: http://127.0.0.1:8766/info
This service starts an Spring Zipkin server. With this you can trace all requests from each micro service.
- Service-Request: http://127.0.0.1:9411
- Info: http://127.0.0.1:9411/info