xref: /6.0.3/forestdb/README.md (revision 7741bce9)
17741bce9SChiyoung Seo# ForestDB
27741bce9SChiyoung Seo
37741bce9SChiyoung SeoForestDB is a key-value storage engine that is developed by Couchbase Caching and Storage Team, and its main index structure is built from Hierarchical B+-Tree based Trie, called HB+-Trie. [HB+-Trie](http://db.csail.mit.edu/sigmod11contest/sigmod_2011_contest_poster_jungsang_ahn.pdf) was presented at ACM SIGMOD 2011 Programming Contest, by [Jung-Sang Ahn](http://cagsky.kaist.ac.kr/jsahn/) who now works at Couchbase Caching and Storage Team.
47741bce9SChiyoung Seo
57741bce9SChiyoung SeoCompared with traditional B+-Tree based storage engines, ForestDB shows significantly better read and write performance with less storage overhead. Please refer to the [ForestDB wiki](https://github.com/couchbaselabs/forestdb/wiki) for more details.
67741bce9SChiyoung Seo
77741bce9SChiyoung Seo## Main Features
87741bce9SChiyoung Seo
97741bce9SChiyoung Seo- Keys and values are treated as an arbitrary binary.
107741bce9SChiyoung Seo- Applications can supply a custom compare function to support a customized key order.
117741bce9SChiyoung Seo- A value can be retrieved by its sequence number or disk offset in addition to a key.
127741bce9SChiyoung Seo- Write-Ahead Logging (WAL) and its in-memory index are used to reduce the main index lookup / update overhead.
137741bce9SChiyoung Seo- Multiple snapshot instances can be created from a given ForestDB instance to provide different views of database.
147741bce9SChiyoung Seo- Rollback is supported to revert the database to a specific point.
157741bce9SChiyoung Seo- Ranged iteration by keys or sequence numbers is supported for a partial or full range lookup operation.
167741bce9SChiyoung Seo- Manual or auto compaction can be configured per ForestDB database file.
177741bce9SChiyoung Seo- Transactional support with read\_committed or read\_uncommitted isolation level.
187741bce9SChiyoung Seo
197741bce9SChiyoung Seo## Build
207741bce9SChiyoung Seo
217741bce9SChiyoung Seogit clone forestdb_repo
227741bce9SChiyoung Seo
237741bce9SChiyoung Seomkdir build
247741bce9SChiyoung Seo
257741bce9SChiyoung Seocd build
267741bce9SChiyoung Seo
277741bce9SChiyoung Seocmake ../forestdb
287741bce9SChiyoung Seo
297741bce9SChiyoung Seomake all
307741bce9SChiyoung Seo
317741bce9SChiyoung Seo## Test
327741bce9SChiyoung Seo
332534ac38SJung-Sang Ahnmake test
342534ac38SJung-Sang Ahn
357741bce9SChiyoung Seo## How to Use
362534ac38SJung-Sang Ahn
377741bce9SChiyoung SeoPlease refer to tests/fdb\_functional\_test.cc in ForestDB source directory.