Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 35422 invoked from network); 24 Dec 2010 15:27:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Dec 2010 15:27:59 -0000 Received: (qmail 29952 invoked by uid 500); 24 Dec 2010 15:27:58 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 29715 invoked by uid 500); 24 Dec 2010 15:27:57 -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 29707 invoked by uid 99); 24 Dec 2010 15:27:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 15:27:56 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cliffywills@aol.com designates 205.188.91.95 as permitted sender) Received: from [205.188.91.95] (HELO imr-db01.mx.aol.com) (205.188.91.95) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 15:27:46 +0000 Received: from mtaout-ma04.r1000.mx.aol.com (mtaout-ma04.r1000.mx.aol.com [172.29.41.4]) by imr-db01.mx.aol.com (8.14.1/8.14.1) with ESMTP id oBOFRMg1011004 for ; Fri, 24 Dec 2010 10:27:22 -0500 Received: from [10.0.0.10] (unknown [92.0.71.23]) by mtaout-ma04.r1000.mx.aol.com (MUA/Third Party Client Interface) with ESMTPA id B9AEBE0000BA for ; Fri, 24 Dec 2010 10:27:21 -0500 (EST) Message-ID: <4D14BBD6.9020809@aol.com> Date: Fri, 24 Dec 2010 15:27:18 +0000 From: Cliff Williams User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14pre) Gecko/20101217 Shredder/3.1.8pre MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: CouchDB _changes + continuous + Ajax References: <8937.34176.qm@web112110.mail.gq1.yahoo.com> In-Reply-To: <8937.34176.qm@web112110.mail.gq1.yahoo.com> Content-Type: multipart/alternative; boundary="------------080708080807050105070500" x-aol-global-disposition: G X-AOL-SCOLL-SCORE: 0:2:426996672:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d29044d14bbd93a05 X-AOL-IP: 92.0.71.23 X-Virus-Checked: Checked by ClamAV on apache.org --------------080708080807050105070500 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit N/A N/A I hope you are well and looking forward to Christmas I am not sure that I fully understand but are you querying using last sequence ? I use changesurl = "http://"+ host +":"+port.tostring+"/"+database+ "/_changes?feed=continuous&include_docs=true&heartbeat=10000 +"&since="+lastseq", I can let you have a copy of a skeleton node.js program that I use if you think that it would help. best regards cliff On 24/12/10 14:04, N/A N/A wrote: > Hi there, > > I am trying to use continuous changes of CouchDB + some java script. Using > couch.js, because it is nice and clean template for experiments i manage to > establish a connection to CouchDB and my webapp. Everything is working fine > except one thing. Because the socket is still open, my responseText in ajax is > just appending the JSON answers, so it is getting bigger and bigger and bigger. > With heartbeat of 100, memory usage is growing pretty fast. JSON data transfer > could be really high sometimes and dataloss is not an option for me. One > solution for me was just to use websocket + node.js(or similar). Or maybe to > split() the answer in array and when it reach certain length to reopen the > socket with current sequence of _changes. But this solution is not for my taste > and looks for me like a hack and not like solution. So, if someone is familiar > with continuous changes, is it possible to give me some advice how we can use > continuous changes + ajax without responseText getting so big? Any workaround ? > I prefer to not use websocket stuff(or something), because i prefer to keep > things clean and stick only with CouchDB. > > Thanks in advance > > > > --------------080708080807050105070500--