Don't wanna be here? Send us removal request.
Text
Spring boot and microservices:
The idea of Microservices is simple, breaking a big monolithic application that contains everythng from UI to service layer to database into small chunk applications that are loosely coupled and can work on their own.
For example, in a company 1ike Uber, you could have several applications providing different services e.g. discovering when a driver is online or a passenger
is searching for a cab, finding a route, traffic, and handling payments.
These small applications are known as Microservices.
In the Java world, Spring provides several tools and frameworks to develop microservices e.g. Spring Boot and Spring Cloud.
Spring boot is very popular framework because its function like ease to setup autoconfiguration, support to other framework like ORM.
Java Monolithics:
Imagine you are working for a bank application. You provide users a application, which they can use to open up a new bank account, invest in mutual fund, insurence.
we will have different module /service for each function 1ike to opne account, manage balance, insurence etc.
That all code will increase code size. so that it will take more time to deploy it on server
Suppose there is issue in one service then also we need to put down whole application.Also finding any issue wil1 be difficult.
So in case of microservices , we will have different service for each module, which will operate independant of each other.
Let's consider there is a issue in insurence module then will put down only that service other will run as it is independant
and also we will not need to deploy whole application we will just deploy that service.
So here is question.
Is it micro if it only has 5-7 classes inside?
Are 100 or 1000 classes still micro?
Has it even got anything to do with the number of classes?
Instead of theorizing about it, we'1l keep things pragmatic and do two things:
Call all separately deployable services microservices
independent of size or domain boundaries.
Focus on the important topic of inter-service communication, because your microservices need ways to talk to each other.
Communication between two microservice
There are two ways to communicate:
Synchronous Communication
Asysnchronous Communication
Synchronous Communication usually done by HTTP and Rest ike service that return xml or json responses.
Asynchronous microservice communication is usually done through messaging with a IMS implementation and/or with a protocol like AMQP.
Usually, because the number of, for example, email/SMTP-driven integrations is not to be underestimated in practice.
Microservice Architecture
There are many way we can develop microservice. we can convert existing monolithic applicaton to microservices application
or we can start from scratch
4 notes
·
View notes