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 <[email protected]> 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. >> ------------------------------------------------------------------------ >> VPRO >> phone: +31(0)356712911 >> e-mail: [email protected] >> web: www.vpro.nl >> ------------------------------------------------------------------------ >
