Published on
12/30/2021

Introducing Compendia Layer 2 Database Testnet

Compendia's Layer 2 Database Network brings free, decentralized, and real-time databases to the metaverse.

Data on the internet such as posts, profiles, and game items are often hosted on centralized databases. Even today's metaverse apps often needs to tap into a centralized data source to accommodate their users.

Some dapps host data on IPFS and store the hash in a smart contract, but then users need to make transactions (and pay fees) to make changes.

Neither users or apps want to pay to update their own data.

Compendia's L2 lets you write the metaverse in real-time without transaction fees.

Ready to join? Get BIND today.

How it works

Schemas and databases are registered once on the Compendia blockchain. The data is then distributed by apps and users through Compendia's Layer 2 Database Network.

Writing data is free and real-time, bringing a smooth experience to the metaverse.

Here's how:

  1. A database schema is registered on the Compendia blockchain.
  2. Curators can add databases to the registered schema. The database follows the rules set by the schema (like which attributes exist and how they're validated).
  3. Apps can sync data from all the databases registered in a schema. By syncing the data, the app will become a node for the databases itself, increasing the databases' availability and decentralization.
  4. Database updates are synchronized on the network in real-time. This makes real-time decentralized apps possible!

Use Cases

  • A metaverse app where users get rewards for writing about venues in VR universes.

  • A decentralized directory of dapps, maintained by curators who accept community entries and reward them with BIND. We're building this with dapp.page!

dapp.page

  • A coin rankings site that aggregates data from multiple sources (such as CMC and Coingecko).

  • A decentralized service for trading cross-chain curated NFTs.

  • A public domain music streaming service with high-quality streaming through IPFS.

  • A decentralized sports betting game that uses the Layer 2 DB as an oracle to confirm the winner of a sports match.

Any app that wants to access open, decentralized data can tap into Compendia's Layer 2 DB.


Start Building

We're excited to announce that our Layer 2 Database Network is launching for Compendia Testnet on January 5th!

The instructions below are how you can create your own databases and dapps.

All tools will launch on Testnet on January 5th.

Creating a dapp that uses a database

If you want to build a dapp that reads data from Compendia, you only need to run an instance of Savant and configure it to read from the databases you want.

  1. Use Compendia's Layer 2 Database Explorer (coming January 5th) to find a schema for your dapp (often named after its category, such as "dapps_v1"). You can see what rules and attributes a schema has, and explore the databases deployed for it.

Database Explorer

  1. Configure Savant to use the schema you want.

  2. Run Savant and it'll automatically start syncing the databases of the network's top 47 validators.

  3. Have your app make HTTP GET requests to your Savant instance to use/display the data how you want to.

Creating a database

  1. Find a schema with the Database Explorer, or create your own by making a JSON Schema (examples) and adding it with the Testnet Wallet Tools tab.

  2. git clone an instance of Concierge (coming Jan 5) on your server and configure it to use your database, then run it.

  3. You can send HTTP requests to your Concierge instance (cominog January 5th) to write to your database, or you can log in to your Concierge instance with Maestro (coming Jan 5) to manually add data from a UI (simply enter your Concierge endpoint URL, API key, and schema name).

  1. Register your Concierge database by copying the address returned by Concierge (/orbitdb/xxx/schema_name) and pasting it in Compendia's "Register Database" form in the wallet's Tools tab. If you don't have testnet BIND to make for the one-time transaction fee, click "Get Coins" under your wallet balance.

Your database is now live on Compendia!

Anyone who syncs with the database's schema will also sync your database (if you're an active validator, or if your database address is added to a Savant instance's whitelist).

When your database is synced by other Savant instances, it will become decentralized and stay online, even if your Concierge instance goes offline.

What's next

With our Layer 2 Database Testnet now live, we're excited to work with you to improve the network and reward database & schema population!

Information on bounties and reward campaigns will follow soon for databases and dapps. In the meantime, don't hesitate to start building your Compendia-powered dapp!

Follow Dean van Dugteren