liveBook · Manning

Microservice architecture pattern language

As explained in Microservices Patterns, Second Edition

An organized collection of related patterns for making architectural and design decisions about microservice systems.

The microservice architecture pattern language is a collection of related architecture and design patterns for recurring microservice problems. It supports deliberative design by helping identify the context, evaluation criteria, and candidate solutions for a decision. section 7.6 section 7.6.1

Start by comparing monolithic and microservice architectures, including their benefits and drawbacks. A monolith can be a good choice; microservices may make sense when a successful application and its organization outgrow it and can no longer achieve the quality attributes needed for fast flow. If microservices are a good fit, use the remaining patterns to address the problems that choice introduces. section 7.0 section 7.6.2

Figure 7.12 A high-level view of the microservice architecture pattern language showing the different problem areas that the patterns solve. On the left are the application architectural style patterns: Monolithic Architecture and Microservice Architecture. The other groups of patterns all solve problems created by choosing the Microservice architecture pattern.
MicroservicePatternLanguageOverview

The overview connects the initial architecture choice to the problem areas created by adopting microservices. section 7.6.2

Patterns are related as well as grouped by problem area. A successor addresses a problem created by a predecessor; alternatives solve the same problem; and a specialization is a particular form of another pattern. These relationships help guide selection rather than treating patterns as an isolated catalog. section 7.6.1

Specializing deployment

Deploy a service as a container is a specialization of Single service per host. Other deployment approaches include language-specific packages, virtual machines, and serverless deployment. A service deployment platform provides automated, self-service deployment and management. section 7.6.1 section 7.6.2

The patterns following the architecture choice are organized into three layers:

  • Infrastructure patterns address issues mostly outside development. section 7.6.2
  • Application infrastructure patterns address infrastructure issues that also affect development. section 7.6.2
  • Application patterns address problems developers face when developing services. section 7.6.2

Choosing service collaboration patterns

An operation spanning services requires a combination of collaboration patterns. A Saga implements a distributed command as local transactions in participating services. A command-side replica keeps a local, read-only copy of another service’s data for efficient command-side queries. API Composition implements a distributed query by querying the services that own the data and aggregating their results. section 7.6.2

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines pattern relationships and groups, then outlines layers and representative solutions without detailing their implementations.
Examples
Uses container deployment as a specialization and describes Saga, command-side replica, and API Composition for service collaboration.
What you can do after
Evaluate and understand architecture choices and select related patterns for problems introduced by microservices.
How it connects
Connects microservice architecture to monolithic architecture, deliberative design, service collaboration, and service deployment.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.