Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 92515 invoked from network); 8 Nov 2009 20:17:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Nov 2009 20:17:52 -0000 Received: (qmail 15732 invoked by uid 500); 8 Nov 2009 20:17:50 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 15658 invoked by uid 500); 8 Nov 2009 20:17:50 -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 15648 invoked by uid 99); 8 Nov 2009 20:17:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Nov 2009 20:17:50 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of matt.goodall@gmail.com designates 74.125.78.24 as permitted sender) Received: from [74.125.78.24] (HELO ey-out-2122.google.com) (74.125.78.24) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Nov 2009 20:17:47 +0000 Received: by ey-out-2122.google.com with SMTP id 22so599601eye.41 for ; Sun, 08 Nov 2009 12:17:26 -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=dvBloil2xc1SzOguDPUwYftw5oF9feqmrVeGqkmUIas=; b=LdRnobBXV6zODPXC0rYTpLa4vati+Gm3HiFgLPERmYTM5nf8oqs/cMg5Tw1UrqooGm R7YQ78KNCBMh1KTzKmUhp+a+QvWNIqQUcxJVNWbSEeIh89gx5bOMV5Em95GtUut0fx9G t5W/bRc4cJkZVRQICPDTBBvee2ul0TqAZOwAg= 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=uhnOJ2fwoC7h19FL1TLspIsDANvSptOgmS8zQdzdEy3P74TkkD136yAcr6gmD0XIZw nVvxy3YWULk1fT0rcFmCWqJ1slLgN8Ol2VTzUjC8a3XgfwwkOzSLE3aZkC3+fsWGpGZx 3XW1zCaxE8oIqPpdR2dqkXC1uoiT7My52UhwM= MIME-Version: 1.0 Received: by 10.213.1.5 with SMTP id 5mr2260184ebd.22.1257711445968; Sun, 08 Nov 2009 12:17:25 -0800 (PST) In-Reply-To: <81d01c0911081155h2a7b7b93sa888dc28ff0427ae@mail.gmail.com> References: <214c385b0911081108t68314495qd0892edcf158856f@mail.gmail.com> <81d01c0911081155h2a7b7b93sa888dc28ff0427ae@mail.gmail.com> Date: Sun, 8 Nov 2009 20:17:25 +0000 Message-ID: <214c385b0911081217g3834c13av52dccd79b4daf738@mail.gmail.com> Subject: Re: Update API From: Matt Goodall To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 2009/11/8 Christopher O'Connell : > Just as a quick aside on the changes API, as a couple of people helped me > figure out last night in the IRC channel, do be careful about grabbing the > canges API if its very large, as some JSON processing libraries take obscene > amounts of space to decode a JSON object that large. > > I don't think it's on the wiki, but limit=n works for _changes True for trunk but, sadly, not for the 0.10.x series. A workaround is to use the continuous feed - each change arrives on its own line as a JSON object so memory use can stay nice and low. I do wonder about the implementation of limit a little, the default seems a little arbitrary ;-). Limit = list_to_integer(couch_httpd:qs_value(Req, "limit", "1000000000000000")), Surely the limit should either default to infinite or something that the client might sensibly handle, say 1000? Note: there's also a new descending=(true|false) _changes arg in trunk too ... although I can't think of a usecase for it. - Matt > > ~ Christopher > > On Sun, Nov 8, 2009 at 12:08 PM, Matt Goodall wrote: > >> 2009/11/8 Andrew Melo : >> > Oh, I'm sorry, I think I misspoke. I was looking for the API that will >> > notify me when a new document is added to the database. >> >> I think this is what you're looking for: >> >> http://wiki.apache.org/couchdb/HTTP_database_API#Changes >> >> - Matt >> >> > >> > thanks, >> > Andrew >> > >> > On Sun, Nov 8, 2009 at 12:59 PM, Dave Ray wrote: >> >> There's also a page on the Wiki here: >> >> >> >> >> http://wiki.apache.org/couchdb/How_to_intercept_document_updates_and_perform_additional_server-side_processing >> >> >> >> but I would trust the test suite more :) >> >> >> >> Dave >> >> >> >> On Sun, Nov 8, 2009 at 1:24 PM, Andrew Melo >> wrote: >> >>> On Sun, Nov 8, 2009 at 12:18 PM, Paul Davis < >> paul.joseph.davis@gmail.com> wrote: >> >>>> Andrew, >> >>>> >> >>>> Don't forget the Futon test suite. There's an update_documents.js test >> >>>> that is probably the most authoritative source of info on that. To my >> >>>> knowledge no one has started a wiki page. >> >>>> >> >>>> Paul >> >>> >> >>> Paul, >> >>> >> >>> Thanks for the pointer. I'll try and grok those files. >> >>> >> >>> Best regards, >> >>> Andrew >> >>> >> >>> >> >>>> >> >>>> On Sun, Nov 8, 2009 at 12:57 PM, Andrew Melo >> wrote: >> >>>>> Forgive me everyone, but my google-fu is having trouble finding the >> >>>>> documentation for the updates API for the newer version of Couch. Can >> >>>>> someone point me in the right direction? >> >>>>> >> >>>>> Thanks, >> >>>>> Melo >> >>>>> -- >> >>>>> >> >>>>> -- >> >>>>> Andrew Melo >> >>>>> Andrew.Melo@gmail.com >> >>>>> >> >>>> >> >>> >> >>> >> >>> >> >>> -- >> >>> >> >>> -- >> >>> Andrew Melo >> >>> Andrew.Melo@gmail.com >> >>> >> >> >> > >> > >> > >> > -- >> > >> > -- >> > Andrew Melo >> > Andrew.Melo@gmail.com >> > >> >