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 8B5E896AE for ; Mon, 5 Mar 2012 16:42:35 +0000 (UTC) Received: (qmail 64602 invoked by uid 500); 5 Mar 2012 16:42:34 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 64555 invoked by uid 500); 5 Mar 2012 16:42:34 -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 64547 invoked by uid 99); 5 Mar 2012 16:42:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2012 16:42:34 +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 (athena.apache.org: domain of manobi.oliveira@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2012 16:42:29 +0000 Received: by qcsd15 with SMTP id d15so1688455qcs.11 for ; Mon, 05 Mar 2012 08:42:08 -0800 (PST) Received-SPF: pass (google.com: domain of manobi.oliveira@gmail.com designates 10.224.185.16 as permitted sender) client-ip=10.224.185.16; Authentication-Results: mr.google.com; spf=pass (google.com: domain of manobi.oliveira@gmail.com designates 10.224.185.16 as permitted sender) smtp.mail=manobi.oliveira@gmail.com; dkim=pass header.i=manobi.oliveira@gmail.com Received: from mr.google.com ([10.224.185.16]) by 10.224.185.16 with SMTP id cm16mr10364648qab.0.1330965728379 (num_hops = 1); Mon, 05 Mar 2012 08:42:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=EjD7w5n+vMuLtDz8MGQdpJnLSqkjJ0fCj4qLVtJjx+o=; b=UTcy6IghmNXm5wjZ1XmDbCar4Qk3VlNRY8Ymk29PAyXs30QseLmBGq/crJXH93b1Pr Gzo+TUexSXK56t/tj2S9vZoijnGTW904TMCwnMr7lGMlZtwbXAEGbGFG+tsgEk0ZSmKq 5QX+9eH+u+MtuoJieYx7kMo00eh5h7rFdHR3GFsFSjaCoZ0lzumoNJqYFJBKU2BWZMQr BAkM7HT7nF6KrL5oF8f6u00h5ElxmesRUVCVa/fFwGSWeUdlfvxBdaiwuGfqJjBjmgav dlw79YsCumqpZEFDaHmQ4/86M5K5wKbXzXsMY2iXOCa06+9Fx4IrrgiUhjOcZEqVgAPd 0Z7w== MIME-Version: 1.0 Received: by 10.224.185.16 with SMTP id cm16mr8853468qab.0.1330965728291; Mon, 05 Mar 2012 08:42:08 -0800 (PST) Received: by 10.224.194.202 with HTTP; Mon, 5 Mar 2012 08:42:08 -0800 (PST) In-Reply-To: References: Date: Mon, 5 Mar 2012 13:42:08 -0300 Message-ID: Subject: Re: Strategy for reliable _changes feed workers From: Gabriel de Oliveira Barbosa To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf302ef84a716cef04ba819b8c X-Virus-Checked: Checked by ClamAV on apache.org --20cf302ef84a716cef04ba819b8c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I made a related question in quora, but there's no replies. Em 5 de mar=E7o de 2012 13:23, Zachary Zolton esc= reveu: > Hi, > > I've enjoyed using _changes for non-critical functionality such as keepin= g > a user interface up-to-date, but it also seems like a nice paradigm for > background processing as well. > > For reliable background processing, my mind is inevitably drawn towards t= he > following questions: > > * What is the last sequence number processed? > * Have we already attempted to process this update? > * How many times have we failed this update failed? > > Unfortunately, this all sounds like global state, which makes me feel > un-relaxed. > > Now, you could help alleviate this by adding a work queue to your stack, > but it feels like CouchDB could handle this style of processing without i= t. > Also, someone program would have to then sit between the _changes feed an= d > my background processors, which seems like a bottleneck. > > How are you using the _changes feed for reliable background processing? > > > Cheers, > > Zach > --20cf302ef84a716cef04ba819b8c--