All Projects → robaho → Keydb

robaho / Keydb

Licence: gpl-3.0
high performance key value database written in Go

Programming Languages

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

Projects that are alternatives of or similar to Keydb

Bitnami Docker Redis
Bitnami Redis Docker Image
Stars: ✭ 317 (+352.86%)
Mutual labels:  database, key-value
Pickledb
pickleDB is an open source key-value store using Python's json module.
Stars: ✭ 549 (+684.29%)
Mutual labels:  database, key-value
Flashdb
An ultra-lightweight database that supports key-value and time series data | 一款支持 KV 数据和时序数据的超轻量级数据库
Stars: ✭ 378 (+440%)
Mutual labels:  database, key-value
Immortaldb
🔩 A relentless key-value store for the browser.
Stars: ✭ 2,962 (+4131.43%)
Mutual labels:  database, key-value
Libmdbx
One of the fastest embeddable key-value ACID database without WAL. libmdbx surpasses the legendary LMDB in terms of reliability, features and performance.
Stars: ✭ 729 (+941.43%)
Mutual labels:  database, key-value
Buntdb
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support
Stars: ✭ 3,583 (+5018.57%)
Mutual labels:  database, key-value
Lmdbjava
Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store
Stars: ✭ 546 (+680%)
Mutual labels:  database, key-value
Endb
Key-value storage for multiple databases. Supports MongoDB, MySQL, Postgres, Redis, and SQLite.
Stars: ✭ 208 (+197.14%)
Mutual labels:  database, key-value
Histore
🏬 200b key-value store backed by navigation state
Stars: ✭ 683 (+875.71%)
Mutual labels:  database, key-value
Bitcask
🔑A high performance Key/Value store written in Go with a predictable read/write performance and high throughput. Uses a Bitcask on-disk layout (LSM+WAL) similar to Riak.
Stars: ✭ 654 (+834.29%)
Mutual labels:  database, key-value
Permazen
Language-Natural Persistence Layer for Java
Stars: ✭ 265 (+278.57%)
Mutual labels:  database, key-value
Keyvast
KeyVast - A key value store
Stars: ✭ 33 (-52.86%)
Mutual labels:  database, key-value
Cubdb
Elixir embedded key/value database
Stars: ✭ 235 (+235.71%)
Mutual labels:  database, key-value
Gokv
Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)
Stars: ✭ 314 (+348.57%)
Mutual labels:  database, key-value
Filebase
A Simple but Powerful Flat File Database Storage.
Stars: ✭ 235 (+235.71%)
Mutual labels:  database, key-value
Redislite
Redis in a python module.
Stars: ✭ 464 (+562.86%)
Mutual labels:  database, key-value
Hive
Lightweight and blazing fast key-value database written in pure Dart.
Stars: ✭ 2,681 (+3730%)
Mutual labels:  database, key-value
Iowow
The skiplist based persistent key/value storage engine
Stars: ✭ 206 (+194.29%)
Mutual labels:  database, key-value
Laravel Options
Global key-value store in the database
Stars: ✭ 626 (+794.29%)
Mutual labels:  database, key-value
Xodus
Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.
Stars: ✭ 864 (+1134.29%)
Mutual labels:  database, key-value

keydb

high performance key value database written in Go

bulk insert and sequential read < 1 micro sec

random access read of disk based record < 4 micro secs

uses LSM trees, see https://en.wikipedia.org/wiki/Log-structured_merge-tree

limitation of max 1024 byte keys, to allow efficient on disk index searching, but has compressed keys which allows for very efficient storage of time series data (market tick data) in the same table

use the dbdump and dbload utilities to save/restore databases to a single file, but just zipping up the directory works as well...

see the related http://github.com/robaho/keydbr which allows remote access to a keydb instance, and allows a keydb database to be shared by multiple processes

TODOs

make some settings configurable

purge removed key/value, it currently stores an empty []byte

How To Use

db, err := keydb.Open("test/mydb", true)
if err != nil {
	t.Fatal("unable to create database", err)
}
tx, err := db.BeginTX("main")
if err != nil {
	t.Fatal("unable to create transaction", err)
}
err = tx.Put([]byte("mykey"), []byte("myvalue"))
if err != nil {
	t.Fatal("unable to put key/Value", err)
}
err = tx.Commit()
if err != nil {
    t.Fatal("unable to commit transaction", err)
}
err = db.Close()
if err != nil {
    t.Fatal("unable to close database", err)
}

Performance

Using example/performance.go

Using Go 1.15.5:

insert time  10000000 records =  17890 ms, usec per op  1.7890143
close time  8477 ms
scan time  2887 ms, usec per op  0.2887559
scan time 50%  81 ms, usec per op  0.162584
random access time  3.508029 us per get
close with merge 1 time  0.148 ms
scan time  2887 ms, usec per op  0.2887248
scan time 50%  85 ms, usec per op  0.171406
random access time  3.487226 us per get
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].