gorocksdb alternatives and similar packages
Based on the "Database" category.
Alternatively, view gorocksdb alternatives based on common mentions on social networks and blogs.
-
prometheus
The Prometheus monitoring system and time series database. -
tidb
TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://tidbcloud.com/free-trial -
cockroach
CockroachDB - the open source, cloud-native distributed SQL database. -
influxdb
Scalable datastore for metrics, events, and real-time analytics -
Milvus
A cloud-native vector database, storage for next generation AI applications -
vitess
Vitess is a database clustering system for horizontal scaling of MySQL. -
TinyGo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM. -
rqlite
The lightweight, distributed relational database built on SQLite. -
groupcache
groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases. -
VictoriaMetrics
VictoriaMetrics: fast, cost-effective monitoring solution and time series database -
bytebase
The GitLab/GitHub for database DevOps. World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams. -
go-cache
An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications. -
immudb
immudb - immutable database based on zero trust, SQL/Key-Value/Document model, tamperproof, data change history -
go-mysql-elasticsearch
Sync MySQL data into elasticsearch -
rosedb
Lightweight, fast and reliable key/value storage engine based on Bitcask. -
buntdb
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support -
pREST
PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new -
dbmate
:rocket: A lightweight, framework-agnostic database migration tool. -
xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server -
tiedot
A rudimentary implementation of a basic document (NoSQL) database in Go -
nutsdb
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. -
LinDB
LinDB is a scalable, high performance, high availability distributed time series database. -
cache2go
Concurrency-safe Go caching library with expiration capabilities and access counters -
GCache
An in-memory cache library for golang. It supports multiple eviction policies: LRU, LFU, ARC -
gocraft/dbr (database records)
Additions to Go's database/sql for super fast performance and convenience. -
lotusdb
Most advanced key-value database written in Go, extremely fast, compatible with LSM tree and B+ tree. -
fastcache
Fast thread-safe inmemory cache for big number of entries in Go. Minimizes GC overhead
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of gorocksdb or a related project?
README
A Go wrapper for RocksDB with utilities for better performance and extensions.
Install
You'll need to build RocksDB v5.8+ on your machine. Future RocksDB versions will have separate branches.
Additional features
GoBufferIterator
GoBufferIterator is an iterator that that uses the original iterator but does less cgo calls due to prefetching data in a go byte slice. This is useful if you range over a large number of KVs and can give you a large performance boost.
readaheadByteSize := uint64(1024 * 1024)
readaheadCnt := uint64(1024)
iter := db.NewIterator(readOptions)
goitr := NewGoBufferIteratorFromIterator(iter, readaheadByteSize, readaheadCnt, false, IteratorSortOrder_Asc)
Extensions
To extend functionality and mainly to reduce cgo calls.
ẀriteBatch
// PutVCF queues multiple key-value pairs in a column family.
PutVCF(cf *ColumnFamilyHandle, keys, values [][]byte)
// PutVCFs queues multiple key-value pairs in column families.
PutVCFs(cfs []*ColumnFamilyHandle, keys, values [][]byte)
MultiIterator
Its purpose is to iterate with multiple iterators at once.
Package /extension/events does provide a MultiIterator for "topics with events" -> TopicEventMultiIterator. An example can be found here.
The standard MultiIterator can be used for example: You have "topics" in your RocksDB which do store "events" and share a common suffix length. i.e. 8bytes Topic ID, 8bytes Event ID (16 byte is the key). You want to "combine" some topics and iterate through those by ascending event id up to eventID9.
ro1 := NewDefaultReadOptions()
ro1.SetIterateUpperBound([]byte("topicID1eventID9"))
ro2 := NewDefaultReadOptions()
ro2.SetIterateUpperBound([]byte("topicID2eventID9"))
ro3 := NewDefaultReadOptions()
ro3.SetIterateUpperBound([]byte("topicID3eventID9"))
it1 := db.NewIterator(ro1)
it2 := db.NewIterator(ro2)
it3 := db.NewIterator(ro3)
itrs = []*Iterator{
it1, it2, it3,
}
readaheadSize := uint64(1024 * 1024)
readaheadCnt := uint64(3)
prefixLen := uint64(8)
multiitr = NewFixedPrefixedMultiIteratorFromIterators(readaheadSize, readaheadCnt, true, itrs, prefixLen)
for multiitr.Seek(seekKeys); multiitr.Valid(); multiitr.Next() {
k, v := multiitr.KeyValue()
itrIdx := multiitr.IteratorIndex() // describes which of the iterators in "itrs" provides k, v
}
Or: You have "topics" in your RocksDB which do store "events" and share a common suffix length. i.e. 8bytes Topic ID, 8bytes Event ID (16 byte is the key). You want to "combine" some topics and iterate through those by ascending event id up to eventID9. For the suffix type of MultiIterator you need an appropriate comparator.
suffixLen := uint64(8) // our Event ID key part which always has to be 8 bytes here.
multiitr = NewFixedSuffixMultiIteratorFromIterators(readaheadSize, readaheadCnt, true, itrs, suffixLen)
Please be aware that your DB / column family needs the appropriate comparator! If you use the standard comparator (BytewiseComparator) all keys MUST have same length.
Examples
Thanks
Thanks to gorocksdb where this is forked from originally.