Appearance
Thuật ngữ File Service
| Thuật ngữ | Định nghĩa |
|---|---|
| File Service | Dịch vụ lưu/tải file dùng chung; metadata trong schema minap_file; bytes temp/local/cloud |
file_id | ID ổn định file_{nanoid}; Application chỉ lưu tham chiếu này |
tmp_id | ID upload tạm tmp_{nanoid} để promote |
storage_name | Basename vật lý {uuidv7}.{ext} — tách khỏi file_id |
storage_key | Relative path chung local+cloud; kết thúc bằng storage_name |
| Display name | Tên người dùng thấy — đổi không đổi object key |
workspace_id | ws_… nullable trên temp/files — foresight quota; không thay authz |
| Variant | WebP multi-size on-demand; disk + variant_cache; video gen từ cover, không từ original video |
| Video cover | Ảnh frame (ffmpeg lúc promote, DEC-014/015); cùng file_id; cover_storage_name; seek random từ config; fail → null nhưng vẫn promote; variant dùng cover thay storage_name video |
| Promote | Temp → file durable storage_tier=local; response đồng bộ trả file_id; video thì tạo cover trong promote; migrate cloud là job async sau |
| storage_connections | Đăng ký đích S3-compatible; secret ciphertext + KEK Infisical |
| Soft reference | Lưu id string (acc_…, ws_…) không FK bắt buộc sang Core |
| DEFERRED | Hoãn có chủ đích (malware scan, FS audit_events) |
| PROPOSED | Đề xuất chưa DECIDED (nhiều cột schema, HTTP paths, error codes) |
| Lifecycle jobs (FS) | Child crons trên worker; đăng ký bởi jobs orchestrator (DEC-017); Redis lock per job (DEC-016); RULE-015 = lỗi một item trong tick không dừng batch |
| RULE-015 | Per-item isolation trong tick temp GC / variant GC / migrate / purge — xem E.03 §5 |
| Jobs orchestrator | Main loop trên minap-file-worker: đọc config → register/re-register child node-cron |
minap-file / minap-file-worker | Swarm: Next web vs worker; cùng image/shared lib (DEC-016) |
| Object store | Server S3-compatible giữ bytes; không phải lớp job migrate của FS |
Thuật ngữ nền tảng rộng hơn: glossary hub platform-docs.