akrylysov / Pogreb
Licence: apache-2.0
Embedded key-value store for read-heavy workloads written in Go
Stars: ✭ 708
Programming Languages
go
31211 projects - #10 most used programming language
Labels
Projects that are alternatives of or similar to Pogreb
Immortaldb
🔩 A relentless key-value store for the browser.
Stars: ✭ 2,962 (+318.36%)
Mutual labels: key-value, key-value-store
Cutedb
A slick BTree on disk based key value store implemented in pure Go
Stars: ✭ 67 (-90.54%)
Mutual labels: key-value, key-value-store
Lucid
High performance and distributed KV store w/ REST API. 🦀
Stars: ✭ 171 (-75.85%)
Mutual labels: key-value, key-value-store
Cubdb
Elixir embedded key/value database
Stars: ✭ 235 (-66.81%)
Mutual labels: key-value, key-value-store
Iowow
The skiplist based persistent key/value storage engine
Stars: ✭ 206 (-70.9%)
Mutual labels: key-value, key-value-store
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 (+191.95%)
Mutual labels: key-value, key-value-store
cachegrand
cachegrand is an open-source fast, scalable and secure Key-Value store, also fully compatible with Redis protocol, designed from the ground up to take advantage of modern hardware vertical scalability, able to provide better performance and a larger cache at lower cost, without losing focus on distributed systems.
Stars: ✭ 87 (-87.71%)
Mutual labels: key-value, key-value-store
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 (-55.65%)
Mutual labels: key-value, key-value-store
Elasticell
Elastic Key-Value Storage With Strong Consistency and Reliability
Stars: ✭ 453 (-36.02%)
Mutual labels: key-value
Hashmap
HashMap JavaScript class for Node.js and the browser. The keys can be anything and won't be stringified
Stars: ✭ 363 (-48.73%)
Mutual labels: key-value
Datalevin
A simple, fast and durable Datalog database
Stars: ✭ 360 (-49.15%)
Mutual labels: key-value-store
Infinit
The Infinit policy-based software-defined storage platform.
Stars: ✭ 363 (-48.73%)
Mutual labels: key-value
Github Ds
A collection of Ruby libraries for working with SQL on top of ActiveRecord's connection
Stars: ✭ 597 (-15.68%)
Mutual labels: key-value
Pebblesdb
The PebblesDB write-optimized key-value store (SOSP 17)
Stars: ✭ 362 (-48.87%)
Mutual labels: key-value-store
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 (-7.63%)
Mutual labels: key-value
Pickledb
pickleDB is an open source key-value store using Python's json module.
Stars: ✭ 549 (-22.46%)
Mutual labels: key-value
Pogreb
Pogreb is an embedded key-value store for read-heavy workloads written in Go.
Key characteristics
- 100% Go.
- Optimized for fast random lookups and infrequent bulk inserts.
- Can store larger-than-memory data sets.
- Low memory usage.
- All DB methods are safe for concurrent use by multiple goroutines.
Installation
$ go get -u github.com/akrylysov/pogreb
Usage
Opening a database
To open or create a new database, use the pogreb.Open()
function:
package main
import (
"log"
"github.com/akrylysov/pogreb"
)
func main() {
db, err := pogreb.Open("pogreb.test", nil)
if err != nil {
log.Fatal(err)
return
}
defer db.Close()
}
Writing to a database
Use the DB.Put()
function to insert a new key-value pair:
err := db.Put([]byte("testKey"), []byte("testValue"))
if err != nil {
log.Fatal(err)
}
Reading from a database
To retrieve the inserted value, use the DB.Get()
function:
val, err := db.Get([]byte("testKey"))
if err != nil {
log.Fatal(err)
}
log.Printf("%s", val)
Iterating over items
To iterate over items, use ItemIterator
returned by DB.Items()
:
it := db.Items()
for {
key, val, err := it.Next()
if err == pogreb.ErrIterationDone {
break
}
if err != nil {
log.Fatal(err)
}
log.Printf("%s %s", key, val)
}
Performance
The benchmarking code can be found in the pogreb-bench repository.
Results of read performance benchmark of pogreb, goleveldb, bolt and badgerdb on DigitalOcean 8 CPUs / 16 GB RAM / 160 GB SSD + Ubuntu 16.04.3 (higher is better):
Internals
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].