3.6 Conclusion
Microservices are a modularization approach. For a deeper understanding of micro-services, the different perspectives discussed in this chapter are very helpful:
Section 3.1 focuses on the size of microservices. But a closer look reveals that the size of microservices itself is not that important, even though size is an influencing factor. However, this perspective provides a first impression of what a microservice should be. Team size, modularization, and replaceability of microservices each determine an upper size limit. The lower limit is determined by transactions, consistency, infrastructure, and distributed communication.
Conway’s Law (section 3.2) shows that the architecture and organization of a project are closely linked—in fact, they are nearly synonymous. Microservices can further improve the independence of teams and thus ideally support architectural designs that aim at the independent development of functionalities. Each team is responsible for a microservice and therefore for a certain part of a domain, so that the teams are largely independent concerning the implementation of new functionalities. Thus, in regards to domain logic there is hardly any need for coordination across teams. The requirement for technical coordination can likewise be reduced to a minimum because of the possibility for technical independence.
In section 3.3 domain-driven design provides a very good impression as to what the distribution of domains in a project can look like and how the individual parts can be coordinated. Each microservice can represent a Bounded Context. This is a self-contained piece of domain logic with an independent domain model. Between the Bounded Contexts there are different possibilities for collaboration.
Finally, section 3.5 demonstrates that microservices should contain a UI to be able to implement the changes for functionality within an individual microservice. This does not necessarily have to be a deployment unit; however, the UI and microservice should be in the responsibility of one team.
Together these different perspectives provide a balanced picture of what constitutes microservices and how they can function.
Essential Points
To put it differently: A successful project requires three components:
an organization (This is supported by Conway’s Law.)
a technical approach (This can be microservices.)
a domain design as offered by DDD and Bounded Context
The domain design is especially important for the long-term maintainability of the system.