Making architectures evolvable
Self-similar patterns
As architects, we tend to gravitate towards patterns that work well at multiple scales. The same shape that reads as a simple queue in object-oriented design will read as a message queue between services. An eventbus has the same shape as an observer.
Using these associations consciously allows us to explore and test what will become larger-scale architectures with minimum investment and the shortest possible feedback loop: we can observe the system's behavior and predict shortcomings and limitations. We can explore different implementations without the overhead and cost of full-scale engineering. By the time we need to scale out, we already know the business mechanisms and boundaries of the system, and all that's left to do is to add the technological plumbing on top.
Pattern shapes
- Stack PlannedLast-In/First-Out task scheduling: Reporting, error handling
- Pipes & Filters PlannedCompose transformation/validation pipelines for analytical data
- Facade PlannedProvide unified interface, hide details: Decouple API design from API management
- Actor PlannedIsolated state, message in / message out: Concurrent processing, fault tolerance
- Proxy PlannedCall a stand-in, execute elsewhere: Structural decomposition, mocking, A/B testing
You can find the source code for all the examples including tests with a basic project setup for Typescript with CDK in the domain-prototyping-examples repository.
This catalog is a work in progress.
Patterns will be added over time. Please beware that code examples will always be simplified to serve teaching purposes, and do not reflect production-ready implementations. In particular, your own versions should include input validation, proper error handling, and satisfy security needs.