Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.
/ kvdb Public archive
forked from streamingfast/kvdb

Key/Value store abstraction, for the dfuse platform

License

Notifications You must be signed in to change notification settings

EOS-Nation/kvdb

 
 

Repository files navigation

🚧 Deprecation Notice

dfuse services will be discontinued on September 25, 2024, as Pinax transitions to more advanced and efficient solutions for Antelope blockchain data sourcing. We encourage all users to migrate to Pinax's new services, including Substreams, Firehose, and comprehensive blockchain data services supporting dozens of chains like EOS, WAX, and Telos. Dfuse users can start building with a FREE Pinax Pro Plan.

Learn more and get started at https://pinax.network.

dfuse Key/Value Store

reference License

This library contains different implementations for storing blocks and transactions in a key/value database. It is used by dfuse.

Usage

db, err := store.New(dsn)
if err != nil {
    return fmt.Errorf("failed setting up db: %w", err)
}

Backends

The following DSNs are provided by this package:

  • Google Cloud BigTable: bigkv://project.instance/namespace-prefix?createTables=true This works very well, is fully managed, and scales horizontally with minimal effort.

  • TiKV: tikv://pd0,pd1,pd2:2379?prefix=namespace_prefix This is useful for bare metal deployments, is self managed, and scales very well (with the hardware you throw at it)

  • Badger: badger:///home/user/dfuse-data/component/my-badger.db This is useful for local development. It is a library (similar to RocksDB and LevelDB), and thus creates a database that cannot be shared.

  • NetKV: netkv://localhost:6789?insecure=true This connects to a netkv server (which you can install with go install -v ./store/netkv/server/netkvserver from this repo), which in turn can serve a badger:// database. It allows for simple badger-based backend (single database, no replication, no scaling), but allow decoupling of dfuse processes

Beware that the TiKV backend does not support 0-length values. If your application uses 0-length values, use the WithEmptyValue option.

Contributing

Issues and PR in this repo related strictly to the kvdb library.

Report any protocol-specific issues in their respective repositories

Please first refer to the general dfuse contribution guide, if you wish to contribute to this code base.

License

Apache 2.0

About

Key/Value store abstraction, for the dfuse platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.6%
  • Shell 3.4%