An embedded key/value database for Go.
 
 
Go to file
Steven Normore 71e91e24b0 move bench package to bench/cmd/bolt/bench 2014-04-18 21:44:48 -05:00
cmd/bolt move bench package to bench/cmd/bolt/bench 2014-04-18 21:44:48 -05:00
.gitignore add bin to gitignore 2014-04-09 11:50:53 +00:00
LICENSE Initial commit 2013-12-20 10:26:14 -08:00
Makefile add bench sub-package 2014-04-18 21:44:47 -05:00
README.md fix typo in README 2014-04-08 07:55:44 -04:00
bolt.go Remove DB.Open() and only allow bolt.Open(). 2014-03-31 11:22:27 -06:00
bolt_test.go Return bucket from CreateBucket() functions. 2014-04-15 23:45:06 -04:00
bucket.go Return bucket from CreateBucket() functions. 2014-04-15 23:45:06 -04:00
bucket_test.go Return bucket from CreateBucket() functions. 2014-04-15 23:45:06 -04:00
const.go Add nested buckets. 2014-04-11 12:36:54 -06:00
cursor.go Add Cursor.Bucket() function. 2014-04-16 09:38:53 -04:00
cursor_test.go Add Cursor.Bucket() function. 2014-04-16 09:38:53 -04:00
db.go Add nested buckets. 2014-04-11 12:36:54 -06:00
db_test.go Return bucket from CreateBucket() functions. 2014-04-15 23:45:06 -04:00
doc.go Consolidate Tx and RWTx. 2014-03-08 20:40:48 -07:00
freelist.go Add nested buckets. 2014-04-11 12:36:54 -06:00
freelist_test.go Add nested buckets. 2014-04-11 12:36:54 -06:00
meta.go Add nested buckets. 2014-04-11 12:36:54 -06:00
meta_test.go Add nested buckets. 2014-04-11 12:36:54 -06:00
node.go Add nested buckets. 2014-04-11 12:36:54 -06:00
node_test.go Add nested buckets. 2014-04-11 12:36:54 -06:00
page.go Add nested buckets. 2014-04-11 12:36:54 -06:00
page_test.go Add nested buckets. 2014-04-11 12:36:54 -06:00
quick_test.go Minor refactor. 2014-02-28 15:13:07 -07:00
syscall.go Consolidate syscall files. 2014-03-23 08:59:45 -07:00
syscall_linux.go Consolidate syscall files. 2014-03-23 08:59:45 -07:00
tx.go Return bucket from CreateBucket() functions. 2014-04-15 23:45:06 -04:00
tx_test.go move bench package to bench/cmd/bolt/bench 2014-04-18 21:44:48 -05:00

README.md

Bolt Build Status Coverage Status GoDoc Project status

Overview

Bolt is a pure Go key/value store inspired by Howard Chu and the LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL. It is also meant to be educational. Most of us use tools without understanding how the underlying data really works.

Since Bolt is meant to be used as such a low-level piece of functionality, simplicity is key. The API will be small and only center around getting values and setting values. That's it. If you want to see additional functionality added then we encourage you submit a Github issue and we can discuss developing it as a separate fork.

Simple is the new beautiful.

Tobias Lütke

Project Status

Bolt is functionally complete and has nearly full unit test coverage. The library test suite also includes randomized black box testing to ensure database consistency and thread safety. Bolt is currently in use in a few projects, however, it is still at a beta stage so please use with caution and report any bugs found.

Comparing Bolt vs LMDB

Bolt is inspired by LMDB so there are many similarities between the two:

  1. Both use a B+Tree data structure.

  2. ACID semantics with fully serializable transactions.

  3. Lock-free MVCC support using a single writer and multiple readers.

There are also several differences between Bolt and LMDB:

  1. LMDB supports more additional features such as multi-value keys, fixed length keys, multi-key insert, and direct writes. Bolt only supports basic Get(), Put(), and Delete() operations and bidirectional cursors.

  2. LMDB databases can be shared between processes. Bolt only allows a single process access.

  3. LMDB is written in C and extremely fast. Bolt is fast but not as fast as LMDB.

  4. LMDB is a more mature library and is used heavily in projects such as OpenLDAP.

So why use Bolt? The goal of Bolt is provide a simple, fast data store that is easily integrated into Go projects. The library does not require CGO so it is compatible with go get and you can easily build static binaries with it. We are not accepting additional functionality into the library so the API and file format are stable. Bolt also has near 100% unit test coverage and also includes heavy black box testing using the testing/quick package.

Other Projects Using Bolt

Below is a list of public, open source projects that use Bolt:

  • Skybox Analytics - A standalone funnel analysis tool for web analytics.
  • DVID - Added Bolt as optional storage engine and testing it against Basho-tuned leveldb.
  • Scuttlebutt - Uses Bolt to store and process all Twitter mentions of GitHub projects.

If you are using Bolt in a project please send a pull request to add it to the list.