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 3349532
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:40:34+00:00 2026-05-18T01:40:34+00:00

I have been playing with CouchDB and CouchApp for a little while now. I

  • 0

I have been playing with CouchDB and CouchApp for a little while now. I am planning on using it for a new web site project I’m working on.

  1. From a scalability viewpoint I love the idea of CouchApp.

    The downside is that with no server side code there are some things (like oAuth authentication) that are hard to do on the client side. At some point I’m sure I will need some server side code of some description – I guess you can then look at Node.js but would rather not at this point.

  2. Using CouchDB purely as a backend solution while your pages are served from another server is also a great fit but the downside here is that the cross domain issues prevent you from easily using the built in CouchDB API.

So does anyone have a solution to one of these two downsides?

Can you somehow serve server side code (even PHP would be a win) from CouchApp or can you somehow use a separate site to serve your pages but overcome the cross domain issue?

I am really trying to keep the solution as clean (and as scalable) as possible and one of the great things about CouchDB is the super simple, super fast API so I don’t really want to use a wrapper around it – unless it doesn’t hinder the performance/scalability.

Your opinions are welcome.

  • 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-18T01:40:34+00:00Added an answer on May 18, 2026 at 1:40 am

    Because CouchDB uses an HTTP-based API there are several ways to “mix and match” server-side code (node.js, PHP, etc) with your CouchApp.

    I break the options down into three categories:

    1. First, a 2 Tier Architecture is what you have now: Browser + CouchApp served from CouchDB. It’s a great solution for apps that only need what the browser and CouchDB can offer, but you’ll need another tier as soon as you hit the need to send e-mail, resize images, or get data from another database that doesn’t have an HTTP API (MySQL, MongoDB, etc).
    2. Next, is the 3 Tier Architecture: Browser + Apache/PHP (or similar stack) + CouchDB. This is the more “traditional” option (i.e., LAMP). This is fine for gradually migrating to CouchDB, but long term, it can get cumbersome having to route everything through a second HTTP server (as a proxy, perhaps) or server-side scripting language like PHP.
    3. Last, and my favorite, is the 2.5 Tier Architecture: Browser + CouchDB + externals or _changes feed-based “actions.” In this case, PHP (or similar) acts as a service provider of sorts to CouchDB. Actions can be triggered by either having PHP watch the _changes feed for certain types of documents and their changes (i.e., image upload, email message document), or CouchDB can be setup to “ping” an _external handler to do further processing on the document or its attachments. This is essentially how couchdb-lucene works by watching for updates and taking action on them as they happen or at regular intervals.

    You can find out more about the _changes feed and _external handlers below:

    • _changes feed: http://guide.couchdb.org/draft/notifications.html
    • _external handlers: http://wiki.apache.org/couchdb/ExternalProcesses

    For what its worth, I’ll be discussing these three options this coming Wednesday in a PHP and CouchDB Webcast. Your questions would be a valuable addition to the discussion at the end of the webcast.

    I’d love to know how your CouchApp turns out, and how you solve the problems you mentioned above.

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

Sidebar

Related Questions

I have been playing around with GTK since a couple of days now,while going
I have been playing around with ElasticSearch for a new project of mine. I
I have been playing with this for a while, but the closest I have
I have been playing around with the postgresql.conf file for a couple days now.
I have been working with PostgreSQL, playing around with Wikipedia's millions of hyperlinks and
I have been playing around with silverlight for a couple of days now and
I've been playing with Iris Couch using Futon, curl and reading the CouchDB security
I have been playing around with webkit.net in a c# win forms project, and
I have been playing around with some Python now and start to get a
I have been playing with the Ruby library shoes. Basically you can write 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.