freeCodeCamp / freeCodeCamp/scripts
[feat]: ultimate normalization script
- 主要语言
- TypeScript
- 星标
- 17
- 派生
- 16
- PR 合并指标
- 30 天内没有已合并 PR
描述
Going forward, there are likely many times we may want to normalize records. As such, we need a smart script:
**Musts**
- [ ] not bring down production to run script
- it should be a script we can tune to **not** hammer the db, and quietly run in the background
- [ ] easy to define/add transformations
- [ ] fault tolerant
- [ ] keep track of versioning
- must not repeat work - the script should be stopped/started without hesitation, and start off where it left off
- [ ] fearlessly concurrent
- the api will write a `lastUpdated` field to the user record which should allow all ops to be done without losing data
**Niceties**
- [ ] dynamically asks database how loaded it is, and accordingly adjusts ops/rps
**Notes**
Currently, the idea is to add a `schemaVersion` field to the `user` record.
I would prefer to write this in Rust:
1) Ease of distribution
2) Strict typing
That said, this might go against _"easy to define/add transformations"_.
贡献指南
调研方向
未指定任何文件、测试或入口点。首先明确数据库和 API 接口、提议的 user.schemaVersion 行为,以及转换的定义和版本管理方式。完成标准应包括可恢复、容错且并发安全的执行,并且可以进行限流而不会重复工作或影响生产环境。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- backend, databases, tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 20/100