designing-systems
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDesigning Systems
系统设计
Workflows
工作流程
- Requirements: Gather functional and non-functional requirements
- Diagrams: Create C4 diagrams (Context, Container)
- Data: Define data model and storage strategy
- API: Define interfaces and contracts
- Risks: Identify single points of failure
- Document: Save to
./artifacts/adr_[topic].md
- 需求收集:收集功能性与非功能性需求
- 图表绘制:创建C4图(上下文图、容器图)
- 数据设计:定义数据模型与存储策略
- API设计:定义接口与契约
- 风险识别:找出单点故障
- 文档留存:保存至
./artifacts/adr_[topic].md
Feedback Loops
反馈循环
- Draft design document
- Review with stakeholders
- Create POC for risky components
- Refine design based on POC
- Finalize ADR
- 起草设计文档
- 与利益相关方评审
- 为高风险组件创建POC(概念验证)
- 根据POC优化设计
- 最终确定ADR(架构决策记录)
Blueprint Template
蓝图模板
Every system design should include:
- High-Level Diagram: Mermaid graph showing components
- Component Boundaries: Clear responsibility definitions
- API Definitions: OpenAPI or GraphQL specs
- Data Models: Schema definitions
- Trade-off Analysis: Rationale for key decisions
每个系统设计都应包含:
- 高层架构图:使用Mermaid图展示组件
- 组件边界:清晰的职责定义
- API定义:OpenAPI或GraphQL规范
- 数据模型:Schema定义
- 权衡分析:关键决策的依据说明
C4 Model Levels
C4模型层级
Level 1: Context
层级1:上下文
Who uses the system? What external systems does it interact with?
谁在使用系统?系统与哪些外部系统交互?
Level 2: Container
层级2:容器
What are the major deployable units? (APIs, databases, queues)
主要的可部署单元有哪些?(API、数据库、队列)
Level 3: Component
层级3:组件
What are the major building blocks within each container?
每个容器内的主要构建块是什么?
Level 4: Code
层级4:代码
Class/function level (usually not needed in architecture docs)
类/函数层级(架构文档中通常不需要)
Trade-off Analysis
权衡分析
For major decisions, explicitly document:
| Decision | Option A | Option B |
|---|---|---|
| Pros | ... | ... |
| Cons | ... | ... |
| When to Choose | ... | ... |
对于重大决策,需明确记录:
| 决策 | 选项A | 选项B |
|---|---|---|
| 优势 | ... | ... |
| 劣势 | ... | ... |
| 适用场景 | ... | ... |
Non-Functional Requirements
非功能性需求
Always consider:
- Scalability: Expected load, growth rate
- Availability: SLA targets, failure modes
- Latency: P50, P95, P99 requirements
- Security: Authentication, authorization, data protection
- Cost: Infrastructure, operational overhead
需始终考虑:
- 可扩展性:预期负载、增长率
- 可用性:SLA目标、故障模式
- 延迟:P50、P95、P99指标要求
- 安全性:认证、授权、数据保护
- 成本:基础设施、运维开销
Resources
资源
- System Design Template
- ADR Template
- 系统设计模板
- ADR模板