An embedded key/value database for Go.
 
 
Go to file
Martin Kobetic b9899d09ab first part 2014-05-09 20:50:55 +00:00
cmd/bolt first part 2014-05-09 20:50:55 +00: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 'bolt bench'. 2014-04-18 22:15:31 -05:00
README.md fix typo in README 2014-04-08 07:55:44 -04:00
bolt.go Consolidate code for clarity. 2014-05-05 07:56:54 -06:00
bolt_linux.go Consolidate code for clarity. 2014-05-05 07:56:54 -06:00
bucket.go first part 2014-05-09 20:50:55 +00:00
bucket_test.go Fix bucket free. 2014-05-07 10:37:50 -06:00
cursor.go Fix bucket free. 2014-05-07 10:37:50 -06:00
cursor_test.go Merge pull request #134 from Shopify/c_cursor 2014-04-21 07:24:48 -06:00
db.go add asserts for detecting pgid high watermark overflow 2014-05-09 13:35:00 +00:00
db_test.go Add inline bucket support. 2014-05-05 16:39:55 -06:00
doc.go Consolidate Tx and RWTx. 2014-03-08 20:40:48 -07:00
freelist.go Fix bucket free. 2014-05-07 10:37:50 -06:00
freelist_test.go Add nested buckets. 2014-04-11 12:36:54 -06:00
node.go Merge branch 'master' of https://github.com/boltdb/bolt into fix-deletion 2014-05-09 09:38:08 -06:00
node_test.go Fix node unit tests. 2014-05-09 07:55:01 -06:00
page.go first part 2014-05-09 20:50:55 +00: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
simulation_test.go Fix deletion reclamation. 2014-05-09 09:26:34 -06:00
tx.go Refactor split/spill. 2014-05-03 16:21:28 -06:00
tx_test.go Add inline bucket support. 2014-05-05 16:39:55 -06: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.