Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I used JSON files instead of a database for 1,699 records. Here’s what actually broke

说明与用途

使用平面 JSON 文件代替数据库导致 slug 冲突、隐藏错误和并发写入时文件损坏的风险。

问题

Relying on flat JSON files for a read‑heavy, append‑mostly dataset caused hidden data integrity and scalability issues.

结果

The project remained functional but suffered from 95 unreachable papers, 52 redirect loops, a missing homepage section, and potential file corruption under concurrent writes.

工作流

  • Read entire JSON file on each request
  • Filter array for queries
  • Write entire file on updates
  • Generate slugs from paper metadata
  • Build slug index to detect collisions
  • Enqueue writes to serialize concurrent writes
  • Rename temp file to replace original
  • Restore from backup on parse failure

证据

95 papers that existed but had no URL

来源

Two requests writing the file at once will corrupt it

来源

  • 记录日期: 2026-09-06T17:21:53.359Z