From user-return-15255-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Mar 11 22:23:01 2011 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 83686 invoked from network); 11 Mar 2011 22:23:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Mar 2011 22:23:01 -0000 Received: (qmail 1954 invoked by uid 500); 11 Mar 2011 22:23:00 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 1925 invoked by uid 500); 11 Mar 2011 22:23:00 -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 1917 invoked by uid 99); 11 Mar 2011 22:22:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Mar 2011 22:22:59 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nborwankar@fastmail.fm designates 66.111.4.29 as permitted sender) Received: from [66.111.4.29] (HELO out5.smtp.messagingengine.com) (66.111.4.29) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Mar 2011 22:22:53 +0000 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 6859920AD3 for ; Fri, 11 Mar 2011 17:22:32 -0500 (EST) Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 11 Mar 2011 17:22:32 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=references:in-reply-to:mime-version:content-transfer-encoding:content-type:message-id:cc:from:subject:date:to; s=smtpout; bh=TFfQyGGCy/fFfShE+uWsqRo0r9o=; b=nqxyXhbC3NdCzZ09IhHhZOPNYmiimwxTdVMDrXZnZx/yoaZIxfcPCe2vmvoPumt35+gpRz66MSbKwDFg2mAfeFEZwKLHR1XGLwLKEsceFxkE3AzZyhmoYD1Lxatb+JNc3T32ZIIY21mtIbJNzPc7KpbxQoWDAh7jpzP2z81Pnms= X-Sasl-enc: 7V1b3msYwBBzJ7gO5NcntcFzA3P0APS82w9VPzyaK/gD 1299882149 Received: from [10.5.222.81] (unknown [166.205.138.135]) by mail.messagingengine.com (Postfix) with ESMTPSA id 667D2447CA7 for ; Fri, 11 Mar 2011 17:22:29 -0500 (EST) References: In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8C148a) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: Cc: "user@couchdb.apache.org" X-Mailer: iPhone Mail (8C148a) From: Nitin Borwankar Subject: Re: Online-Offline URL strategy Date: Fri, 11 Mar 2011 14:22:20 -0800 To: "user@couchdb.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org You may need to run a skeleton DNS server on localhost which understands you= r address allocations.=20 Nitin Sent from my mobile Internet device On Mar 11, 2011, at 2:10 PM, Joe Freeman wrote: > How about you just always send the user to the local instance if they > have couch installed by putting '127.0.0.1 app.com' in /etc/hosts (or > similar). Then you don't have to worry about the 'remote'/'local' > subdomain. Anyone that doesn't have couch installed (and hence doesn't > have the customised /etc/hosts) will get directed to the remote > instance. >=20 > The only problem is that users with couch installed locally won't be > able to access the remote couch directly (on the 'app.com' domain), > but if you can rely on couch syncing the databases, is this even a > problem? >=20 > (Obviously you can't setup the replication using the 'app.com' domain, > as the local instance would end up syncing with itself?) >=20 > Does that help? >=20 >=20 > On 10 March 2011 19:16, Ryan Ramage wrote: >> Ok, this maybe slightly off-topic for couch, but since it is the >> garden path couch has led me down for the design of my app, I am sure >> others here will have an opinion. >>=20 >>=20 >> Here is what I have: >> On a users machine, they have a local couch instance. It syncs up with >> a hosted couch. Here are some 'example urls' >>=20 >> http://local.app.com/db/doc >> http://remote.app.com/db/doc >>=20 >> (I have an A record dns entry local.app.com -> localhost) >>=20 >> Here is what I want: >> I want URLs that will failover to either the local or remote depending >> on what is available. >>=20 >>=20 >>=20 >> Situation 1. >> So lets say I am ROAMING with no inet connection. I open a word >> document on my local machine, which contains the link: >>=20 >> http://remote.app.com/db/doc >>=20 >> When I click on the link, would there be a way that it get redirected >> to http://local.app.com/db/doc >>=20 >>=20 >>=20 >>=20 >> Situation 2. >> Someone has emailed me a word doc, and I have no couch locally. I open >> a url in the doc: >>=20 >> http://local.app.com/db/doc >>=20 >> Since I have no couch locally, could they be redirected to >> http://remote.app.com/db/doc >>=20 >>=20 >>=20 >> Situation 3 >> So lets say I am ROAMING, BUT HAVE inet connection. I open a word >> document on my local machine, which contains the link: >>=20 >> http://remote.app.com/db/doc >>=20 >> When I click on the link, would there be a way that it get redirected >> to http://local.app.com/db/doc >> This way the fastest copy will be used. >>=20 >>=20 >> My Initial idea (untested) >> I was thinking about having the following DNS entries: >>=20 >> local.app.com IN A localhost 300s (5m) >> local.app.com IN A 74.74.74.74 300s (5m) >> remote.app.com IN A 74.74.74.74 300s (5m) >> remote.app.com IN A localhost 300s (5m) >>=20 >>=20 >> Would that even work? I am not sure how a browser (or other client) >> takes the order or A records. Also, when offline, and no real dns is >> available, would there be a cached copy so at least >> it would resolve to localhost? >>=20 >> So the discussion is about keeping, nice, world friendly URLs that >> might please Tim Berners-Lee, and also having the local/remote copies. >>=20 >> Any thoughts? >> Ryan >>=20