Architectural patterns set the large-scale shape of a system: where responsibilities sit, how components communicate, and how data moves. A poor choice is expensive because local refactoring cannot repair a boundary that cuts through the wrong business capability or gives failure recovery to the wrong component.

The three notes in this folder address different boundaries. Software Architecture/Patterns/Architectural Patterns/Domain-Driven Design separates business models whose words and rules differ. Software Architecture/Patterns/Architectural Patterns/CQRS lets writes and reads use models shaped for their own jobs. Software Architecture/Patterns/Architectural Patterns/Event Sourcing makes an ordered event stream authoritative instead of storing only current state. None requires the others. Combining them is justified only when the domain needs each benefit and can carry each cost.

Integration and Data-flow Patterns by Failure and Coupling

Start with the decision being made. Request-response and publish-subscribe describe interaction. Streaming, batching, and ETL describe movement and visibility of data. Event Sourcing governs how state is recorded. Orchestration assigns ownership of a multi-step process. These choices can coexist because they operate at different layers.

software architecture architectural patterns

NeedPreferCoupling and orderingFailure ownerOperational cost
Immediate answer from one dependencyRequest-responseCaller knows the callee. Ordering follows the callCaller owns timeout, retry budget, and fallbackLow until fan-out or tail latency grows
One fact delivered to many consumersPublish-subscribeProducers know the contract, not consumers. Per-key ordering is broker-specificBroker and each consumer own delivery, lag, and idempotencyMedium: topics, schemas, replay, and dead letters
Continuous high-volume processingStreamingConsumers depend on stream contracts and partitioningPipeline owns checkpoints, backpressure, and replayHigh: state stores, lag, and repartitioning
Periodic bounded processingBatching or ETLJobs couple to input/output schemas, not request latencyScheduler owns retries and partial-run recoveryMedium: windows, staging, and reruns
Auditable state reconstructed from historySoftware Architecture/Patterns/Architectural Patterns/Event SourcingAggregate depends on ordered immutable eventsEvent store owns append order. Projectors own replayHigh: schema evolution and projections
Coordinated multi-step business processOrchestrationSteps couple to an explicit workflow contractOrchestrator owns compensation and progressMedium to high: durable state and recovery

Failure ownership is the useful selection test. A workable design can say where a failed item waits, which component retries it, whether order matters, and how work resumes without repeating side effects.

Architecture Selection Matrix

The families below overlap too. One service may use hexagonal boundaries internally, publish events, expose a client-server API, and still deploy inside a monolith. Naming a pattern says little about independent deployment or fault isolation unless the runtime boundaries support it.

software architecture architectural patterns

PatternPrimary boundaryChange cost it reducesCost it introducesUse when
LayeredTechnical responsibilityReplacing presentation or persistence behind stable interfacesCross-layer changes and pass-through codeDomain is straightforward and team boundaries follow layers
MicroservicesIndependently owned business capabilityDeploying and scaling one capability without the whole systemNetwork failure, data ownership, and platform overheadTeam autonomy and uneven scaling justify distributed operations
Event-drivenEvent contract and asynchronous consumerAdding consumers without changing the producerEventual consistency, ordering, and replay workProducers should not wait for every downstream reaction
Client-serverRequest contract between consumer and serviceEvolving clients and server behind a stable protocolCompatibility and availability couplingA central service owns data or policy for many clients
PluginStable host extension pointAdding optional capabilities without changing the coreVersioned extension contracts and isolationFeatures are independently installable or supplied by third parties
HexagonalDomain ports versus infrastructure adaptersReplacing databases, transports, and frameworks around domain logicMore interfaces and mapping codeDomain rules must remain testable and independent of infrastructure

References

3 items under this folder.