32
bitcask - A Bitcask (LSM+WAL) Key/Value Store written in Go.
source link: https://www.tuicool.com/articles/hit/ZbAraqR
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
bitcask
A Bitcask (LSM+WAL) Key/Value Store written in Go.
Features
- Embeddable
- Builtin CLI
Install
$ go get github.com/prologic/bitcask
Usage (library)
Install the package into your project:
$ go get github.com/prologic/bitcask
package main import ( "log" "github.com/prologic/bitcask" ) func main() { db, _ := bitcask.Open("/tmp/db") db.Set("Hello", []byte("World")) db.Close() }
See the godoc for further documentation and other examples.
Usage (tool)
$ bitcask -p /tmp/db set Hello World $ bitcask -p /tmp/db get Hello World
Performance
Benchmarks run on a 11" Macbook with a 1.4Ghz Intel Core i7:
$ make bench ... BenchmarkGet-4 50000 33185 ns/op 600 B/op 14 allocs/op BenchmarkPut-4 100000 16757 ns/op 699 B/op 7 allocs/op
- ~30,000 reads/sec
- ~60,000 writes/sec
License
bitcask is licensed under the MIT License
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK