From user-return-14163-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Dec 10 15:56:54 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 1715 invoked from network); 10 Dec 2010 15:56:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Dec 2010 15:56:54 -0000 Received: (qmail 54140 invoked by uid 500); 10 Dec 2010 15:56:52 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 53926 invoked by uid 500); 10 Dec 2010 15:56:52 -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 53913 invoked by uid 99); 10 Dec 2010 15:56:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Dec 2010 15:56:51 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of florian.leitner@gmail.com designates 209.85.213.52 as permitted sender) Received: from [209.85.213.52] (HELO mail-yw0-f52.google.com) (209.85.213.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Dec 2010 15:56:45 +0000 Received: by ywf9 with SMTP id 9so2331467ywf.11 for ; Fri, 10 Dec 2010 07:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=fCeBkJTfgI+5GiEpuWeikLhlxKHL+KWFt3cCXDL5Ao8=; b=NdUTZs+B6OXjuqGNSyBWsGQWoAizSNP3nrAGCvxy/muZdhaDQp0iroAFXe5AtBnkMP 6WGZ2Jbe2iHO5sHtDizi5tsdQ+1cDF6WzWa0quEMm4tWQWKU01FPzHGQtACecsXD/phN ahbVDhhs+5TbCJjBnUsLhvvpVxyVcJVrfjLAk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=odROCwCo63LIujskPxGRSCHXot5fqN2YXKLQbHhdgwM25bTGmX6pyz0AHsE1rjkoN9 gdbxTjSaUruBiNN6h+tZoKm1dNhu4YdFZw7iS8/fIu/wriA+na+7nIKq8WFzNIEi5q7J jCjF18GQqsyWhUjkOK3GLK/MK8QbeNfQzhhEQ= Received: by 10.231.10.193 with SMTP id q1mr584109ibq.53.1291996584065; Fri, 10 Dec 2010 07:56:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.25.138 with HTTP; Fri, 10 Dec 2010 07:56:02 -0800 (PST) In-Reply-To: <4D02041D.4040909@arcor.de> References: <4CD86A82.6040305@arcor.de> <4CFE7523.7000107@arcor.de> <834BF22B-91FA-45F5-96AF-EA4282F645ED@vpro.nl> <4D02041D.4040909@arcor.de> From: Florian Leitner Date: Fri, 10 Dec 2010 16:56:02 +0100 Message-ID: Subject: Re: LivelyCouch - a framework around CouchDB and Node.js To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Mirko, Pavel, Nils, Sorry for the double post - I answered the issues in my original post already, but in case you are only following this thread, here is what I wrote (plus I've added a question for Mirko - see below): I am completely aware of the fact that you can do replication and synchronization in CouchDB. Maybe I did not explain myself sufficiently: What I need to do is find a way to make CORS (Cross-Origin Resource Sharing) requests to websites that do not actually implement CORS (i.e., provide the CORS headers you have to add to your server responses) via an application that uses CouchDB as its permanent storage. By "coincidence", those requests could be sent to sites could even be sites running CouchDB and even my own application I will write, but that do not actually share any data (i.e., no CouchDB syncing/replication between the two sites). The only way to do that seems to use some "man-in-the-middle" webserver solution, or if CouchDB would provide some means to create a XHR (XmlHttpRequest) proxy, so you can work around that Single Origin Policy problem. So, if it were a "man-in-the-middle" solution by wrapping CouchDB with a web server (which seems the only way to go so far), it should ideally be as flexible as CouchDB itself or at the very least run on all three main desktop platfoms: Linux, Apple, and Windoze. The current solutions I have found so far not really work out: LivelyCouch & node.js does not work on Windoze (bummer, but I can understand the guys - its not their priority...). XULRunner/XULjet only works for desktop apps, so I realized it doesn't really solve my issue either, because you would have to create two interfaces: one for the server part serving web pages, based - for example - on LivelyCouch/node.js, and one for XULRunner/XULjet to make a desktop (client) app that can run on many different platforms. This is the closest I currently got to a solution, but it isn't optimal, because I will have to maintain _two_ interface libraries... @Mirko: I am also not 100% sure that with LivelyCouch you can actually forward a user (XHR) request to any other website, creating sort of a "cutomized" XHR proxy. Say, I present a form to a user to make a query, he POSTs that to LivelyCouch/node.js, that then POSTs that query to some URL and fetches and represents the results to the user. Next, if the user selects (GETs) a result, LivelyCouch/node.js GETs that resource from some URL, dumps it into the user's CouchDB, and presents that fetched resource to the user. Can you do that with LivelyCouch/node.js? I assume the answer is yes, but I just want to be sure. Regards, Florian On 10 December 2010 11:42, Mirko Kiefer wrote: > Florian, > I just discovered your earlier post. > In your scenario it in fact makes a lot of sense to me that you use > CouchDB's replication to push documents to the server and get them from > possibly other servers. You can do replication on a per document basis or= as > far as I know even use a filter function. > > Mirko > > On 12/10/10 10:53 AM, Nils Breunese wrote: >> >> Florian Leitner wrote: >> >>> As I never used node.js, I gave it a look just now - and found >>> something rather worrying with respect to my needs: node.js does not >>> support Windows (natively, only via Cygwin), and after checking their >>> mailing list, it seems the developers behind node.js are not planning >>> any support for it, either - and not even much for their "Cygwin >>> port". So, essentially, a LivelyCouch app can only run on Mac and >>> Linux, right? (Not that I like or even support Windoze, but I assume >>> many users of a desktop-based application using CouchDB will...) >> >> I haven't looked into LivelyCouch, but AFAIK node.js is a server-side >> thing, so I guess app end users can run whatever OS they like. If >> LivelyCouch is about using node.js on the client side of things, then I >> might be wrong. :o) >> >> Nils. >> ------------------------------------------------------------------------ >> =C2=A0VPRO >> =C2=A0phone: =C2=A0+31(0)356712911 >> =C2=A0e-mail: info@vpro.nl >> =C2=A0web: =C2=A0 =C2=A0www.vpro.nl >> ------------------------------------------------------------------------ >