AMT Blog

TouchDB - A slim Database engine for your Mobile App

TouchDB is a slim CouchDB-compatible database engine suitable for embedding into your mobile or desktop apps. Think of it this way: If CouchDB is MySQL, then TouchDB is SQLite.

By being "CouchDB-compatible" it means that TouchDB can replicate with CouchDB and Couchbase Server, and that its data model and high-level design are "Couch-like" enough to make it familiar to CouchDB/Couchbase developers. Its API will not be identical and it may not support some CouchDB features (like user accounts) that aren't useful in mobile apps. Its implementation is not based on CouchDB's (it's not even written in Erlang.) It does support replication to and from CouchDB.

TouchDB is "suitable for embedding into mobile apps", as it meets the following requirements:

  • Small code size; ideally less than 256kbytes. (Code size is important to mobile apps, which are often downloaded over cell networks.)
  • Quick startup time on relatively-slow CPUs; ideally 100ms or less.
  • Low memory usage with typical mobile data-sets. The expectation is the number of documents will not be huge, although there may be sizable multimedia attachments.
  • "Good enough" performance with these CPUs and data-sets.

And by "mobile apps" TouchDB Creator says he's focusing on iOS and Android, although there's no reason we couldn't extend this to other platforms like Windows Phone. And it's not limited to mobile OSs -- the initial Objective-C implementation runs on Mac OS as well.

Requirements:

  • It's written in Objective-C.
  • Xcode 4.2 is required to build it.
  • Runtime system requirements are iOS 5+, or Mac OS X 10.7.2+.

TouchDB is available under the Apache License 2.0.

Read more…

 If you wish to get regular updates on what we post, do subscribe to 

Filed under: Database Mobile Web NoSQL
To Posterous, Love Metalab