Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6805987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:39:18+00:00 2026-05-26T19:39:18+00:00

Using CouchDB to create a hosted app for clients. I have a dev database

  • 0

Using CouchDB to create a hosted app for clients. I have a dev database I work from, as well as separate DBs for each client. Works well, problem is when I make a change on dev, I have to manually copy the view code into each separate DB. It’s fine now that I have 2 clients. But my hope is to grow to 100 clients. One small change could take a very long time!

Am I missing something simple in regards to replicating ONLY the views?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:39:19+00:00Added an answer on May 26, 2026 at 7:39 pm

    Here is how I usually work.

    1. I have my local dev db. create and update my design docs (containing the views).
    2. Have a production deployment db that will be visible to all the clients. I usually use iriscouch. Keep no data in this db.
    3. When setting up a client, make sure you setup one way replication from #2 to this client db.

    So to deploy to all clients, I put my latest design docs on the master, then all the clients will then be updated. There are some caveats to this. You have to make sure when you deploy to the master db, that you respect the revisions, so the client dbs will know to update.

    Here is a quote from the master, Jason Smith:

    The Good Way: Work with _rev

    I think your application has a concept of "upgrading" from one
    revision to another. There is staging or development code, and there
    is production code. Periodically you promote development code to
    production. That sounds like two Git branches and it also sounds like
    two doc ids. (Or two sets of doc ids.)

    You can test and refactor your code all day long, in the temporary doc
    (_design/dev). But in production (_design/pro), it’s just like a long
    Git history. Every revision built from the one previous, to the
    beginning of time.

    If you want to promote _design/dev, the latest deploy is
    _rev=4-abcdef. So this will be the fifth revision deployed, right?
    Hey! Stop reading the "_rev" field! But yeah, probably.

    COPY /db/_design/dev
    Destination: _design/pro?rev=4-abcdef

    {"id":"_design/pro","rev":"5-12345whatever"}

    Notice that each deployed _design/pro builds from the other, so it
    will naturally float out to the slaves when they replicate.

    In real-life, you may have add a middle step, pushing design documents
    to production servers before actually publishing them. Once you push,
    how long will it take couch to build new views? The answer is,
    "Christ, who knows?"

    Therefore you have to copy _design/dev to _design/staging and then
    push that out into the wild. Then you have to query its views until
    you are satisfied that they are fresh and fast. (You can compare
    "update_seq" from /db vs. "update_seq" from /db/_design/ddoc/_info).
    And only then do you HTTP copy from _design/staging to _design/pro and
    let that propagate out.

    Source

    Its not as confusing as it may sound. But to simplify the process, you can use Reupholster
    (I admit, I have written this tool). It is mainly for couchapps, but even if you are just promoting design docs, it might be worth you just using reupholster to deploy to your master db. Reupholster adds in some handy info to the design doc, like date/time svn or git info. That way when you look at a clients db you can tell which design doc they are on.

    Good luck

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At work, we recently started a project using CouchDB (a document-oriented database). I've been
I have create CouchDB database with documents that have slash (/) in the document
I have a CouchDB database with documents representing 100,000 events. Each event has, among
CouchDB, version 0.10.0, using native erlang views. I have a simple document of the
I'm implementing a message application using CouchDB. I want to apply timestamps to each
I'm trying to create a database in couchdb, which has an admin user/password set,
My company is using CouchDB, and I'm going to have to interact with it
Using CouchDB 1.0.1. I have DELETEd some documents, then I PUT some other documents
I'm looking at using CouchDB for one project and the GAE app engine datastore
I have a normal Rails project (without Active Record) using CouchDB (couchrest_model) as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.