Establishing Basic Requirements
2 min readTechniques for organizing your interview and establishing requirements.
At every moment in an interview you will need to make a choice. To make good choices, adopt techniques that organize your interview into logical sections.
The Flow
- Understand the Problem
- Ask Clarifying Questions
- Define Key Constraints and Boundaries
- Understand the User and Consumer
- Suggest a Solution That Works
- Refine or Improve
Decision Matrix
A decision matrix is a visual comparison of how alternatives stack up against each other. Use it to qualify design alternatives so a decision can be made.
When to use:
- Compare patterns, technologies, or frameworks
- Visualize relative strengths and weaknesses
- Focus attention on essential factors
- Facilitate open discussion about trade-offs
Scenario Walkthrough
Describe step-by-step how the architecture addresses a specific quality attribute scenario. Walkthroughs are most applicable early in the life of a system, before its behavior can be observed directly.
A scenario walkthrough is like telling a story about the architecture. Pick a quality attribute scenario and describe what the system would do in response to the stimulus.
Benefits:
- Assess the architecture design early, even while it's still on paper
- Identify different concerns in the architecture
- Reason about how the architecture will respond to stimuli
- Qualify the design — walkthroughs are not strict pass/fail
Distribution Strategy
This is the most impactful strategy — and the one most often misunderstood. Many engineers jump to distributing by class, then bolt on load balancing after the fact.
Remote calls are expensive compared to local calls. If you base your distribution strategy on individual classes, you'll end up with too many remote calls and awkward, coarse-grained interfaces.
The Better Approach: Clustering
In most cases, put all the classes into a single process and run multiple copies on different nodes:
- Each process uses local calls internally (fast)
- You keep fine-grained interfaces for better maintainability
- You scale horizontally by adding more copies of the process
Related Content
TechCatalogue
A collection of notes, guides, and reference material covering core software engineering topics.
1 min readdocsChapter 1: Basic Request Flow
The fundamental request flow pattern in distributed systems.
2 min readdocsUnderstanding System Design Interviews
Fundamentals and interview mindset for system design.
3 min readdocsThe Basic Toolbox
Building blocks, CAP theorem, and patterns for system design interviews.
3 min read