Can I use CouchDB mobile as a replacement for localStorage?
A short answer is that installing Couchbase Mobile on your phone requires you to ship as an application, and the Couch APIs it has are more full featured than the localStorage APIs.
If you want to get a sense for what you can do in the scope of CouchDB's web apis (not mobile specific, but handy on mobile), see this architecture document.
As usual "it depends"
If your application is being served from a website then no, there are projects like pouchdb which aim to provide a client side version of CouchDB, however they arent going to help you avoid the limitations of a browser
If you are shipping your application as a standalone application then yes, it should be a fairly simple matter of following the installation instructions to add CouchDB to your application:
- Android: http://www.couchbase.org/get/couchbase-mobile-for-android/current
- iOS: http://www.couchbase.org/get/couchbase-mobile-for-ios/current
and having your client code make couch requests instead of localStorage ones, remembering that:
- localStorage only stores strings and CouchDB stores JSON, and
PhoneGap will also require you to ship as an application and not a website (its the only way to not be limited by the browser).
This should be updated. PouchDB now uses IndexedDB which on most browsers I have tried does not have size limits (or is an option). I am storing several 100MB of map tiles in a browser.