All Projects → sdslabs → Kiwi

sdslabs / Kiwi

Licence: mit
A minimalistic in-memory key value store.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Kiwi

gocache
High performance and lightweight in-memory cache library with LRU and FIFO support as well as memory-usage-based-eviction
Stars: ✭ 15 (-90.26%)
Mutual labels:  key-value, in-memory
Lmdbjava
Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store
Stars: ✭ 546 (+254.55%)
Mutual labels:  key-value, in-memory
file.io
🐈 💻 Simple File Share Service where the file is completely deleted after download.
Stars: ✭ 38 (-75.32%)
Mutual labels:  key-value, in-memory
Cucache
Fast PUT/GET/DELETE in-memory key-value store for lookaside caching
Stars: ✭ 63 (-59.09%)
Mutual labels:  key-value, in-memory
Buntdb
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support
Stars: ✭ 3,583 (+2226.62%)
Mutual labels:  key-value, in-memory
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 (+1242.21%)
Mutual labels:  key-value, in-memory
Gkvdb
[mirror] Go语言开发的基于DRH(Deep-Re-Hash)深度哈希分区算法的高性能高可用Key-Value嵌入式事务数据库。基于纯Go语言实现,具有优异的跨平台性,良好的高可用及文件IO复用设计,高效的底层数据库文件操作性能,支持原子操作、批量操作、事务操作、多表操作、多表事务、随机遍历等特性。
Stars: ✭ 109 (-29.22%)
Mutual labels:  key-value
Arangodb
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
Stars: ✭ 11,880 (+7614.29%)
Mutual labels:  key-value
Etcd
Distributed reliable key-value store for the most critical data of a distributed system
Stars: ✭ 38,238 (+24729.87%)
Mutual labels:  key-value
Unqlite
An Embedded NoSQL, Transactional Database Engine
Stars: ✭ 1,583 (+927.92%)
Mutual labels:  key-value
Immudb
immudb - world’s fastest immutable database, built on a zero trust model
Stars: ✭ 3,743 (+2330.52%)
Mutual labels:  key-value
Nuster
A high performance HTTP proxy cache server and RESTful NoSQL cache server based on HAProxy
Stars: ✭ 1,825 (+1085.06%)
Mutual labels:  key-value
Coinboot
A framework for diskless computing
Stars: ✭ 131 (-14.94%)
Mutual labels:  in-memory
Bulletinboard Dht
Your internet-wide general-purpose DHT to store key/value pairs
Stars: ✭ 114 (-25.97%)
Mutual labels:  key-value
Hazelcast Go Client
Hazelcast IMDG Go Client
Stars: ✭ 140 (-9.09%)
Mutual labels:  in-memory
Stencil Store
Store is a lightweight shared state library by the StencilJS core team. Implements a simple key/value map that efficiently re-renders components when necessary.
Stars: ✭ 107 (-30.52%)
Mutual labels:  key-value
Justindb
⚛️ JustinDB is a highly available globally distributed key-value data store.
Stars: ✭ 147 (-4.55%)
Mutual labels:  key-value
Keyv
Simple key-value storage with support for multiple backends
Stars: ✭ 1,629 (+957.79%)
Mutual labels:  key-value
Ardb
A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
Stars: ✭ 1,707 (+1008.44%)
Mutual labels:  key-value
Verdi Raft
An implementation of the Raft distributed consensus protocol, verified in Coq using the Verdi framework
Stars: ✭ 143 (-7.14%)
Mutual labels:  key-value

Kiwi Logo

A minimalistic in-memory key value store.

Go CI Docs CI Docs CD PkgGoDev

Overview

You can think of Kiwi as thread safe global variables. This kind of library comes in helpful when you need to manage state accross your application which can be mutated with multiple threads. Kiwi protects your keys with mutex locks so you don't have to.

Head over to kiwi.sdslabs.co for more details and documentation.

Installation

Kiwi requires Go >= 1.14

Kiwi can be integrated with your application just like any other go library.

go get -u github.com/sdslabs/kiwi

Now you can import kiwi any where in your code.

import "github.com/sdslabs/kiwi"

Basic usage

Create a store, add key and play with it. It's that easy!

store := stdkiwi.NewStore()

if err := store.AddKey("my_string", "str"); err != nil {
  // handle error
}

myString := store.Str("my_string")

if err := myString.Update("Hello, World!"); err != nil {
  // handle error
}

str, err := myString.Get()
if err != nil {
  // handle error
}

fmt.Println(str) // Hello, World!

Check out the tutorial to learn how to use Kiwi.

Benchmarks

Following are the benchmarks comparing Kiwi with BuntDB on a MacBook Pro (8th gen Intel i5 2.4GHz processor, 8GB RAM).

❯ go test -bench=. -test.benchmem ./benchmark
goos: darwin
goarch: amd64
pkg: github.com/sdslabs/kiwi/benchmark
BenchmarkBuntDB_Update-8        11777931                96.6 ns/op            48 B/op          1 allocs/op
BenchmarkBuntDB_View-8          23310963                47.1 ns/op            48 B/op          1 allocs/op
BenchmarkKiwi_Update-8          10356004               115 ns/op              48 B/op          3 allocs/op
BenchmarkKiwi_Get-8             21910110                53.2 ns/op             0 B/op          0 allocs/op
PASS
ok      github.com/sdslabs/kiwi/benchmark       6.216s

Following are the key differences due to which Kiwi is a little slow:

  1. BuntDB supports transactions, i.e., it locks the database once to apply all the operations (and this is what is tested).
  2. Kiwi supports dynamic data-types, which means, allocation on heap at runtime (interface{}) whereas BuntDB is statically typed.

The above two differences are what makes Kiwi unique and suitable to use on many occasions. Due to the aforementioned reasons, Kiwi can support typed values and not everything is just another "string".

There are places where we could improve more. Some performance issues also lie in the implementation of values. For example, when updating a string, not returning the updated string avoids an extra allocation.

Contributing

We are always open for contributions. If you find any feature missing, or just want to report a bug, feel free to open an issue and/or submit a pull request regarding the same.

For more information on contribution, check out our docs.

Contact

If you have a query regarding the product or just want to say hello then feel free to visit chat.sdslabs.co or drop a mail at [email protected]


Made by SDSLabs

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