Content-addressable storage (CAS)
https://lab.abilian.com/Tech/Databases%20%26%20Persistence/Content%20Addressable%20Storage%20(CAS)/
CASとはpathやファイル名ではなく内容物によってデータが識別されたり、取得されるストレージパラダイムである。コアな思想は暗号論的ハッシュ関数を利用して各データ用のユニークな識別子を使う。このハッシュ識別子は内容物そのものから取得される、些細な変更でも全く別の識別子が生成される。
Content-addressable file storage, often referred to as content-addressable storage (CAS), is a storage paradigm where data is identified and retrieved based on its content rather than its location or file name. The core principle relies on using a cryptographic hash function to generate a unique identifier, or hash, for each piece of data. This hash is derived directly from the content itself, ensuring that even minor modifications result in a completely different identifier.
Key Characteristics of CAS
Content-Addressability:
データがSHA256などを利用してコンテンツをハッシュ化した識別子とともにデータが保持される
Data is stored with an identifier generated by hashing its content, typically using cryptographic functions like SHA-256.
識別子は決定論的
The identifier (hash) is deterministic, meaning the same content will always produce the same hash, enabling deduplication.
Immutability
データが保存されると、識別子は変更されない。これがデータ完全性を保証する。
Once data is stored, its identifier cannot change unless the content itself changes. This ensures data integrity, as modifications result in a new hash and therefore a new identifier.
Efficient Deduplication
内容物が一緒なら同一のハッシュを生成する。CASは同一のコピーを作成しない。
Since identical content produces the same hash, CAS systems automatically avoid storing duplicate copies of the same data, conserving storage space.
Data Integrity
ハッシュがチェックサムとして振る舞い、データ完全性の検証を可能にしている
The hash serves as a checksum, allowing verification of data integrity. If the data retrieved doesn’t match its hash, corruption is detected.
Scalability and Distribution
スケーラビリティや分散に強い。ハッシュ識別子は自己識別的で、そして複数のノード間で効率的なデータ取得を可能に。
Content-addressable storage systems work well in distributed environments. The hash identifiers are self-descriptive and enable efficient data retrieval across multiple nodes.
Decentralization
CAS is often used in decentralized systems, where addressing by content allows for reliable data retrieval without relying on a centralized directory or path.