Table of contents
Overview
Introduction
Let's first understand what Ceramic and ComposeDB really are.
What is Ceramic?
Ceramic is a decentralized network for composable data.
Ceramic makes building applications with composable Web3 data as easy as browsing a marketplace of data models, plugging them into your app, and storing, updating, and retrieving data from those models. When different applications reuse the same data models, their data is automatically interoperable. By decentralizing application databases, Ceramic makes data composable and reusable across all applications.
What is ComposeDB?
ComposeDB on Ceramic is a decentralized, composable graph database. It provides a set of Typescript libraries and tools that allow developers to quickly build applications on Ceramic - including the ability to discover
, create
, share
and reuse
composable data models using GraphQL.
Note
ComposeDB is currently in developer preview. It is not suitable for mainnet applications until early 2023, however, the developer preview is ready for you to design, build, and test your application with advanced relations between data, GraphQL, and reusable data models.
Now let's understand the main functions of Ceramic and ComposeDB - to get an overview of their use cases, features & main purpose.
Features of Ceramic
Mutable data storage
Ceramic provides developers with a set of standard, open APIs for
storing
,updating
, andretrieving
data from the network. This helps to break down data silos, enabling all data to be openly accessible. Additionally, all data mutations on Ceramic are cryptographically verifiable and can provide auditability throughout all historical versions of a piece of dataData composability
Data on Ceramic is structured and stored in data models, which can be easily reused by different applications to share data between them. Data models are created by developers in the community, and the ecosystem of data models is constantly expanding. Data models typically represent a single, logical application feature such as a user profile, a social graph, or a blog and developers typically combine multiple data models to create their application.
Developer experience
Building composable applications with Web3 data on Ceramic is simple. Install Ceramic, browse the marketplace of data models, plug these models into your app, and automatically get access to all data stored on the network that conforms to those data models.
Sign in with Web3
Ceramic uses the decentralized identifier (DID) standard for user accounts, which are compatible with all blockchain wallets. When using Ceramic in your application, users can authenticate with the Web3 wallets they already have, and can even control the same Ceramic account from multiple different blockchain wallets (cross-chain) if they'd like. Data models are typically account-centric.
Decentralization
The Ceramic network is decentralized and permissionless, allowing anyone in the world to spin up a node to provide
storage
,compute
, andbandwidth
resources to users and applications built on the network.Scalability
Ceramic's data network infrastructure is highly-scalable and can service use cases where high amounts of data throughput is needed. On Ceramic, every data object maintains its own state and nodes independently process stream transactions, allowing unbounded parallelization. This enables Ceramic to operate at worldwide data scale, which is orders of magnitude greater than the scale needed for decentralized finance.
Features of ComposeDB
Concepts overview
ComposeDB provides a graph structure for interacting with data on the Ceramic network.
The nodes in the graph can be accounts or documents, while the edges in the graph represent relations between nodes.
Nodes
All nodes in the graph use a globally unique identifier, allowing direct access to any known node. ComposeDB supports two types of nodes: Accounts that are able to manipulate data in the graph, and Documents containing mutable data of a given shape.
Accounts
Ceramic uses Decentralized Identifiers (DIDs) for accounts, which get translated to
CeramicAccount
objects by the ComposeDB client. DIDs can represent any entity that is able to write data on Ceramic and therefore in ComposeDB, which can be end-users of an application, groups, applications or any kind of authenticated service. In order to write data in ComposeDB, a DID must be attached to the ComposeDB client instanceDocuments
Documents in ComposeDB are Ceramic streams storing structured data defined by a model. Ceramic nodes can be configured to index specific models, storing all the documents using a model in a local database in order to provide fast access and query capabilities. Using GraphQL, the ComposeDB client allows to query documents indexed by a Ceramic node, as well as creating new documents and updating existing ones when mutations are enabled.
Models
Models are Ceramic streams storing metadata about documents, notably their data structure, validation rules and relations, as well as discovery information. ComposeDB tools abstract the creation of models using GraphQL's Schema Definition Language.
Validation
The validation is performed directly by all Ceramic nodes, allowing application to have guaranties about the documents they interact with even if they don't implement validation themselves. Currently Ceramic uses draft 2020-12 of the JSON Schema specification to define the data structure and validation rules of documents.
Relations
ComposeDB uses models to define direct relations between accounts and documents with different constraints. For more details - Relations
Composites
Composites are the primary data structures used by ComposeDB, essentially defining a mutable set of models with additional metadata. The ComposeDB developer tools and client library use complementary representations of composites to support various development flows such as managing data models, deploying them to Ceramic nodes and generating the runtime GraphQL schema applications can interact with.
Conclusion
GREAT🎉!!! We have completed the understanding of the features and main functions of Ceramic & ComposeDB and the overall difference between them.
Check out the Resources section if you want to deep dive into Ceramic and ComposDB.
Join Ceramic Discord to contact or discuss with Ceramic developer