Advanced Patterns
Modern design patterns that have emerged since the original Gang of Four book (1994). These patterns address challenges in cloud-native systems, concurrency, distributed data management, domain modeling, and more.
Cloud Resilience
| Pattern | Intent |
|---|---|
| Circuit Breaker | Prevent cascading failures by stopping calls to a failing service |
| Bulkhead | Isolate components so one failure doesn’t sink others |
| Retry with Backoff | Handle transient failures by retrying with increasing delays |
| Sidecar | Deploy auxiliary functionality in a companion process |
Concurrency
| Pattern | Intent |
|---|---|
| Actor Model | Encapsulate state in actors that communicate via async messages |
| Future / Promise | Represent a value that will be available asynchronously |
| Reactor | Demultiplex and dispatch requests via a single-threaded event loop |
| Object Pool | Reuse pre-allocated objects to avoid expensive creation |
Data & Messaging
| Pattern | Intent |
|---|---|
| CQRS | Separate read and write models for independent optimization |
| Event Sourcing | Persist state as a sequence of immutable events |
| Saga | Coordinate distributed transactions with compensating actions |
| Publish-Subscribe | Broadcast messages through a broker without sender knowing receivers |
Domain-Driven Design
| Pattern | Intent |
|---|---|
| Bounded Context | Define explicit boundaries for a domain model |
| Aggregate | Cluster objects into a consistency boundary with a root entity |
| Anti-Corruption Layer | Translate between your model and an external system’s model |
| Repository | Mediate between domain and data layers with a collection-like interface |
Structural & Creational Extras
| Pattern | Intent |
|---|---|
| Dependency Injection | Supply dependencies from the outside for loose coupling |
| Null Object | Provide a do-nothing object to eliminate null checks |
| MVVM | Separate UI from logic via a ViewModel with data binding |
| Specification | Encapsulate business rules as composable predicate objects |
Patterns in Practice
See how design patterns manifest in real-world systems:
| Page | Covers |
|---|---|
| OS & Networking | D-Bus, systemd, udev, VFS, TCP/IP, nginx, DNS, TLS |
| Data & Distributed Systems | Databases, Kubernetes, Docker, Kafka, gRPC, Istio, Go, Rust |
| Hardware Design | PCIe, AXI, CPU pipelines, cache coherence, DMA, FPGA, secure boot |
Further Reading
Looking for even more patterns? See the Further Reading page for ~50 additional patterns from enterprise integration, functional programming, game development, and more.
Table of contents
- Circuit Breaker
- Bulkhead
- Retry with Backoff
- Sidecar
- Actor Model
- Future/Promise
- Reactor
- Object Pool
- CQRS
- Event Sourcing
- Saga
- Publish-Subscribe
- Bounded Context
- Aggregate
- Anti-Corruption Layer
- Repository
- Dependency Injection
- Null Object
- Model-View-ViewModel (MVVM)
- Specification
- Further Reading
- Patterns in OS & Networking
- Patterns in Data & Distributed Systems
- Patterns in Hardware Design