liveBook · Manning

Chapter 6: The monolithic architecture

What you will learn in chapter 6 of Microservices Patterns, Second Edition

The chapter introduction explains why a monolith can remain a good choice despite the fast-flow advantages often associated with multi-component architectures.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The chapter introduction explains why a monolith can remain a good choice despite the fast-flow advantages often associated with multi-component architectures.

Key terms: single component architecture, monolithic architecture, multi-component architecture, fast flow

6.1 About the monolithic architecture

Defines the monolithic architecture and explains why its simplicity can make it suitable for applications, especially early in their lifetime.

Key terms: monolithic architecture, single component, single code repository, single deployment pipeline, simplicity

6.1.1 Benefits of the monolithic architecture

This section explains four practical benefits of a monolith: simpler development, system operations, deployment, and troubleshooting, while noting important exceptions.

Key terms: single code base, compile-time enforcement of APIs, system operations, single transaction, ACID, isolation, single component, single technology stack, multi-cluster deployment, troubleshooting

6.1.2 The monolithic architecture and the quality attributes for fast flow

Explains why a small monolith can support fast flow but a monolith’s modifiability, evolvability, testability, deployability, and observability become harder to sustain as the application or organization grows.

Key terms: modifiability, domain view, design-time coupling, technical debt, big ball of mud, evolvability, technology stack, single component, testability, deployment pipeline

6.1.3 Other drawbacks of monolithic architecture

This section explains two drawbacks of a monolith beyond declining fast-flow quality attributes: one technology stack for all code and no service-level isolation of subdomains.

Key terms: monolith, single technology stack, language runtime, supporting libraries, subdomain, subdomains, business criticality, security, separate services, structural separation

6.1.4 The monolithic architecture pattern language

This section introduces a pattern language for mitigating some monolith drawbacks through structural and build-project design while acknowledging that other limitations are inherent.

Key terms: fast flow, single technology stack, pattern language, Technology-Oriented Monolithic Architecture pattern, Modular Monolith pattern, design-time coupling, build-time coupling

6.2 Modularizing the monolith

This introduction explains why a monolith’s traditional technology-oriented domain structure can undermine loose coupling, cohesion, testability, and deployability.

Key terms: monolithic architecture, technology-oriented architectural style, domain view, design-time coupling, cohesion, build-time coupling

6.2.1 A technology-oriented architectural style for the domain architecture

This section shows how a technology-oriented layered monolith spreads subdomain code across layers and why that structure becomes problematic as an application and its teams grow.

Key terms: Monolithic architectural style, component view, build view, domain view, technology-oriented, layered architecture, web, domain, persistence, subdomain

6.2.2 Introduction to the modular monolith

This section introduces the modular monolith as a monolith organized by subdomain and explains how that organization can give teams clear ownership of their code.

Key terms: modular monolith, subdomains, domain modules, main module, layered architecture, Hexagonal architecture, domain-oriented architecture, technical concepts, domain architecture, organization’s structure

6.2.3 Domain module design

This section explains how to structure a domain module and limit coupling through its internal architecture, API, and database boundaries.

Key terms: domain module, subdomain, vertical slice, hexagonal architecture, inbound adapter, outbound adapter, design-time coupling, facade-style API, ConsumerService, ConsumerRepository

6.2.4 Designing system operations that span domains

This section explains how a modular monolith coordinates system operations across domain modules and chooses transaction boundaries for those operations.

Key terms: entry point, Invoke, design-time coupled, runtime coupled, Observer pattern, subject, observer, notification, asynchronous messaging, message channel

6.2.5 Testing strategy for a modular monolith

A modular monolith improves testability by testing loosely coupled domain modules independently and keeping whole-application tests limited to integration checks.

Key terms: modular monolith, domain modules, design-time coupling, edit-compile-analyze loop, unit tests, integration tests, module tests, test doubles, adapter classes, application tests

6.3 Minimizing build-time coupling to improve testability and deployability

This section explains why reducing build-time coupling in a modular monolith can improve testability, deployability, and fast flow.

Key terms: build-time coupling, modular monolith, domain module, testability, deployability, fast flow

6.3.1 About physical design principles

The section explains why mapping each domain module to one build project can slow builds and introduces physical design principles for reducing build-time coupling.

Key terms: domain module, build project, build-time coupling, transitive dependencies, logical design, physical design, design-time coupling, physical design principles, stable projects, tested together

6.3.2 Define build projects for domain module APIs

This section shows how separating a domain module’s API and implementation into build projects reduces build-time coupling and retesting.

Key terms: domain module, API build project, implementation build project, build-time coupling, test double, edit-test-analyze cycle

6.3.3 Apply the Interface segregation principle

This section shows how splitting a domain module’s API by client needs reduces unnecessary build-time coupling and retesting.

Key terms: Interface segregation principle, build-time coupling, API build project, ConsumerService, CreditManagement, common types

6.3.4 Segregate implementation build projects

Separating a domain module’s implementation into build projects avoids unnecessary test runs and speeds up development and deployment feedback.

Key terms: build-time coupling, design-time, implementation build project, implementation build projects, domain build project, edit-test-analyze cycle, deployment pipeline

6.4 The limitations of the modular monolith

This introduction presents the modular monolith as an improvement over a layered monolith while setting limits on what that improvement implies.

Key terms: modular monolith, traditional layered monolith, microservice architecture

6.4.1 A modular monolith is still a monolith

This section explains why modularity improves a monolith without removing the architectural limits that may eventually impede fast flow.

Key terms: modular monolith, worst case build time, testability, deployability, evolvability, observability, fast flow

6.4.2 The myth of the microservices-ready modular monolith

A modular monolith’s domain modules cannot necessarily be extracted into services without redesigning their interactions and transactions.

Key terms: domain modules, method calls, service-to-service communication, runtime coupling, ACID transaction, local to each service, Saga pattern, consistency, rollback

6.5 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 5: Architectural requirements for fast flow Chapter 7: The Microservice architecture: enabling fast sustainable flow →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.