Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 202974115 for ; Mon, 9 May 2011 21:24:57 +0000 (UTC) Received: (qmail 23074 invoked by uid 500); 9 May 2011 21:24:55 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 23049 invoked by uid 500); 9 May 2011 21:24:55 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 23041 invoked by uid 99); 9 May 2011 21:24:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 21:24:55 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of m@marcgrabanski.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 21:24:47 +0000 Received: by fxm6 with SMTP id 6so6225468fxm.11 for ; Mon, 09 May 2011 14:24:24 -0700 (PDT) Received: by 10.223.13.71 with SMTP id b7mr1099707faa.44.1304976264753; Mon, 09 May 2011 14:24:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.157.199 with HTTP; Mon, 9 May 2011 14:23:52 -0700 (PDT) X-Originating-IP: [50.12.198.226] From: Marc Grabanski Date: Mon, 9 May 2011 16:23:52 -0500 Message-ID: Subject: CouchDB Architecture for Modern Web Applications To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf3054a7b9b371ba04a2de768d X-Virus-Checked: Checked by ClamAV on apache.org --20cf3054a7b9b371ba04a2de768d Content-Type: text/plain; charset=ISO-8859-1 I am trying to resolve common threads that keep coming up when CouchDB is discussed in the wild. One major thing I see debated is the per-database ACL in CouchDB. Currently, we have to assume that most applications will need to give each user their own private database, unless they access couch through an application-tier like rails -- this doesn't seem to leverage CouchDB's core strength of being HTTP/REST-based out of the box. So given each user has their own private database, the general use-case in question is: If a user has some info in their personal database they want to make public, how do you make it easy to query across all of the public user data that is left fragmented inside thousands of databases? A possible solution seems to be replicating public information out to another public database via some type of replication, but what if they switch that data back to private, how would that public database be best synced and kept up to date? I've heard filtered replication ( http://blog.couchbase.com/whats-new-in-apache-couchdb-0-11-part-three-new) being thrown around, but maybe someone can take a stab at explaining at a high level how they would tackle this general use-case? Typically in web applications you commonly need to: - generate / search through a list of users - aggregate and search all the public user information - generate an activity feed based a person's friends or followers How would these general use-cases be best architected in CouchDB? I am seeing a lot of fallout from people who try to use CouchDB for those things and eventually give up and go back to a relational DB because it is too large of a departure for them to come up with a good solution. Would you recommend these people go use a relational database for these types of web applications, or are there general guidelines that would keep these types of applications perfectly happy inside CouchDB? I think a high-level explanation on this topic would be good since people seem to be very confused when to use CouchDB, and more importantly when not to use CouchDB for their web-based applications. Sincerely, -- Marc --20cf3054a7b9b371ba04a2de768d--