Shelves / Software Architecture
SA·139
Architecture Styles
The major ways to structure software systems and when each fits: what an architecture style is and the quality attributes it trades, layered architecture (and its sinkhole anti-pattern), hexagonal architecture with ports and adapters, clean and onion architecture with the dependency rule, vertical slices, modular monolith, microservices, event-driven architecture (broker and mediator topologies), serverless, service-oriented architecture and the ESB lessons, plugin (microkernel) architecture, pipes and filters, plus a comparison table and project layouts in Java, Kotlin, Go, Rust, Python and TypeScript.
Start here: the big shapes, and the one rule most of them share
An architecture style is a recurring overall shape for a system: layered (presentation → business → data), hexagonal (ports and adapters), clean/onion (concentric rings), event-driven, microkernel (core plus plug-ins), pipes and filters, microservices and others. Each trades some quality attributes for others. Most of the modern ones share one rule: the business core depends on nothing technical; technical details depend on the core.
Hexagonal architecture in miniature
The tiffin ordering core holds a use case and declares what it needs as a port (an interface):
class OrderRepository(Protocol): # port: what the core needs
def save(self, o: Order) -> None: ...
def count_for_dish(self, dish: str) -> int: ...
def next_id(self) -> int: ...
class PlaceOrder: # use case: rule "at most 5 per dish per slot"
def __init__(self, repo: OrderRepository): ...
Adapters plug technical details into the ports: an in-memory repository, a PostgreSQL repository, a command-line driver. The same core, driven and stored three ways:
command-line adapter: placed Order(id=1, dal, 3) placed Order(id=2, dal, 2)
rejected: dal sold out placed Order(id=3, roti, 4)
same 100 core tests, in-memory adapter: 0.23 s
same 100 core tests, PostgreSQL adapter: 2.15 s
The business rule was written once and ran unchanged against both stores and through a CLI; a web API or a message consumer would be one more adapter. Swapping PostgreSQL for another database means writing one new adapter that passes the same tests.
Keeping the rule true: an architecture test
Rules like "the core never imports infrastructure" erode one "quick fix" at a time. An architecture fitness function checks them automatically. With import-linter:
The domain core depends on nothing outside itself KEPT
--- after someone adds `import psycopg` to the core:
The domain core depends on nothing outside itself BROKEN
tiffin.core is not allowed to import psycopg:
- tiffin.core.ordering -> psycopg (l.2)
Run in CI, the check fails the build on the line that broke the rule. Java's ArchUnit, .NET's NetArchTest, go-arch-lint and dependency-cruiser for JavaScript do the same.
Choosing a style
| Style | Strength | Weakness | Fits |
|---|---|---|---|
| layered | simple, familiar | "sinkhole" layers that only pass calls through; DB-centric | CRUD apps, small teams |
| hexagonal / clean | testable core, swappable details | more interfaces and mapping code | rich domains, long-lived apps |
| event-driven | decoupling, scalability | hard to trace, eventual consistency | integrations, reactive flows |
| microkernel | extensibility via plug-ins | plug-in API is a hard contract | IDEs, browsers, rule engines |
| pipes and filters | composable stages | latency per stage, shared formats | data pipelines, compilers |
| microservices | independent deploy and scale | distribution costs (chapter 141) | many teams, varied scaling needs |
How deep to go in architecture styles
Volume 17 defines six mastery levels. For this chapter they look like this; the chapter aims at L3 everywhere, and its lab at L4.
| Level | What you can do |
|---|---|
| L1 | Name the main styles and sketch each |
| L2 | Build a service in layered or hexagonal style with clean dependency direction |
| L3 | Explain each style's quality-attribute trade-offs and when it fits |
| L4 | Detect erosion with fitness functions and dependency analysis, and fix it |
| L5 | Choose and combine styles for a system and justify the choice in an ADR |
| L6 | Set architectural guardrails and reference architectures for an organisation |
What an architecture style is
An architecture style is a named set of structural decisions: what the main components are, how they communicate, what dependency rules hold between them, and how they're deployed. Like design patterns at a larger scale, styles bundle known trade-offs among quality attributes (Vol. 12 ch. 121): maintainability, testability, deployability, scalability, performance, fault tolerance, simplicity and cost.
Two orthogonal dimensions help classify styles (Mark Richards & Neal Ford, Fundamentals of Software Architecture):
- Code organisation inside a deployable: layered, hexagonal, clean, vertical slices, microkernel.
- Deployment topology: monolithic (one deployable unit) vs distributed (many units communicating over a network: microservices, service-based, event-driven, serverless, SOA).
You usually combine one of each: a modular monolith organised hexagonally per module; microservices each internally layered; serverless functions with a functional core.
Layered architecture
Structure
The most familiar style: code organised into horizontal layers, each with a technical responsibility, where each layer depends only on the layer(s) below:
- Presentation (UI, controllers, API endpoints)
- Application/business (services, use cases, domain logic)
- Persistence/data access (repositories, DAOs, ORM)
- Database
Closed layers must be traversed in order (presentation can't skip to persistence); open layers may be bypassed. Closed layers provide isolation: changing the persistence layer shouldn't affect presentation.
Strengths: simple, familiar, matches team skills and frameworks (Spring MVC, ASP.NET, Rails, Django), good starting point for small applications.
Weaknesses:
- Technical partitioning: a feature ("add loyalty points to checkout") cuts across every layer; changes spread across many packages, and teams organised by layer coordinate constantly.
- Domain depends on persistence: business logic typically imports ORM entities and repositories directly, making it hard to test without a database and coupling it to the data model.
- Architecture sinkhole anti-pattern: requests pass through layers that do nothing but forward calls (controller → service → repository with no logic in between). Some pass-through is normal; when most requests are sinkholes, the layers add cost without value.
- Tends toward a big ball of mud as it grows, because nothing enforces domain boundaries.
Package by layer vs package by feature
# Package by layer (technical partitioning) # Package by feature (domain partitioning)
com.shop.controller.OrderController com.shop.ordering.OrderController
com.shop.controller.CatalogueController com.shop.ordering.PlaceOrder
com.shop.service.OrderService com.shop.ordering.Order
com.shop.service.CatalogueService com.shop.ordering.OrderRepository
com.shop.repository.OrderRepository com.shop.catalogue.ProductController
com.shop.repository.ProductRepository com.shop.catalogue.Product
com.shop.model.Order / Product com.shop.catalogue.ProductRepository
Package-by-feature (also called vertical or domain partitioning) keeps what changes together in one place and lets you hide internals (package-private classes in Java, internal in Kotlin, unexported identifiers in Go). It's the foundation of the modular monolith (chapter 140).
Hexagonal architecture (ports and adapters)
Idea
Alistair Cockburn's hexagonal architecture (2005), also called ports and adapters, puts the application core (domain and use cases) at the centre and pushes all technology to the outside. The core communicates with the world only through ports:
- Driving (primary/inbound) ports: interfaces the outside world uses to drive the application: use-case interfaces such as
PlaceOrder,CancelOrder. - Driven (secondary/outbound) ports: interfaces the application needs from the outside world, defined by the core:
OrderRepository,PaymentGateway,Notifier,Clock.
Adapters implement or call the ports for specific technologies:
- Driving adapters: REST controllers, gRPC services, GraphQL resolvers, CLI commands, message consumers, scheduled jobs, test harnesses: they translate external input into calls on driving ports.
- Driven adapters: Postgres repositories, Kafka publishers, Stripe/Razorpay clients, SMTP senders, in-memory fakes for tests.
The hexagon shape has no special meaning beyond showing that there are many sides (ports) and no privileged "top" or "bottom", unlike layers.
Benefits
- Testability: the core can be tested with in-memory adapters, fast and deterministic; driving the application through ports in tests exercises real use cases without HTTP or databases.
- Technology independence: swap Postgres for DynamoDB, REST for gRPC, Kafka for SQS by writing new adapters.
- Delayed decisions: build and test the domain before choosing infrastructure.
- Symmetry: every input channel (HTTP, messages, CLI, tests) is just another driving adapter.
Costs
- More types and mapping code (DTOs ↔ domain objects ↔ persistence models).
- Overkill for simple CRUD where there's little domain logic to protect.
- Frameworks may need to be configured to respect the boundaries (e.g. JPA annotations on domain classes are a pragmatic compromise many teams accept).
Project layout examples
# Java/Kotlin (Gradle multi-module or packages with ArchUnit rules)
ordering/
domain/ Order, OrderLine, Money, OrderRepository (port), PaymentGateway (port)
application/ PlaceOrderUseCase (in-port), PlaceOrderService (implements it)
adapter/
in/web/ OrderController (Spring MVC) → calls PlaceOrderUseCase
in/messaging/ CartCheckedOutListener → calls PlaceOrderUseCase
out/persistence/ JpaOrderRepository → implements OrderRepository
out/payment/ RazorpayPaymentGateway → implements PaymentGateway
config/ Spring @Configuration wiring
# Go (standard-ish layout; internal/ enforces visibility)
cmd/orders/main.go # composition root: wires adapters to the core
internal/ordering/ # core: domain types + use cases + port interfaces
order.go place_order.go ports.go
internal/adapters/postgres/ # implements ordering.Repository
internal/adapters/razorpay/ # implements ordering.PaymentGateway
internal/adapters/httpapi/ # handlers calling ordering use cases
internal/adapters/kafka/ # consumers calling use cases, publisher implementing ports
# Rust (cargo workspace: crate boundaries enforce dependency direction)
crates/
ordering-core/ # domain + use cases + traits (ports); depends on nothing infra
ordering-postgres/ # depends on ordering-core; implements repository traits with sqlx
ordering-http/ # axum handlers; depends on ordering-core
orders-app/ # binary: wires everything (composition root)
# TypeScript (monorepo packages or folders + eslint-plugin-boundaries / dependency-cruiser rules)
src/ordering/domain/ order.ts, money.ts, ports.ts
src/ordering/application/ placeOrder.ts
src/ordering/adapters/http/ routes.ts (Fastify/Express/Nest controllers)
src/ordering/adapters/db/ drizzleOrderRepo.ts
src/main.ts composition root
# Python (packages + import-linter contracts)
ordering/
domain/ models.py, ports.py
application/ place_order.py
adapters/ fastapi_routes.py, sqlalchemy_repo.py, razorpay_client.py
bootstrap.py wiring (composition root)
# .importlinter: forbid ordering.domain from importing ordering.adapters, fastapi, sqlalchemy
Clean architecture and onion architecture
Onion architecture (Jeffrey Palermo, 2008) and Clean Architecture (Robert Martin, 2012) are close relatives of hexagonal architecture, drawn as concentric circles:
- Entities / domain model (innermost): enterprise-wide business rules.
- Use cases / application services: application-specific business rules.
- Interface adapters: controllers, presenters, gateways, repositories implementations, mappers.
- Frameworks and drivers (outermost): web framework, database, UI, external services.
The Dependency Rule: source-code dependencies point only inward. Nothing in an inner circle knows anything about an outer circle (no names, no types, no framework annotations). Data crossing boundaries is passed as simple structures (DTOs, request/response models) defined by the inner circle.
Hexagonal, onion and clean architecture share the essential idea (domain at the centre, dependencies inward, infrastructure as plug-ins); they differ mainly in terminology and how many inner rings they name. Practical advice: adopt the idea, not every ring. A two-or-three-ring structure (domain + application + adapters) is enough for most services.
Vertical slice architecture
Vertical slice architecture (popularised by Jimmy Bogard) organises code by feature/use case: each request type (e.g. PlaceOrder, GetOrderSummary) has its own slice containing its endpoint, handler, validation, data access and DTOs, often using a mediator/command-handler pattern. Shared abstractions are minimised; each slice chooses the simplest implementation (a rich domain model for complex commands, a direct SQL query for a simple read).
- Pros: changes are local to a slice; little ceremony for simple features; aligns with CQRS (commands and queries as separate slices).
- Cons: risk of duplication and inconsistent approaches across slices; complex domain logic still needs a shared domain model.
Vertical slices and hexagonal architecture combine well: slices for the application layer, a shared domain model for complex rules, adapters at the edges.
Modular monolith
A modular monolith is a single deployable application divided into modules aligned with business domains (bounded contexts), with enforced boundaries: explicit module APIs, no reaching into other modules' internals or tables, and dependency rules checked automatically. It combines the operational simplicity of a monolith with much of the modularity of microservices, and is often the best architecture for most teams. Chapter 140 covers it in depth.
Microservices
Microservices structure an application as a set of independently deployable services, each owning its data and implementing one bounded context, communicating over the network (APIs, events), owned by small autonomous teams. They enable independent deployment, scaling and technology choices, at a large cost in operational complexity, distributed-systems failure modes, data consistency and testing. Chapter 141 covers them in depth.
Service-based architecture (Richards & Ford) is a pragmatic middle ground: a handful (4–12) of coarse-grained domain services, often sharing one database, deployed separately but without the full machinery of fine-grained microservices.
Event-driven architecture
In event-driven architecture, components communicate primarily by producing and consuming events asynchronously (Vol. 12 ch. 128, 131). As an architecture style, two topologies are distinguished:
- Broker topology (choreography): event processors publish events to a broker; other processors react and publish further events; no central coordinator. Highly decoupled and scalable; the overall flow is implicit and hard to monitor; error handling is distributed.
- Mediator topology (orchestration): an event mediator (orchestrator, workflow engine) receives an initiating event and coordinates processing steps by sending commands to processors. Clear control flow and error handling; the mediator can become a bottleneck or coupling point.
Strengths: responsiveness, scalability, extensibility (new consumers without touching producers), fault isolation. Weaknesses: eventual consistency, harder testing and debugging, schema evolution, complex error handling. Event-driven communication is commonly combined with other styles (microservices integrating via events; a modular monolith using in-process events between modules).
Serverless architecture
Serverless architectures build applications from managed services and functions-as-a-service (FaaS: AWS Lambda, Azure Functions, Google Cloud Run functions, Cloudflare Workers) that run in response to events (HTTP requests, queue messages, file uploads, schedules), scale automatically (including to zero) and bill per invocation or per resource use (Vol. 7 ch. 86).
| Strengths | Weaknesses |
|---|---|
| No server management; automatic scaling and high availability | Cold starts add latency (mitigated by provisioned concurrency, SnapStart, lighter runtimes) |
| Pay per use: cheap for spiky or low traffic | Expensive at sustained high throughput compared with containers |
| Fast to build event-driven glue and integrations | Execution limits (duration, memory, payload sizes); statelessness |
| Fine-grained scaling and isolation | Vendor lock-in (triggers, IAM, managed services); local testing harder |
| Security patching handled by the provider | Distributed debugging, many small deployables, connection management to databases |
Design guidance: keep functions small and stateless, use a functional core so business logic is testable without the cloud (hexagonal inside each function), make handlers idempotent (events are delivered at least once), use managed workflow services (Step Functions, Durable Functions) for multi-step processes, and watch costs and limits. Container-based "serverless" platforms (Cloud Run, Azure Container Apps, AWS App Runner, Knative) give similar scaling with fewer runtime restrictions.
Service-oriented architecture (awareness)
SOA (late 1990s–2000s) organised enterprise systems as reusable services exposed via standard interfaces (SOAP/WSDL, XML), often integrated through an Enterprise Service Bus (ESB) handling routing, transformation, orchestration and protocol mediation, with central governance and a canonical data model.
Lessons microservices learned from SOA's problems:
- Smart pipes, dumb endpoints (ESBs full of business logic and transformations) became central bottlenecks owned by an integration team: microservices favour smart endpoints and dumb pipes.
- Enterprise-wide canonical models created coupling and endless negotiation: DDD favours bounded contexts with their own models and explicit translation.
- Reuse-first design produced services shaped for hypothetical reuse rather than business capabilities.
- Heavyweight standards (WS-*) and central governance slowed delivery.
SOA's good ideas (service contracts, loose coupling, business-aligned services) live on in microservices, API management and event-driven integration.
Plugin (microkernel) architecture
A microkernel (plugin) architecture has a minimal core system providing essential functionality and extension points, plus independent plug-in modules that add features, discovered and loaded through a registry. Examples: IDEs (VS Code extensions, IntelliJ plugins, Eclipse OSGi), browsers (extensions), build tools (Gradle, Maven, webpack/Vite plugins, Babel), editors, CMSs (WordPress), databases (PostgreSQL extensions), Kubernetes (operators/CRDs, admission webhooks), and product configurators (insurance claims processing with per-jurisdiction rule plugins).
Mechanisms across languages:
| Ecosystem | Plugin mechanism |
|---|---|
| Java | ServiceLoader (META-INF/services, JPMS provides … with), OSGi, PF4J; Spring auto-configuration is a plugin system |
| Go | Compile-time registration via init() and imports (database/sql drivers); plugin package (Linux/macOS, fragile); out-of-process plugins over RPC (HashiCorp go-plugin, used by Terraform/Vault) |
| Rust | Traits + feature flags/compile-time registration (inventory crate); dynamic loading via libloading (unstable ABI) or WebAssembly plugins (Wasmtime, Extism) |
| Python | Entry points in package metadata (importlib.metadata.entry_points), pluggy (pytest's plugin system) |
| JavaScript/TypeScript | Module-based plugin arrays with lifecycle hooks (Vite/Rollup/webpack/ESLint), VS Code extension host (separate process) |
| C/C++ | Shared libraries loaded with dlopen/LoadLibrary, exporting a C ABI struct of function pointers |
| Any | WebAssembly components (WASI, component model) for sandboxed, language-neutral plugins; out-of-process plugins over gRPC/stdio (Language Server Protocol, MCP servers) |
// Java ServiceLoader: core defines the SPI; plugins ship as separate JARs
public interface ExportFormat { // plugin API (stable, versioned)
String id();
byte[] export(Report report);
}
// core: discover all plugins on the classpath/module path
Map<String, ExportFormat> formats = ServiceLoader.load(ExportFormat.class).stream()
.map(ServiceLoader.Provider::get)
.collect(Collectors.toMap(ExportFormat::id, f -> f));
// plugin JAR: META-INF/services/com.acme.reports.ExportFormat → com.acme.xlsx.XlsxExport
// or module-info.java: provides com.acme.reports.ExportFormat with com.acme.xlsx.XlsxExport;
# Python entry points: plugins declare themselves in pyproject.toml
# [project.entry-points."acme.exporters"]
# xlsx = "acme_xlsx:XlsxExporter"
from importlib.metadata import entry_points
exporters = {ep.name: ep.load()() for ep in entry_points(group="acme.exporters")}
Design concerns: a stable, versioned plugin API (breaking it breaks the ecosystem), isolation (a crashing or malicious plugin shouldn't take down the core: separate processes or Wasm sandboxes), lifecycle (load, enable, disable, update), dependency conflicts between plugins, and security (plugins run with the host's privileges unless sandboxed).
Pipes and filters
A pipes and filters architecture decomposes processing into independent filters (each transforming input to output) connected by pipes (streams, queues): Unix shell pipelines, compilers (lexer → parser → type checker → optimiser → code generator), media processing (decode → filter → encode), ETL/ELT data pipelines (Airflow/Dagster DAGs, Beam, Spark, Flink), CI/CD pipelines, and log processing (Vector, Fluent Bit, OpenTelemetry Collector receivers → processors → exporters). Filters can be developed, tested, reused and scaled independently; the costs are overhead per stage and difficulty with interactive or highly stateful processing (chapter 137 covers pipelines in code).
Comparing styles
| Style | Deployability | Scalability | Fault isolation | Simplicity | Testability | Cost | Best when |
|---|---|---|---|---|---|---|---|
| Layered monolith | Low (all at once) | Medium (scale whole app) | Low | High | Medium | Low | Small apps, CRUD, early stage |
| Modular monolith | Low–medium | Medium | Low–medium | High | High | Low | Most products until team/scale demand more |
| Hexagonal/clean (internal) | — | — | — | Medium | Very high | — | Complex domain logic in any deployable |
| Microkernel/plugin | Medium (plugins) | Low–medium | Medium (with isolation) | Medium | High | Low | Products customised by extensions |
| Service-based | Medium | Medium | Medium | Medium | Medium | Medium | Pragmatic split of a few domains |
| Microservices | Very high | Very high | High | Low | Medium (hard end-to-end) | High | Many teams, independent scaling and release |
| Event-driven | High | Very high | High | Low | Low–medium | Medium–high | Reactive, high-throughput, extensible integrations |
| Serverless | Very high | Very high (auto) | High | Medium | Medium | Low at small scale, high at sustained scale | Spiky/event-driven workloads, glue, small teams |
| Pipes and filters | Medium | High (per stage) | Medium | High | High | Low–medium | Data/stream processing, compilers |
Choosing a style is an architecture decision with trade-offs (chapter 142). Start with the simplest style that meets current quality attribute requirements, keep the code modular so you can evolve (a well-modularised monolith can be split into services along its module boundaries), and let real forces (team growth, scaling hotspots, independent release needs, fault isolation requirements) drive changes.
Lab: ports, adapters and an architecture test
Python 3.13 on the lab machine: a tiffin package with core (domain and use case, ports as typing.Protocol) and adapters (in-memory, PostgreSQL 16 via psycopg 3, command line); pytest; import-linter 2.15.
Experiment 1: one core, several adapters
$ python3 -m tiffin.adapters.cli dal:3 dal:2 dal:1 roti:4
placed Order(id=1, dish='dal', qty=3)
placed Order(id=2, dish='dal', qty=2)
rejected: dal sold out
placed Order(id=3, dish='roti', qty=4)
Adapter behind OrderRepository |
100 core tests |
|---|---|
InMemoryOrders |
0.23 s |
PostgresOrders |
2.15 s |
Note what the Protocol buys in Python: PlaceOrder never names a concrete class, and type checkers (mypy, pyright) verify each adapter structurally matches the port. In Java the port is an interface in the domain package and adapters live in separate modules that depend on it; in Go, the port is an interface declared in the core package, satisfied implicitly by adapter types.
A caveat that showed up while building this lab: the PostgreSQL adapter's next_id() (max(id) + 1) is correct for one process and wrong under concurrency, which the in-memory tests can never reveal. Adapters need their own integration tests against the real technology (Volume 11, chapter 116), in addition to the core's tests through the port.
Experiment 2: an architecture fitness function
[importlinter:contract:core-is-pure]
name = The domain core depends on nothing outside itself
type = forbidden
source_modules = tiffin.core
forbidden_modules = tiffin.adapters, psycopg, http
| State of the code | lint-imports |
|---|---|
| as designed | KEPT — Contracts: 1 kept, 0 broken |
import psycopg added to core/ordering.py |
BROKEN — tiffin.core.ordering -> psycopg (l.2) |
import-linter also supports layers contracts (each layer may import only those below) and independence contracts (modules that must not import each other), which chapter 140 uses for module boundaries. Fitness functions aren't limited to dependencies: latency budgets in a load test, bundle-size limits, "every public API has an OpenAPI entry", and "no service shares a database" are all checks you can automate.
Experiment 3: where layered architecture becomes a sinkhole
Count, for a layered codebase you know, how many service methods do nothing but call the repository method of the same name. Mark Richards' rule of thumb: if more than about 20% of requests are simple pass-throughs, the layering is costing more than it gives, and either the layers should be "open" (allowed to be skipped) or the style should change.
Try it yourself
- Add an HTTP adapter (any small framework) that drives
PlaceOrder, without changing the core. - Write a concurrency test for
PostgresOrderswith 10 parallelPlaceOrdercalls and fixnext_id(use a sequence) and capacity (conditional update). - Add an import-linter
layerscontract foradapters → coreand show what happens if the core imports an adapter. - Write the same core-purity rule with ArchUnit for a small Java project:
noClasses().that().resideInAPackage("..core..").should().dependOnClassesThat().resideInAPackage("..adapters..").
Revision sheet: architecture styles
Key ideas
- Styles trade quality attributes: modifiability, testability, performance, scalability, deployability, simplicity.
- Layered: closed vs open layers; sinkhole anti-pattern; database-centric drift.
- Hexagonal / clean / onion: dependencies point inward; ports owned by the core; adapters at the edge; composition root wires them.
- Event-driven: broker vs mediator topologies; decoupling at the cost of traceability.
- Microkernel: stable core, plug-in contracts.
- Pipes and filters, space-based, service-based, microservices: each with its sweet spot.
- Fitness functions keep architecture from eroding: dependency rules, latency budgets, size limits, checked in CI.
- Mixing styles is normal: hexagonal services inside an event-driven system, layered UI on top.
Numbers to remember
- Lab: one core ran 100 tests in 0.23 s in memory and 2.15 s on PostgreSQL, unchanged.
- Lab: a single new import broke the purity contract and was reported with its line number.
- Sinkhole rule of thumb: more than ~20% pass-through requests.
Pitfalls
- Hexagonal ceremony for trivial CRUD.
- Ports shaped like the database ("findByXAndY") rather than the domain's needs.
- Testing only through in-memory adapters and never the real ones.
- Architecture rules in a wiki that nothing enforces.
- Choosing microservices as a style before having the problems they solve.
Glossary
- Port / adapter: core-owned interface / technology-specific implementation or driver.
- Driving (primary) vs driven (secondary): adapters that call the core vs ones the core calls.
- Composition root: where adapters are plugged into ports.
- Fitness function: automated check of an architectural characteristic.
- Architecture erosion: gradual divergence of code from intended structure.