Immutable Shared Files Semantics
Immutable shared files semantics 把 shared files 設計成 read-only:一旦 file 被宣告 shared,contents 不能改,name 也不能被重用來指向不同內容。
兩個性質
- Name may not be reused:同一 name 不應改指不同內容。
- Contents may not be altered:共享後內容固定。
若資料永遠不變,clients 可放心 cache;server 不需處理 concurrent write ordering、partial update、cache invalidation。
更新方式
更新不是修改舊 file,而是建立 new file / new version / new name,再讓 users 切換。這適合 read-mostly / publish-once workload,例如 release image、package artifact、content-addressed / versioned storage。
Limitation
不適合互動式編輯、database、log file、shared working document。它把 consistency problem 轉成 version / namespace management problem,且可能需要 garbage collection 或 retention policy。