Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Mobile

use couchapp like offline DB

1 reply [Last post]
  • Login or register to post comments
Wed, 10/26/2011 - 03:36
feromakovi
Offline
Joined: 10/26/2011
Groups: None

Hallo,
I am Android developer and I work on an application, in which I would use CouchBase. Is there any simple way how to replicate my app with an couchDB server on demand? And my app would use offline documents stored on memory card by default, after I run replication process at first. So my app would use local couchDB on android device and work primary with it. And of course I can start replication by cklicking to refresh button for example.

I hope I described my problem properly and I thank you very much for the answers
Richard Samela

Top
  • Login or register to post comments
Wed, 10/26/2011 - 06:23
mschoch
Offline
Joined: 08/03/2011
Groups: None

Hello Richard,

The most common pattern used with Couchbase Mobile is to have a database on the mobile device, and use CouchDB replication to synchronize documents between a server in the cloud and the device. Replications are uni-directional by default, but you can start two of them (one each direction) to achieve bi-directional replication. For more information about CouchDB replication, see http://guide.couchdb.org/draft/replication.html

You can trigger a replication on first launch of the app, or you could ship your application with a "seed" database that includes an initial set of documents. And then use replication to update it with the most recent versions. For many applications this results in a better user experience on first launch, because you can display something while the initial replication runs.

Regarding a refresh button, you certainly could offer the user that control. When the user presses the button you would trigger a one-time non-continuous replication to update the databases. However, another alternative is to use continuous replication. In some applications this can provide a better user experience.

marty

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker