CrankDB is an ultra fast and very lightweight Key Value based Document Store.

CrankDB

CrankDB is an ultra fast and very lightweight Key Value based Document Store.

Latest version - v0.1.0-beta.1

Requirements

  • Golang 1.16

Steps to deploy

(Option 1) Download binary executable

  • Download executable (v0.1.0-beta.1) -
  • Extract tar and start server -
    cd Downloads
    tar -xvf 
    ./crankdb
    
  • (MacOS) You might need to allow macos to run the file via Settings and Privacy.

(Option 2) Using docker image (Recommended)

docker run -p 9876:9876 shreybatra/crankdb

(Option 3) Using go get command

  • Download application - go install github.com/shreybatra/crankdb@latest
  • Run server with command - crankdb

Server configuration

You can provide environment variables HOSTS and PORT to customize your server network binding.

Defaults -

  • HOSTS=localhost (0.0.0.0 for the docker image)
  • PORT=9876

Querying and connecting to CrankDB

As of now, we can query and use the database via the crank-cli or SDKs in the following languages -

Language SDK/Tool Latest Version
CLI (command line tool) Crank CLI v0.1.0-beta.1
Golang Gocrank v0.1.0-beta.1
Python Cranky 0.1.0b1

Steps to build

  • Clone the repo and change directory to project root folder.
  • Tidy dependencies using - go mod tidy
  • Build the application - go build .
  • Run the server - ./crankdb
Owner
Shrey Batra
Big Data developer focusing on Architecture, database modelling and designing.
Shrey Batra
Similar Resources

yakv is a simple, in-memory, concurrency-safe key-value store for hobbyists.

yakv is a simple, in-memory, concurrency-safe key-value store for hobbyists.

yakv (yak-v. (originally intended to be "yet-another-key-value store")) is a simple, in-memory, concurrency-safe key-value store for hobbyists. yakv provides persistence by appending transactions to a transaction log and restoring data from the transaction log on startup.

Feb 24, 2022

Multithreaded key value pair store using thread safe locking mechanism allowing concurrent reads

Multithreaded key value pair store using thread safe locking mechanism allowing concurrent reads

Project Amnesia A Multi-threaded key-value pair store using thread safe locking mechanism allowing concurrent reads. Curious to Try it out?? Check out

Oct 29, 2022

ShockV is a simple key-value store with RESTful API

ShockV is a simple key-value store with RESTful API

ShockV is a simple key-value store based on badgerDB with RESTful API. It's best suited for experimental project which you need a lightweight data store.

Sep 26, 2021

A rest-api that works with golang as an in-memory key value store

In Store A rest-api that works with golang as an in-memory key value store Usage Fist of all, clone the repo with the command below. You must have gol

Oct 24, 2021

Distributed key-value store

Distributed key-value store

Keva Distributed key-value store General Demo Start the server docker-compose up --build Insert data curl -XPOST http://localhost:5555/storage/test1

Nov 15, 2021

Simple in memory key-value store.

Simple in memory key-value store. Development This project is written in Go. Make sure you have Go installed (download). Version 1.17 or higher is req

Nov 6, 2021

A simple in-memory key-value store application

A simple in-memory key-value store application

vtec vtec, is a simple in-memory key-value store application. vtec provides persistence by appending transactions to a json file and restoring data fr

Jun 22, 2022

Biscuit is a multi-region HA key-value store for your AWS infrastructure secrets.

Biscuit Biscuit is a simple key-value store for your infrastructure secrets. Is Biscuit right for me? Biscuit is most useful to teams already using AW

Nov 10, 2022

An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications.

go-cache go-cache is an in-memory key:value store/cache similar to memcached that is suitable for applications running on a single machine. Its major

Jan 3, 2023
Comments
  • [Do Not Merge] Some benchmarks and insights

    [Do Not Merge] Some benchmarks and insights

    Hey - It was fun playing around with this code. This PR is not meant to be merged, but only for the purpose of some demonstration. Sorry for a lot of refactoring, even changing the package name. But it was necessary to resolve some dependency chains. The problem is that gocrank and crank db have same packages in them (cql, server). So one can't be imported to other because of conflict. You should avoid code-duplication.

    I have run a few benchmarks, which have the results as follows:

    cpu: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    BenchmarkWriteWithClient
    BenchmarkWriteWithClient-8   	   50504	     22872 ns/op
    BenchmarkWriteNormal
    BenchmarkWriteNormal-8       	10590692	       114.0 ns/op
    BenchmarkWriteSM
    BenchmarkWriteSM-8           	 4795395	       248.2 ns/op
    BenchmarkRead
    BenchmarkRead-8              	   51481	     23174 ns/op
    BenchmarkReadNormal
    BenchmarkReadNormal-8        	14897192	        80.30 ns/op
    BenchmarkReadSM
    BenchmarkReadSM-8            	170786281	         6.989 ns/op
    BenchmarkParWriteRead
    BenchmarkParWriteRead-8      	   49950	     23862 ns/op
    

    If you observe, with sync maps, the read speed is super fast (almost 9 times faster). And if this is meant to be a read-heavy DB, then sync map is a better option (which has write speed x0.5 while read x9).

    Second, I feel, rather than having an interface in the value, you should consider having just a byte slice. Interface conversion is heavy operation and mostly KVs are used for string, byte slices etc.

Dokvs - This project aims to provide document-store capabilities, built over key-value persisted backends

This project aims to provide document-store capabilities, built over key-value persisted backends. It is built in Go using the new generics features to expose a friendly, type-safe API.

Apr 25, 2022
NutsDB a simple, fast, embeddable and persistent key/value store written in pure Go.
NutsDB a simple, fast, embeddable and persistent key/value store written in pure Go.

A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set.

Jan 9, 2023
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.

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. With

Jan 4, 2023
rosedb is a fast, stable and embedded key-value (k-v) storage engine based on bitcask.
rosedb is a fast, stable and embedded key-value (k-v) storage engine based on bitcask.

rosedb is a fast, stable and embedded key-value (k-v) storage engine based on bitcask. Its on-disk files are organized as WAL(Write Ahead Log) in LSM trees, optimizing for write throughput.

Dec 28, 2022
KV - a toy in-memory key value store built primarily in an effort to write more go and check out grpc

KV KV is a toy in-memory key value store built primarily in an effort to write more go and check out grpc. This is still a work in progress. // downlo

Dec 30, 2021
A disk-backed key-value store.

What is diskv? Diskv (disk-vee) is a simple, persistent key-value store written in the Go language. It starts with an incredibly simple API for storin

Jan 1, 2023
Distributed reliable key-value store for the most critical data of a distributed system

etcd Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in order

Dec 28, 2022
a persistent real-time key-value store, with the same redis protocol with powerful features
a persistent real-time key-value store, with the same redis protocol with powerful features

a fast NoSQL DB, that uses the same RESP protocol and capable to store terabytes of data, also it integrates with your mobile/web apps to add real-time features, soon you can use it as a document store cause it should become a multi-model db. Redix is used in production, you can use it in your apps with no worries.

Dec 25, 2022
GhostDB is a distributed, in-memory, general purpose key-value data store that delivers microsecond performance at any scale.
GhostDB is a distributed, in-memory, general purpose key-value data store that delivers microsecond performance at any scale.

GhostDB is designed to speed up dynamic database or API driven websites by storing data in RAM in order to reduce the number of times an external data source such as a database or API must be read. GhostDB provides a very large hash table that is distributed across multiple machines and stores large numbers of key-value pairs within the hash table.

Jan 6, 2023
Pogreb is an embedded key-value store for read-heavy workloads written in Go.
Pogreb is an embedded key-value store for read-heavy workloads written in Go.

Embedded key-value store for read-heavy workloads written in Go

Dec 29, 2022