Choosing a dealer.
Nodejitsu has a great post on this topic here .
Without knowing the specifics of your application, I will take a broad approach ...
Back end
If you want users to never see your database, reverse it. You can broadcast everything through something like node.js and present only what the user should see, and they will never know anything about the database. See "View Resources"
Frontal
If you are not interested in data security, you can place the entire CouchDB application in the application; see CouchApp . This approach has the advantage of using a replication mechanism to control the publication of your site / data. The downside here is that you will almost certainly come across some technical limitations that will require moving CouchDB closer to the server.
Bl end
Ask the application server to present the interface and the client to pull data from the database separately. This gives you maximum flexibility, but it can be a bag of grudges, because even with a good design, it can lead to problems with support and scalability.
My recommendation
Use CouchDB on the server. If you need mobile clients to synchronize, use a secondary database open for this purpose and selectively synchronize this data where necessary.
source share