Sign in
Log inSign up
What is Microservices and How to Implement with Springboot

What is Microservices and How to Implement with Springboot

kathirvelan's photo
kathirvelan
·Jun 27, 2019

Microservices:

I’m a big fan of 4 Principles of Simple Design. One of them is “Keep it Small”. Small methods, Small classes, Small Components, Small Services. Microservices are a step in the same direction - Small Deployable Units.

Keep the deployable units small. Build your applications around them. The challenge in developing microservices are

Deciding the boundaries of these individual microservices. Biggest challenge. Domain Driven Design might help! But this takes the experience to figure out Implementing them quickly: We will not have one project but maybe 100 microservices. So, you would want to be able to develop them quickly. Cloud Native: To really benefit from microservices architectures, they should be cloud-native i.e. easily deployable on the cloud. This would give you benefits of scaling up and down easily - Reduced costs, who wouldn't like that! Automation: You should be able to automate the entire deployment and monitoring process.

How to Implement Spring boot Using Microservices:

If you would like to implement microservices try to use Spring Cloud together with Spring Boot. Spring Boot simplifies and accelerates Java applications development, while Spring Cloud provides an implementation of common microservices pattern and integration with most popular tools used for microservices management. The microservice implementation with Spring Boot and Spring Cloud is a really huge topic. Which as deeply covered in this Spring boot tutorials The most popular projects being a part of Spring Cloud are:

Spring Cloud Netflix Eureka - discovery server/client implementation based on NetlixOSS Eureka.

Spring Cloud Config - distributed configuration server/client implementation Spring Cloud Netflix Zuul - API gateway/proxy implementation based on NetflixOSS Zuul.

Spring Cloud OpenFeign - declarative REST client responsible for inter-service communication between microservices.

Spring Cloud Stream - used for building message-driven microservices communicating over message brokers (RabbitMQ/Kafka).

These are only some of the projects being a part of Spring Cloud framework. If you are interested in the simple and more advanced samples of microservices built on top of Spring Boot/Spring Cloud.