The technologies used in the example provide a very good foundation for implementing a microservices architecture with Java. Essentially, the example is based on the Netflix Stack, which has demonstrated its efficacy for years already in one of the largest websites.
The example demonstrates the interplay of different technologies for Service Discovery, Load Balancing, and resilience—as well as an approach for testing microservices and for their execution in Docker containers. The example is not meant to be directly useable in a production context but is first of all designed to be very easy to set up and get running. This entails a number of compromises. However, the example serves very well as the foundation for further experiments and the testing of ideas.
In addition, the example demonstrates a Docker-based application deployment, which is a good foundation for microservices.
- • Spring, Spring Boot, Spring Cloud, and the Netflix Stack offer a well-integrated stack for Java-based microservices. These technologies solve all typical challenges posed during the development of microservices.
- • Docker-based deployment is easy to implement, and in conjunction with Docker Machine and Docker Compose, can be used for deployment in the Cloud, too.
- • The example application shows how to test microservices using consumer- driven contract tests and stubs without special tools. However, for real-life projects tools might be more useful.
Try and Experiment
Add Log Analysis
The log analysis of all log files is important for running a microservice system. At https://github.com/ewolff/user-registration-V2 an example project is provided. The subdirectory log-analysis contains a setup for an ELK (Elastic- search, Logstash und Kibana) stack-based log analysis. Use this approach to add a log analysis to the microservice example.
In addition, the example project from the continuous delivery book contains graphite an installation of Graphite for monitoring in the subdirectory. Adapt this installation for the microservice example.
Rewrite a Service
Rewrite one of the services in a different programming language. Use the consumer-driven contract tests (see sections 13.13 and 10.7) to protect the implementation. Make use of a sidecar for the integration into the technology stack (see section 13.12).