Files
AIclinicalresearch/docs/08-项目管理
HaHafeng 4c6eaaecbf feat(dc): Implement Postgres-Only async architecture and performance optimization
Summary:
- Implement async file upload processing (Platform-Only pattern)
- Add parseExcelWorker with pg-boss queue
- Implement React Query polling mechanism
- Add clean data caching (avoid duplicate parsing)
- Fix pivot single-value column tuple issue
- Optimize performance by 99 percent

Technical Details:

1. Async Architecture (Postgres-Only):
   - SessionService.createSession: Fast upload + push to queue (3s)
   - parseExcelWorker: Background parsing + save clean data (53s)
   - SessionController.getSessionStatus: Status query API for polling
   - React Query Hook: useSessionStatus (auto-serial polling)
   - Frontend progress bar with real-time feedback

2. Performance Optimization:
   - Clean data caching: Worker saves processed data to OSS
   - getPreviewData: Read from clean data cache (0.5s vs 43s, -99 percent)
   - getFullData: Read from clean data cache (0.5s vs 43s, -99 percent)
   - Intelligent cleaning: Boundary detection + ghost column/row removal
   - Safety valve: Max 3000 columns, 5M cells

3. Bug Fixes:
   - Fix pivot column name tuple issue for single value column
   - Fix queue name format (colon to underscore: asl:screening -> asl_screening)
   - Fix polling storm (15+ concurrent requests -> 1 serial request)
   - Fix QUEUE_TYPE environment variable (memory -> pgboss)
   - Fix logger import in PgBossQueue
   - Fix formatSession to return cleanDataKey
   - Fix saveProcessedData to update clean data synchronously

4. Database Changes:
   - ALTER TABLE dc_tool_c_sessions ADD COLUMN clean_data_key VARCHAR(1000)
   - ALTER TABLE dc_tool_c_sessions ALTER COLUMN total_rows DROP NOT NULL
   - ALTER TABLE dc_tool_c_sessions ALTER COLUMN total_cols DROP NOT NULL
   - ALTER TABLE dc_tool_c_sessions ALTER COLUMN columns DROP NOT NULL

5. Documentation:
   - Create Postgres-Only async task processing guide (588 lines)
   - Update Tool C status document (Day 10 summary)
   - Update DC module status document
   - Update system overview document
   - Update cloud-native development guide

Performance Improvements:
- Upload + preview: 96s -> 53.5s (-44 percent)
- Filter operation: 44s -> 2.5s (-94 percent)
- Pivot operation: 45s -> 2.5s (-94 percent)
- Concurrent requests: 15+ -> 1 (-93 percent)
- Complete workflow (upload + 7 ops): 404s -> 70.5s (-83 percent)

Files Changed:
- Backend: 15 files (Worker, Service, Controller, Schema, Config)
- Frontend: 4 files (Hook, Component, API)
- Docs: 4 files (Guide, Status, Overview, Spec)
- Database: 4 column modifications
- Total: ~1388 lines of new/modified code

Status: Fully tested and verified, production ready
2025-12-22 21:30:31 +08:00
..

项目管理

用途: 项目进度跟踪、计划管理、决策记录
维护者: 项目管理组
最后更新: 2025-11-07


📋 目录结构

08-项目管理/
├── 01-整体开发计划/        # 长期规划(季度/年度)
│   └── README.md
├── 02-里程碑规划/           # 中期规划(周/月)
│   ├── README.md
│   ├── 04-里程碑4-架构改造.md
│   └── 05-里程碑5-ASL模块开发.md
├── 03-每周计划/             # 短期跟踪(日/周)
│   ├── README.md
│   └── 周次-进度报告模板.md
├── 04-决策记录/             # 重要决策归档ADR
│   ├── README.md
│   ├── ADR模板.md
│   └── ADR-001-Schema隔离暂缓执行.md
└── 下一阶段行动计划-ASL启动.md  # 当前阶段行动计划 ⭐

🎯 当前阶段

下一阶段行动计划2025-11-07 至 2025-12-06

核心目标: Schema隔离 + 前端统一架构 + ASL核心功能

四周规划:

  • Week 1 Schema隔离3详细+7空
  • Week 2 前端统一架构 + 后端分层
  • Week 3-4 ASL核心功能4个LLM筛选
  • Week 5+ LLM网关统一 + 其他模块

当前版本: 下一阶段行动计划-V2.2-前端架构优先版.md

版本历史:

  • V2.2版(前端架构优先) - 2025-11-09 当前版本

    • 核心调整前端架构提前到Week 2避免返工
    • LLM网关推迟到Week 5聚焦核心
    • 4个LLM已配置DeepSeek/GPT-5/Claude-4.5/Qwen
  • V2.1版(务实版) - 2025-11-09

    • 核心调整3详细+7空Schema策略
    • Just-in-time设计避免过度设计
  • V2.0版(模块化架构优先) - 2025-11-07

    • 核心调整Schema隔离 + 独立部署架构
  • V1.0版ASL启动 - 2025-11-06

    • 初始版本直接启动ASL开发

🚀 快速导航

我想...

📋 了解项目整体规划
→ 查看 整体开发计划

🎯 了解当前阶段要做什么
→ 查看 下一阶段行动计划-V2.2(前端架构优先版)

📊 查看本周要做什么
→ 查看 每周计划

🔍 了解某个决策为什么这样做
→ 查看 决策记录


维护者: 项目管理组
创建日期: 2025-11-06
最后更新: 2025-11-07