The Three Dimensions of System Design: The Art of Blending
Welcome to the final instalment in our series exploring the fundamental dimensions of system design! After examining Consistency, Communication, and Coordination models individually, it's time to understand how they work together to create different architectural patterns.
The “Quite A Lot Of Possible” Combinations
When we combine our three dimensions:
We get eight possible combinations:
Atomic + Sync + Orchestrated (ASO)
Atomic + Sync + Choreographed (ASC)
Atomic + Async + Orchestrated (AAO)
Atomic + Async + Choreographed (AAC)
Eventual + Sync + Orchestrated (ESO)
Eventual + Sync + Choreographed (ESC)
Eventual + Async + Orchestrated (EAO)
Eventual + Async + Choreographed (EAC)
Let's examine these combinations in two categories: Common Patterns and Specialised Patterns(not so common for a reason).
Common Patterns | Most used
These patterns are widely used and proven in production environments.
1. The "Strong Consistency" Pattern (ASO)
Atomic + Sync + Orchestrated
Perfect for:
Financial transactions
Booking systems
Inventory management
Critical business operations
NFR Alignment:
Reliability: ⭐⭐⭐⭐⭐
Availability: ⭐⭐
Scalability: ⭐
Performance: ⭐⭐
Maintainability: ⭐⭐⭐⭐
Real-world example: Banking transaction system where every step must be verified and controlled.
When to use: When immediate consistency and process control are non-negotiable requirements.
2. The "Reliable Processing" Pattern (AAO)
Atomic + Async + Orchestrated
Perfect for:
Payment processing
Order fulfillment
Multi-step workflows
Compliance systems
NFR Alignment:
Reliability: ⭐⭐⭐⭐⭐
Availability: ⭐⭐⭐
Scalability: ⭐⭐⭐
Performance: ⭐⭐⭐
Maintainability: ⭐⭐⭐⭐
Real-world example: E-commerce order processing where steps must complete but can be processed asynchronously.
When to use: When you need strong consistency guarantees but can afford to wait for completion.
3. The "Balanced Scale" Pattern (EAO)
Eventual + Async + Orchestrated
Perfect for:
Data synchronisation
Report generation
Content processing
Batch operations
NFR Alignment:
Reliability: ⭐⭐⭐⭐
Availability: ⭐⭐⭐⭐
Scalability: ⭐⭐⭐⭐
Performance: ⭐⭐⭐⭐
Maintainability: ⭐⭐⭐
Real-world example: Content management system processing and distributing updates.
When to use: When you need process control but can work with eventual consistency.
4. The "High Scalability" Pattern (EAC)
Eventual + Async + Choreographed
Perfect for:
Social media feeds
Analytics systems
Content delivery
Event-driven systems
NFR Alignment:
Reliability: ⭐⭐⭐
Availability: ⭐⭐⭐⭐⭐
Scalability: ⭐⭐⭐⭐⭐
Performance: ⭐⭐⭐⭐⭐
Maintainability: ⭐⭐⭐
Real-world example: Social media news feed where posts eventually appear across the network.
When to use: When maximum scalability and availability are primary concerns.
Specialised Patterns
These patterns are more situational and often require careful consideration before implementation.
5. The "Distributed Consensus" Pattern (ASC)
Atomic + Sync + Choreographed
Challenging because:
Achieving atomic consistency in a choreographed system is complex
Synchronous communication can create bottlenecks
Hard to maintain atomic guarantees without central control
NFR Alignment:
Reliability: ⭐⭐⭐
Availability: ⭐⭐
Scalability: ⭐⭐
Performance: ⭐⭐
Maintainability: ⭐⭐
Real-world example: Distributed voting system requiring immediate consensus.
When to use: Only when you need atomic guarantees in a distributed system and can accept the complexity and performance impact.
6. The "Distributed Atomic" Pattern (AAC)
Atomic + Async + Choreographed
Challenging because:
Complex to implement atomic guarantees across distributed processes
Requires sophisticated compensation mechanisms
Hard to debug and maintain
NFR Alignment:
Reliability: ⭐⭐⭐
Availability: ⭐⭐⭐
Scalability: ⭐⭐⭐
Performance: ⭐⭐⭐
Maintainability: ⭐⭐
Real-world example: Distributed reservation system with eventual booking confirmation but atomic guarantees.
When to use: When you need atomic guarantees in a distributed system but can accept eventual completion.
7. The "Controlled Convergence" Pattern (ESO)
Eventual + Sync + Orchestrated
Challenging because:
Mixing eventual consistency with sync operations can be confusing
May indicate design issues
Can create unnecessary waiting
NFR Alignment:
Reliability: ⭐⭐⭐
Availability: ⭐⭐⭐
Scalability: ⭐⭐
Performance: ⭐⭐
Maintainability: ⭐⭐⭐
Real-world example: Status dashboard system with immediate updates but eventual consistency across regions.
When to use: When immediate response is needed but eventual consistency is acceptable for the final state.
8. The "Immediate Response" Pattern (ESC)
Eventual + Sync + Choreographed
Challenging because:
Sync communication can negate benefits of eventual consistency
Can create unnecessary coupling
May indicate architectural confusion
NFR Alignment:
Reliability: ⭐⭐
Availability: ⭐⭐⭐
Scalability: ⭐⭐
Performance: ⭐⭐
Maintainability: ⭐⭐
Real-world example: Real-time collaboration system with immediate local updates but eventual global consistency.
When to use: Rarely recommended - consider async alternatives.
Architect's Alert 🚨
When selecting a pattern, consider:
Your Primary NFRs
Which qualities are most important?
What can you trade off?
What must you guarantee?
System Context
Scale requirements
Geographic distribution
Team capabilities
Operational maturity
Business Requirements
Consistency needs
Response time requirements
Regulatory requirements
Cost constraints
Best Practices
Start Simple
Choose common patterns first
Add complexity only when needed
Document your rationale
Monitor system behaviour
Mix Patterns Carefully
Define clear boundaries
Document interactions
Monitor integration points
Plan for evolution
Review Regularly
Assess pattern effectiveness
Monitor NFR alignment
Gather team feedback
Plan improvements
Conclusion
Understanding these eight combinations helps make better architectural decisions. While the common patterns will serve most needs, knowing when and why to use specialised patterns is crucial for handling unique requirements effectively.
Remember: The best pattern is the one that meets your specific needs while maintaining system simplicity and manageability.