Microservices are small , independently deploy-able applications
- not a single codebase
- not necessary to be single language or framework
- modularization not based on the language/framework constructs
So Microservices are small independent applications build around small individual functional areas of our system . They freely communicate with each other through over open protocols when they need to communicate each other.
Microservice look like individual applications components but the differentiating concept here is the componentization is done through different services but not through the specific language or framework constructs. So if there is changes in the application the changes will be scoped within the particular component or service.
MicroServices Communicate over lightweight protocols like
- Http,TCP,UDP , Messaging etc
- – Payloads : JSON , BSON,XML etc
- Forces the design of clear interfaces
Microservices encapsulates business capabilities i.e microservices is not based on technlogy stack, vertical slices by business functions and it is more suitable for cross functional teams.
Microservie are easy to manage i.e microservice is easy to comprehend,alter,test,version,deploy,replace even by small , cross functional teams or by individual.
- Easy to digest each service
- very easy to test,deploy,manage,version and scale single services
- Easier to scale
- No language/framework dependency
Challenges with Microservices
- Complexity lies into operations layer since microservices are inherently distributed applications so there will be Fallacies of Distributed computing.
- sometime services may not available
- much more monitoring needed
- Remote calls are more expensive then in-process calls.
- Dependency management /version management may be a problem
- combining two services or refactoring module might be challenging
Microservice is an architectural style of decomposition of single system into independent running,interconnecting services , alternative of monolithic applications. And it has advantage and disadvantage as do monoliths.
Remember Microservices are not always smart and monolith app is not always bad.