gorocksdb alternatives and similar packages
Based on the "Database" category.
Alternatively, view gorocksdb alternatives based on common mentions on social networks and blogs.
-
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 -
prometheus
The Prometheus monitoring system and time series database. -
cockroach
CockroachDB - the open source, cloud-native distributed SQL database. -
influxdb
Scalable datastore for metrics, events, and real-time analytics -
Milvus
Vector database for scalable similarity search and 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. -
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 -
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 and Key-Value, tamperproof, data change history -
go-mysql-elasticsearch
Sync MySQL data into elasticsearch -
rosedb
🚀 A high performance NoSQL database based on bitcask, supports string, list, hash, set, and sorted set. -
pREST
PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new -
buntdb
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support -
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. -
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. -
fastcache
Fast thread-safe inmemory cache for big number of entries in Go. Minimizes GC overhead -
CovenantSQL
A decentralized, trusted, high performance, SQL database with blockchain features
Static code analysis for 29 languages.
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.