Tile Document (CIP-8)¶
Tile Document (CIP-8) is streamcode that stores a mutable JSON document with schema validation, providing similar functionality as a NoSQL document.
About Tile Documents¶
- Mutable JSON Storage – TileDocuments are used for storing JSON data. Every TileDocument stream is structured as a single log of commits, where each commit only contains the diff from the previous version.
- JSON Schema – Optionally, TileDocuments may specify a JSON schema in metadata and all commits must adhere to the schema.
- Blockchain-based timestamps – TileDocuments rely on anchor commits for providing immutable timestamps for the genesis commit and subsequent signed commits in the stream.
- Conflict resolution – In the case of conflicting versions, the branch with the earliest recorded anchor commit will be respected as the canonical branch.
- Authentication – TileDocuments rely on DIDs for authentication. Only the DID assigned as the controller of the stream are allowed to perform writes.
- Performance – As more updates are made to a single tile, the underlying DAG grows linearly, and so does sync times when fetching the stream over the network. However, when loading a tile from a node that already has it present, responses are very quick.
- Only allows single controller
- No indexing, but metadata will be used, follow conventions
- Growing log, not adapted to frequent updates
Getting started with Tile Documents¶
This guide describes how to create, update, and query TileDocuments using the Ceramic JS HTTP Client and the Core Client.
Read the Tile Document (CIP-8) standard for more information about the standard.