liveBook · Manning

Component

As explained in Microservices Patterns, Second Edition

A modular structural unit of a software system that groups related implementation or functionality.

A component is an executable or deployable unit that groups one or more application subdomains. Its form depends on the language and technology: a Java component might be an executable JAR or WAR, while another component might be an executable or a collection of source files. A library that must be packaged with other libraries is not itself a component. section 3.2.2 section 7.3.1

A central design decision is whether to package all subdomains in one component or distribute them across several. Operations that span components require collaboration, typically over a network. Components expose APIs through which others can invoke operations or consume published events. section 3.2.2

Partitioning a food delivery application

Consumer Management, Order Management, and Delivery Management can all be packaged into one component. Alternatives include a separate service for each subdomain, or an Order Service containing Order Management and Delivery Management alongside a Consumer Service. section 3.2.2

Figure 3.8 Two ways of organizing an application’s subdomains into components: grouping all subdomains into a single component (e.g., the monolithic architecture) or partitioning the subdomains into multiple components (e.g. the microservice architecture).
component view

Compare a single-component organization with a partition into multiple components. section 3.2.2

Multiple components can improve evolvability: private technology upgrades may affect only one component, and broader upgrades can proceed incrementally. They can also limit the impact of a vulnerable library. The trade-off is repeated work when a library used by every component must be upgraded separately, while shared infrastructure upgrades may still require coordination. section 5.3.4

A microservice architecture organizes subdomains into two or more loosely coupled, independently deployable services. Packaging a service as a component is necessary but not sufficient for independent deployment: the service also needs its own build, test, and deployment pipeline and must be production-ready after testing in isolation. Choose the simplest architecture that works, and evolve it to address tangible problems. section 7.1.1 section 7.3.1 section 3.5

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines component packaging and collaboration, compares partitioning options, and defers detailed partitioning decisions.
Examples
Compares single-component and multi-service arrangements for consumer, order, and delivery management.
What you can do after
Evaluate component partitioning and independent-deployment requirements against coordination and upgrade trade-offs.
How it connects
Connects components to subdomains, APIs, microservice architecture, deployment pipelines, and evolvability.

Also explained in

Compare how 14 books explain component →

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.