Architecture Research Process
This skill guides users through the complete architecture research process, from requirement analysis to final architecture documentation.
When to Use
Invoke this skill when:
- User needs to conduct architecture research for a project
- User asks to create architecture design documents
- User needs to determine system architecture direction
- User wants to compare architecture patterns (monolithic vs microservices)
- User needs to design layered architecture
- User asks about communication schemes or data flow design
Process Overview
The architecture research process consists of 9 steps:
1. Analyze Requirements Constraints
2. Determine Architecture Pattern
3. Design Layered Architecture
4. Design Communication Scheme
5. Design Data Flow
6. Design Security Architecture
7. Design Deployment Architecture
8. Write Research Report
9. Review and ConfirmDetailed Steps
Step 1: Analyze Requirements Constraints
Input: Requirements research report Output: Architecture constraints checklist
Check items:
- Business scale (users, data volume)
- Performance requirements (concurrency, response time)
- Security requirements (compliance, data protection)
- Availability requirements (SLA, RTO/RPO)
- Integration requirements with existing systems
Step 2: Determine Architecture Pattern
Candidate Patterns:
Monolithic Architecture
- Suitable for: Small-medium systems, small teams, rapid delivery
- Pros: Simple, easy to maintain, low cost
- Cons: Limited scalability, technical debt accumulation
Microservices Architecture
- Suitable for: Large systems, multiple teams, high concurrency
- Pros: Independent deployment, technology heterogeneity, elastic scaling
- Cons: High complexity, high operational cost
Modular Monolith
- Suitable for: Medium systems, potential future evolution
- Pros: Balance of simplicity and flexibility, evolvable
- Cons: Requires good modular design
Evaluation Dimensions:
| Dimension | Weight | Description |
|---|---|---|
| Business Scale Match | 25% | Whether architecture fits current business scale |
| Team Capability Match | 20% | Whether team has corresponding technical capabilities |
| Operational Cost | 20% | Operational complexity and cost |
| Scalability | 15% | Ability to scale for future business growth |
| Development Efficiency | 10% | Development efficiency and time-to-market |
| Evolution Flexibility | 10% | Possibility for future architecture evolution |
Step 3: Design Layered Architecture
Standard Layers:
Presentation Layer ← User Interface (Vue/React)
Access Layer ← Gateway/Load Balancer (Nginx/Gateway)
Application Layer ← Business Logic (Spring Boot)
Data Layer ← Data Storage (MySQL/Redis)Design Principles:
- Upper layers depend on lower layers, not vice versa
- Communication between layers through interfaces
- Each layer can evolve and be replaced independently
Step 4: Design Communication Scheme
Protocol Selection:
| Scenario | Recommended Protocol | Description |
|---|---|---|
| Frontend-Backend | RESTful API + HTTPS | Standard, simple, easy to debug |
| Service Sync | RESTful/gRPC | Choose based on performance requirements |
| Service Async | Message Queue | Decoupling, peak shaving |
Interface Standards:
- URL pattern:
/api/{version}/{module}/{resource}/{action} - HTTP methods: GET/POST/PUT/DELETE
- Response format: Unified JSON format
- Authentication: JWT Token
Step 5: Design Data Flow
Data Layers:
Data Access Layer ← API/Import/Sync
Business Logic Layer ← Data Processing/Validation
Data Storage Layer ← MySQL/Redis/External SystemsCaching Strategy:
- Cache-Aside Pattern: Read cache first, read database on miss
- Applicable scenarios: Read-heavy, write-light
- Consistency handling: Write database first, then delete cache
Step 6: Design Security Architecture
Security Layers:
Application Security ← XSS/CSRF/SQL Injection Protection
Authentication ← JWT/RBAC/Permission Control
Transport Security ← HTTPS/TLS
Network Security ← Firewall/VPN/Isolation
Data Security ← Encryption/Masking/BackupAuthentication Options:
- Basic Auth: Username/Password + BCrypt encryption
- Token Auth: JWT (Access Token + Refresh Token)
- SSO: OAuth 2.0 + OIDC
Authorization:
- RBAC Model: User-Role-Permission
- Permission Types: Menu, Button, Data, API permissions
Step 7: Design Deployment Architecture
Deployment Modes:
- Traditional Deployment: Direct server deployment
- Containerized Deployment: Docker + Docker Compose
- Container Orchestration: Kubernetes (large scale)
Environment Planning:
| Environment | Purpose | Configuration |
|---|---|---|
| Development | Development & Integration | Single machine |
| Testing | Functional Testing | Dual machine |
| Staging | Pre-production Validation | Same as production |
| Production | Production | Cluster |
High Availability:
- Application Layer: Multi-instance + Load Balancer
- Database: Master-Slave architecture
- Cache: Redis Cluster
Step 8: Write Research Report
Report Structure:
- Report Overview
- Architecture Decision Summary
- Overall Architecture Design
- Architecture Design Principles
- Key Technical Decisions
- Architecture Risks and Mitigation
- Next Actions
- Related Documents
Step 9: Review and Confirm
Review Checklist:
- [ ] Architecture pattern suitable for business requirements
- [ ] Layered architecture is reasonable
- [ ] Communication scheme follows standards
- [ ] Data flow is clear
- [ ] Security scheme is comprehensive
- [ ] Deployment scheme is feasible
- [ ] Risks identified with mitigation measures
Document Templates
Architecture Pattern Selection Document
Create document following this structure:
markdown
# XXX Architecture Selection
**Document ID:** SYS-TR-AR-XXX
**Version:** 1.0
**Date:** YYYY-MM-DD
**Author:** System Architect
**Review:** Pending
---
## 1. Background
## 2. Candidate Solutions
### Solution 1: XXX
**Description:**
**Pros:**
**Cons:**
**Applicable Scenarios:**
## 3. Evaluation Comparison
| Dimension | Solution 1 | Solution 2 | Solution 3 | Weight |
|-----------|------------|------------|------------|--------|
| Dimension 1 | High/Med/Low | High/Med/Low | High/Med/Low | XX% |
## 4. Selection Conclusion
## 5. Detailed Design
## 6. Risks and Mitigation
## 7. Next ActionsBest Practices
Design Principles
- Simplicity First: Choose the simplest solution that meets requirements
- Evolutionary Design: Reserve space for architecture evolution, avoid over-design
- Separation of Concerns: Clear responsibilities at each layer, avoid coupling
- Observability: Consider monitoring, logging, tracing during design
Common Pitfalls
- Over-engineering: Complex design for non-existent requirements
- Technology-driven: Using new technology regardless of business needs
- Ignoring Operations: Only considering development, not deployment and operations
- Neglecting Security: Security design lagging, high remediation cost later
Output Checklist
- [ ] Architecture pattern selection report
- [ ] Frontend-backend separation scheme
- [ ] Data flow architecture document
- [ ] Security architecture principles
- [ ] Deployment architecture scheme
- [ ] Architecture research summary report
