All Projects → prologic → Bitraft

prologic / Bitraft

Licence: mit
🎉A Bitcask Distributed Key/Value store using Raft for consensus with a Redis compatible API written in Go.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Bitraft

Crate
CrateDB is a distributed SQL database that makes it simple to store and analyze massive amounts of data in real-time.
Stars: ✭ 3,254 (+835.06%)
Mutual labels:  database, db, distributed
Toydb
Distributed SQL database in Rust, written as a learning project
Stars: ✭ 1,329 (+281.9%)
Mutual labels:  database, raft, distributed
Db
Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
Stars: ✭ 2,832 (+713.79%)
Mutual labels:  database, db
Tiedot
A rudimentary implementation of a basic document (NoSQL) database in Go
Stars: ✭ 2,643 (+659.48%)
Mutual labels:  database, db
nebula
A distributed, fast open-source graph database featuring horizontal scalability and high availability
Stars: ✭ 8,196 (+2255.17%)
Mutual labels:  raft, distributed
Sqldb Logger
A logger for Go SQL database driver without modify existing *sql.DB stdlib usage.
Stars: ✭ 160 (-54.02%)
Mutual labels:  database, db
Herddb
A JVM-embeddable Distributed Database
Stars: ✭ 192 (-44.83%)
Mutual labels:  database, distributed
tool-db
A peer-to-peer decentralized database
Stars: ✭ 15 (-95.69%)
Mutual labels:  distributed, db
Bojack
🐴 The unreliable key-value store
Stars: ✭ 101 (-70.98%)
Mutual labels:  database, distributed
Lazer Database
PHP flat file database to store data with JSON
Stars: ✭ 254 (-27.01%)
Mutual labels:  database, db
Raft-Paxos-Sample
MIT6.824实现分布式一致性算法——Raft&Paxos
Stars: ✭ 37 (-89.37%)
Mutual labels:  raft, distributed
Godown
Distributed, fault-tolerant key-value storage written in go.
Stars: ✭ 352 (+1.15%)
Mutual labels:  raft, distributed
Laravel Db Profiler
Database Profiler for Laravel Web and Console Applications.
Stars: ✭ 141 (-59.48%)
Mutual labels:  database, db
Olric
Distributed cache and in-memory key/value data store. It can be used both as an embedded Go library and as a language-independent service.
Stars: ✭ 2,067 (+493.97%)
Mutual labels:  database, distributed
Vuerd
ERD Editor
Stars: ✭ 208 (-40.23%)
Mutual labels:  database, db
Etcd
Distributed reliable key-value store for the most critical data of a distributed system
Stars: ✭ 38,238 (+10887.93%)
Mutual labels:  database, raft
Jaydebeapi
JayDeBeApi module allows you to connect from Python code to databases using Java JDBC. It provides a Python DB-API v2.0 to that database.
Stars: ✭ 247 (-29.02%)
Mutual labels:  database, db
Vuerd Vscode
ERD Editor vscode extension
Stars: ✭ 95 (-72.7%)
Mutual labels:  database, db
Node Mysql Utilities
Query builder for node-mysql with introspection, etc.
Stars: ✭ 98 (-71.84%)
Mutual labels:  database, db
slock
High-performance distributed sync service and atomic DB
Stars: ✭ 50 (-85.63%)
Mutual labels:  raft, distributed

bitraft

Go Report Card GitHub license Github all releases

A Bitcask Distributed Key/Value store using Raft for concensus with a Redis compatible API written in Go.

Based off of kvnode. (See LICENSE.old)

  • Redis compatible API
  • Bitcask disk-based storage
  • Raft support with Finn commands
  • Compatible with existing Redis clients

Usage

$ go get github.com/prologic/bitraft
$ bitraft

Docker

You can also use the Bitraft Docker Image:

$ docker pull prologic/bitraft
$ docker run -d -p 4920:4920 prologic/bitraft

Example session

Commands:

SET key value
GET key
DEL key [key ...]
KEYS pattern
FLUSHDB
SHUTDOWN

Backup and Restore

To backup data:

RAFTSNAPSHOT

This will creates a new snapshot in the data/snapshots directory. Each snapshot contains two files, meta.json and state.bin. The state file is the database in a compressed format. The meta file is details about the state including the term, index, crc, and size.

Ideally you call RAFTSNAPSHOT and then store the state.bin on some other server like S3.

To restore:

  • Create a new raft cluster
  • Download the state.bin snapshot
  • Pipe the commands using the bitraft --parse-snapshot and redis-cli --pipe commands

Example:

bitraft --parse-snapshot state.bin | redis-cli -h 10.0.1.5 -p 4920 --pipe

This will execute all of the state.bin commands on the leader at 10.0.1.5:4920

For information on the redis-cli --pipe command see Redis Mass Insert.

License

bitraft source code is available under the MIT License.

Previously based off of kvnode. (See LICENSE.old)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].