An embedded key/value database for Go.
 
 
Go to file
Ben Johnson 3f7dbffa2e Merge pull request #119 from benbjohnson/tx-rename
Rename internal local Tx variables.
2014-04-04 12:04:53 -06:00
cmd/bolt Remove count and overflow columns for free pages on 'bolt pages'. 2014-04-02 07:44:54 -06:00
.gitignore Add benchmarks. 2014-03-04 13:23:46 -07:00
LICENSE Initial commit 2013-12-20 10:26:14 -08:00
Makefile Resolve remaining errcheck warnings. 2014-03-24 07:38:27 -06:00
README.md README 2014-04-03 09:31:34 -06:00
bolt.go Remove DB.Open() and only allow bolt.Open(). 2014-03-31 11:22:27 -06:00
bucket.go Add performance counters. 2014-04-02 16:03:03 -06:00
bucket_test.go Add performance counters. 2014-04-02 16:03:03 -06:00
buckets.go Add parallel usage test and race detector. 2014-02-15 21:50:34 -07:00
buckets_test.go Rename sys ☞ buckets. 2014-02-05 22:15:47 -07:00
const.go Check for sequence overflow. 2014-02-20 09:24:02 -07:00
cursor.go Rename internal local Tx variables. 2014-04-04 12:03:04 -06:00
db.go Rename internal local Tx variables. 2014-04-04 12:03:04 -06:00
db_test.go Add meta page checksums. 2014-04-02 16:56:16 -06:00
doc.go Consolidate Tx and RWTx. 2014-03-08 20:40:48 -07:00
example_test.go Rename internal local Tx variables. 2014-04-04 12:03:04 -06:00
freelist.go Write freelist after each commit. 2014-03-31 08:52:19 -06:00
freelist_test.go Rename Transaction to Tx. 2014-03-08 17:04:02 -07:00
functional_test.go Add performance counters. 2014-04-02 16:03:03 -06:00
meta.go Add meta page checksums. 2014-04-02 16:56:16 -06:00
meta_test.go Rename errors. 2014-02-16 12:18:44 -07:00
node.go Add performance counters. 2014-04-02 16:03:03 -06:00
node_test.go API Documentation. 2014-02-13 10:58:27 -07:00
page.go Add 'bolt pages'. 2014-03-21 22:34:54 -06:00
page_test.go API Documentation. 2014-02-13 10:58:27 -07: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 Rename internal local Tx variables. 2014-04-04 12:03:04 -06:00
tx_test.go Add Tx.OnCommit() handler. 2014-04-04 07:59:24 -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 project, 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.