Enabling ForestDB for CBL Android
Since version 1.2.0, Couchbase Lite supports ForestDB as a storage. This post explains how to enable forestdb storage for Couchbase Lite Android.
What is ForestDB? From forestdb README:
ForestDB 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. Compared with traditional B+-Tree based storage engines, ForestDB shows significantly better read and write performance with less storage overhead.
Installing ForestDB module:
ForestDB is a optional. It is not part of default dependencies of couchbase-lite-android. You needs to add forestdb as a dependency in the application level
How to enable ForestDB:
Couchbase Lite’s default storage is SQLite. You needs to specify ForestDB as your database storage type. When open the database, please specify ForestDB with using
NOTE: Internal implementations of ForestDB and SQLite are different, but both should behave same. So you don’t need to do anything else to use ForestDB with Couchbase Lite
Please refer GrocerySync-Android forestdb branch as a sample Android application.