Patterns
18 pages
-
Anticorruption Layer (ACL)
Translation boundary protecting a bounded context's model from upstream language corruption; structure (FACADE+ADAPTER); ACL vs Conformist vs Open-Host Service; migration use with Strangler Fig
-
Branch by Abstraction
Migration for deeply embedded capabilities: 5 steps; feature toggles; verify variant with automatic fallback
-
Bulkhead Pattern
Resource partitioning, shuffle sharding, cellular architecture
-
Business Logic Implementation Patterns
Four-pattern spectrum: transaction script, active record, domain model, event-sourced domain model; subdomain-to-pattern mapping; transaction script failure modes; full tactical decision tree (pattern→architecture→testing strategy); migration paths between patterns
-
Circuit Breaker
Closed/open/half-open state machine for downstream resiliency
-
Context Map and Bounded Context Integration Patterns
Six bounded context integration patterns grouped by team collaboration type; context map notation; model translation: stateless proxy (sync/async) and stateful aggregation (stream processing, BFF); private vs public events; Evans' originating eight-pattern taxonomy (Shared Kernel, Customer/Supplier, Conformist, ACL, Separate Ways, OHS, Published Language, CI) and transformation recipes
-
Domain Model Pattern
DDD tactical pattern for core subdomain business logic: value objects (immutable, identified by values), entities, aggregates (consistency boundary, one-per-transaction rule, aggregate root, OCC), domain events, domain services; Evans elaborations on associations, entity identity, context-dependent entity/VO classification, service partitioning, modules as model elements
-
MVC and Web Presentation Patterns
MVC pattern; Page Controller vs Front Controller; Template/Transform/Two Step View; Application Controller
-
Outbox Pattern
Atomic write + publish without 2PC; relay process; CDC; data liberation patterns; DDD: two wrong approaches + correct approach; NoSQL embedding; pull vs push relay
-
Parallel Run
Correctness verification: both implementations run per request; old result returned; GitHub Scientist; dark launching vs canary vs parallel run; progressive delivery
-
Progressive Delivery
Release in stages exposing change to controlled subsets; deployment vs release decoupling; canary/blue-green/ring/dark-launch/parallel-run/feature-flag spectrum; SRE order-of-fault model; "roll back first, diagnose second"; prerequisites and anti-patterns
-
Repository Pattern
Evans' REPOSITORY pattern: in-memory collection illusion over aggregate roots; hides persistence technology; only for roots needing direct access; transaction control left to client; factory/repository complementarity
-
Retry
Transient failure recovery; exponential backoff with jitter; retry amplification in chains; idempotency prerequisite; retry queues
-
Saga Pattern
Distributed transactions via local transactions + compensations; 8 saga type taxonomy; semantic vs implementation coupling; orchestration/choreography trade-offs; DDD: saga vs process manager distinction; stateless/stateful saga; process manager as aggregate; Newman: backward/forward recovery, semantic rollbacks, step reordering, team-based coordination choice
-
Sidecar / Service Mesh
East–west traffic governance: mTLS, service authorisation, evolution from libraries to eBPF; sidecar as reuse mechanism for operational concerns; orthogonal coupling; data-sinking sidecar for EDM legacy integration
-
Specification Pattern
predicate VALUE OBJECT for expressing domain rules: three uses (validation, selection/querying, building to order); composite Specification with AND/OR/NOT; subsumption; integrates with REPOSITORY via selectSatisfying()
-
Strangler Fig Pattern
Incremental migration pattern: identify → implement → redirect via proxy; HTTP/FTP/message variants; UI composition (page, widget, micro frontends); deployment ≠ release; feature freeze
-
Timeout
Bounding wait time on every blocking call; sizing by P99.9; absent-timeout gotchas; relationship to circuit breaker and retry