Microservice architecture¶
Microservice architecture is an architectural style and a specific realization of Service-Oriented Architecture (SOA) that focuses on decentralization to achieve high scalability^[600-developer-principle-soa-esb-microservice.md].
Relation to SOA and ESB¶
SOA is a conceptual framework defined by characteristics such as distributed computing, loose coupling between services, service encapsulation, and standardized service contracts^[600-developer-principle-soa-esb-microservice.md]. While SOA defines the "what" (the principles), it does not prescribe a specific implementation method^[600-developer-principle-soa-esb-microservice.md]. Implementations generally fall into two categories:
- Centralized (ESB): Implemented via an Enterprise Service Bus (ESB), which acts as a heavy, central hub to solve connectivity issues between heterogeneous systems (Heterogeneous system connectivity) through protocol conversion and message routing^[600-developer-principle-soa-esb-microservice.md].
- Decentralized (Microservices): Implemented via a distributed service framework where scalability is the primary requirement^[600-developer-principle-soa-esb-microservice.md].
Microservices represent the decentralized implementation of SOA^[600-developer-principle-soa-esb-microservice.md].
Characteristics¶
The architecture typically relies on distributed service frameworks to enable backend service governance^[600-developer-principle-soa-esb-microservice.md]. Common frameworks implementing this pattern include Dubbox and Spring Cloud^[600-developer-principle-soa-esb-microservice.md].
Core SOA Principles Inherited¶
As an implementation of SOA, microservices adhere to the following core principles^[600-developer-principle-soa-esb-microservice.md]:
- Coarse-grained encapsulation: Application services or business modules are encapsulated and reused at a relatively coarse level of granularity^[600-developer-principle-soa-esb-microservice.md].
- Loose coupling: Services maintain loose connections based on open standards, where interface descriptions are independent of specific implementations^[600-developer-principle-soa-esb-microservice.md].
- Flexibility: The architecture abstracts implementation details, service location, and the underlying protocols used for requests^[600-developer-principle-soa-esb-microservice.md].
Related Concepts¶
- [[Service-Oriented Architecture]]
- [[Enterprise Service Bus]]
- [[Distributed computing]]
- [[Backend service governance]]
Sources¶
^[600-developer-principle-soa-esb-microservice.md]