Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
CouchDB-compatible mobile database; Objective-C version

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Demo-Mac
Demo-iOS
GNUstep
Listener
Source
TouchDB.xcodeproj
vendor
.gitignore
.gitmodules
GNUmakefile
README.md

README.md

TouchDB

by Jens Alfke (jens@couchbase.com)
with contributions from Alexander Edge, Chris Kau, J Chris Anderson, Marty Schoch, Paul Mietz Egli
and technical advice from Damien Katz and Filipe Manana

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

By "CouchDB-compatible" I mean that it can replicate with CouchDB, and that its data model and high-level design are "Couch-like" enough to make it familiar to CouchDB/Couchbase developers. Its REST API is nearly identical, though it doesn't support a few 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.

By "suitable for embedding into mobile apps", I mean that it meets the following requirements:

  • Small code size; currently about 250kbytes. (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" I'm 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 Objective-C implementation runs on Mac OS as well, and on Linux and other Unix-like OSs via GNUstep.

More documentation is available on the wiki.

Platforms

  • Mac OS X -- 10.7.2 or higher.
  • iOS -- 5.0 or higher.
  • Linux, BSD, etc -- Any platform supported by current GNUstep and libobjc2.
  • MS Windows -- As supported by GNUstep using MingW.
  • Android / Java -- Has its own source base and repository.

Requirements

  • It's written in Objective-C.
  • Xcode 4.3+ is required to build it (Clang 3.0+, with GNUstep).
  • Runtime system requirements for Apple platforms are iOS 5+, or Mac OS X 10.7.2+.

License

  • TouchDB itself is under the Apache License 2.0.
  • FMDB, by Gus Mueller, is under the MIT License.
  • Google Toolbox For Mac is under the Apache License 2.0.
  • CocoaHTTPServer, by Robbie Hanson, is under the BSD License.
  • MYUtilities (portions of which are copied into the vendor/MYUtilities directory) is under the BSD License. (But note that I, Jens, wrote MYUtilities and would have no problem re-licensing it under Apache for use here.)

Development Status

TouchDB went beta in June 2012 with version 0.8.

We don't have a formal schedule for 1.0, but expect the blessed event by the end of summer.

Building TouchDB

On a Mac

For full details see the wiki page. The basic steps are:

  1. Clone the TouchDB repository to your local disk.
  2. In that directory run "git submodule init" and then "git submodule update". This will clone the dependent library repos (such as FMDB and MYUtilities) into the vendor/ subdirectory.
  3. Open the Xcode project and build the "Mac Framework" and/or "iOS Framework" schemes.

With GNUstep

Please refer to the files BUILDING.txt and SETUP.txt in the GNUstep directory.

Something went wrong with that request. Please try again.