Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 59878 invoked from network); 3 Jan 2010 22:44:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jan 2010 22:44:32 -0000 Received: (qmail 14830 invoked by uid 500); 3 Jan 2010 22:44:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 14745 invoked by uid 500); 3 Jan 2010 22:44:31 -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 14735 invoked by uid 99); 3 Jan 2010 22:44:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jan 2010 22:44:31 +0000 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nrstott@gmail.com designates 209.85.218.218 as permitted sender) Received: from [209.85.218.218] (HELO mail-bw0-f218.google.com) (209.85.218.218) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jan 2010 22:44:21 +0000 Received: by bwz10 with SMTP id 10so9163840bwz.35 for ; Sun, 03 Jan 2010 14:43:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=kieZ4NDLRm/4MP+Mm20zCfD3v3aWPKdrR9pl8T+OmMU=; b=uPffU10lYfwG9V4rqHvfA8PLHg/9PiXvhps/BBspP+3ExLoG1MT/5q7qwsFhxF1Maw qicdLsYipO9mFV85unNDg/yA/EIlpkd5Im3hoU8pg11n/qrIgfHHiFSWbIgF916vtYbK lIUVU+NRAp5eRJi8z8mKNeilLMxrvnsGVJ5Xo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Ngf7cglPfzImyUPKseQPOHrZ9UB7cfi1VHloenq7WvCV6BICqBuZEh/m5SJ8PnLM+E 2TZXlVQ1EudyAs49/jGQzzKvSOvij77+xY4OUuq4wAzvDz6Dyb33KGXXc+Klj2tyJ73w ds2fS0nuFbrgULmqfEsl4BaCxqoNP4Bq0aj6k= MIME-Version: 1.0 Received: by 10.204.24.83 with SMTP id u19mr38285bkb.22.1262558636708; Sun, 03 Jan 2010 14:43:56 -0800 (PST) In-Reply-To: <1bca98391001031339w7f47897cq14240168cbc2cce1@mail.gmail.com> References: <1bca98391001030457m52aca7d8lf77edd06375f41c6@mail.gmail.com> <1bca98391001031203n4315e5f0j3f2cdfe4e7ceaa34@mail.gmail.com> <1bca98391001031339w7f47897cq14240168cbc2cce1@mail.gmail.com> Date: Sun, 3 Jan 2010 16:43:56 -0600 Message-ID: Subject: Re: sample couchdb application From: Nathan Stott To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0003255575160c941e047c4a5755 --0003255575160c941e047c4a5755 Content-Type: text/plain; charset=ISO-8859-1 Short answer: yes, each view of a question is a doc Medium answer: You can imagine the general probs we may run into with that approach, so we have lots of caching strategies and run some db maintenance scripts On Sun, Jan 3, 2010 at 3:39 PM, Matteo Caprari wrote: > Hi Nathan. > > Cool app. Do you count page views with couchdb? If so, how? > > tnx > > On Sun, Jan 3, 2010 at 9:07 PM, Nathan Stott wrote: > > CouchDB is indeed great for this usecase. I've worked on a similar site > > that is in beta currently. It uses a CouchDB backend. > > http://forum.motorpool.com/questions?most-recent > > > > We use a > semi-traditional > > middle-tier running on Narwhal and Jack for some > > business logic and authentication though. > > > > On Sun, Jan 3, 2010 at 2:03 PM, Matteo Caprari >wrote: > > > >> Hi Chris. > >> > >> I haven't actually integrated nor automated anything: I run jsdoc > >> manually before each redeploy. I'm looking into an > >> integration with couchap but christmas got in the way and accomplished > >> nothing yet. > >> > >> I think I had some problems with ordering by question date because > answers > >> don't > >> have the question timestamp and didn't know what key to emit to keep > >> the item adjacent. > >> > >> But I like your optimism, so I'll try my head again and maybe ask again. > >> > >> I'll sync the app with your suggestions and post the results to this > >> thread. > >> > >> thanks for your support. > >> > >> On Sun, Jan 3, 2010 at 7:07 PM, Chris Anderson > wrote: > >> > On Sun, Jan 3, 2010 at 4:57 AM, Matteo Caprari < > matteo.caprari@gmail.com> > >> wrote: > >> >> Hello list. > >> >> > >> >> I've cranked up a simple couchapp that mimics stackoverflow.com (if > you > >> squint). > >> >> > >> >> The idea is to understand couchdb better and provide the base for a > >> >> tutorial, but > >> >> before going any deeper, I'd like to hear from you what is wrong and > >> >> what is good. > >> > > >> > This is great stuff. Really cool. I still don't understand all of how > >> > you've integrated things, but the documentation is really a great > >> > addition. > >> > > >> > I think this is a really cool use case. Thanks for sharing! > >> > > >> > One concern I have is that I don't think you need to be building > >> > custom _ids. You should be able to accomplish your lists and shows > >> > without messing with custom ids, instead using document parameters in > >> > views. Custom ids generally just add code-overhead to apps and > >> > increase the chances of spurious conflicts. > >> > > >> > To avoid double posts, PUT with a random docid should be idempotent, > >> > and fail on duplicate PUTs. If you can't do PUT from your client the > >> > _bulk_docs POST api should work to, if you specify ids. See how > >> > jquery.couch.js has an API for getting UUIDs from the Couch and then > >> > using them on new docs. > >> > > >> > Also, in trunk _show is no longer happy to have bogus ids, you'll get > >> > a 404. You can invoke with no docid at all to accomplish your use > >> > case. > >> > > >> > I'm happy to help more so that when you write your tutorial it > >> > embodies best practices. Just post any questions to this thread! > >> > > >> > Cheers, > >> > Chris > >> > > >> > > >> >> > >> >> So please have a look, but don't expect too much. > >> >> > >> >> Demo: http://caprazzi.net:5984/fortytwo/_design/fortytwo/index.html > >> >> Docs: > >> http://caprazzi.net:5984/fortytwo/_design/fortytwo/docs/index.html > >> >> Source: http://github.com/mcaprari/fortytwo > >> >> > >> >> Docs are created with jsdoc-toolkit and a custom template. > >> >> I think we could integrate it with couchapp to obtain a "view source" > >> feature. > >> >> > >> >> -- > >> >> :Matteo Caprari > >> >> matteo.caprari@gmail.com > >> >> > >> > > >> > > >> > > >> > -- > >> > Chris Anderson > >> > http://jchrisa.net > >> > http://couch.io > >> > > >> > >> > >> > >> -- > >> :Matteo Caprari > >> matteo.caprari@gmail.com > >> > > > > > > -- > :Matteo Caprari > matteo.caprari@gmail.com > --0003255575160c941e047c4a5755--