liveBook · Manning

System boundary

As explained in Grokking Software Architecture

A separation that controls how responsibilities and dependencies cross between parts of a software architecture.

A system boundary marks where responsibilities and dependencies separate. In hexagonal architecture, it divides the business-logic core from external concerns such as databases, user interfaces, frameworks, and APIs. Keeping the core independent makes it easier to change or extend the outside without rewriting business logic. section 5.2.2 section 5.4

Boundaries matter in different ways depending on what crosses them:

  • At the core’s edge, ports define how outside components can communicate with business logic; adapters connect those ports to specific technologies. section 5.10
  • At a network boundary, an in-memory call becomes a slower, less reliable request. Each crossing brings potential latency, failure, and complexity. section 6.2.1
  • Architectural guardrails can detect boundary violations in CI. A ratchet gate can prevent new violations without requiring a legacy system to fix every existing one first. section 13.4.4

Add an adapter, keep the core

A hexagonal application can gain a mobile app or admin CLI through new adapters connected to defined ports. The business logic stays unchanged. That flexibility depends on keeping outside implementation details from leaking across the boundary. section 5.4

Ratchet down legacy violations

If a codebase has 85 boundary violations, set the CI threshold at 85. A change that raises the count to 86 fails; reducing it to 78 lowers the threshold. The limit moves toward fewer violations, not more. section 13.4.4

Figure 5.10 The Extensible Hexagon. Because the Application Core only communicates through defined Ports, you can easily plug in new "Future Adapters" (like a Mobile App or Admin CLI) without modifying a single line of your existing business logic.

The diagram shows how defined ports let new adapters connect without changing the application core. section 5.4

How Grokking Software Architecture covers it

How deep it goes
Defines inside and outside, explains dependency isolation and crossing costs, and illustrates incremental enforcement with a CI ratchet.
Examples
Uses future mobile and admin adapters, network requests, and an 85-to-86 violation ratchet example.
What you can do after
Evaluate/understand where dependencies cross and recognize network crossings as potential sources of latency and failure.
How it connects
Connects to Hexagonal Architecture, ports and adapters, and architectural fitness functions enforced through CI.

Also explained in

Compare how 9 books explain system boundary →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.