As far as I know, couch db instance can't be run in background, that is, if the user switches the app to background from foreground, the database is effectively not reachable. and it would take a few moments to restart after a user switches the app to foreground, is there a way to find whether the DB is up and running,once the app resumes to foreground?
Waiting for your reply,
Krishna.
In case you want to check the status of CouchDB, you can do so using the following command: sudo status couchdb.
After installation, open built-in web interface of CouchDB by visiting the following link: http://127.0.0.1:5984/. If everything goes fine, this will give you a web page, which have the following output. This shows you the index page of Futon, which is the web interface of CouchDB.
You can just query http://yourserver:5984/ which should return the result.
To connect to CouchDB from a different machine, you must open port 5984 for remote access. Refer to the FAQ for more information on this. IMPORTANT: Making this application's network ports public is a significant security risk. You are strongly advised to only allow access to those ports from trusted networks.
Instead of constantly polling, using the changes API, you can have a continuous feed with a heartbeat.
The default heartbeat is 1 minute but you can make it shorter if you like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With