Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2AD899922 for ; Thu, 2 Feb 2012 15:44:04 +0000 (UTC) Received: (qmail 46491 invoked by uid 500); 2 Feb 2012 15:44:03 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 46284 invoked by uid 500); 2 Feb 2012 15:44:02 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 46276 invoked by uid 99); 2 Feb 2012 15:44:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 15:44:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kevin.r.coombes@gmail.com designates 209.85.214.180 as permitted sender) Received: from [209.85.214.180] (HELO mail-tul01m020-f180.google.com) (209.85.214.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 15:43:54 +0000 Received: by obbuo19 with SMTP id uo19so3919204obb.11 for ; Thu, 02 Feb 2012 07:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ucZCShTDpDVEX7tcuw2awnIX7SRV3ixbwTg8PZXjwUU=; b=v7TYMY0URJONcqAESJboFEaUqjajVyGl+Ki86mLA0pPuze/H6GNbUp+ByNaBOgI8KW vezMkeRFn+3kXWGvjpkVLXq/A9/aFAMrkx+BbEZnZp78OoWk+JH+QUXKKtM14gjxppbE vMcDXF+Ny4nUecmCQodrZouenPOQMr2ghfRLY= Received: by 10.182.47.41 with SMTP id a9mr2977057obn.43.1328197413476; Thu, 02 Feb 2012 07:43:33 -0800 (PST) Received: from [10.105.35.136] ([143.111.22.28]) by mx.google.com with ESMTPS id g2sm3426253obw.7.2012.02.02.07.43.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Feb 2012 07:43:32 -0800 (PST) Message-ID: <4F2AAF24.9010907@gmail.com> Date: Thu, 02 Feb 2012 09:43:32 -0600 From: "Kevin R. Coombes" Organization: UT M.D. Anderson Cancer Center User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: dev@couchdb.apache.org CC: Robert Newson Subject: Re: Unique instance IDs? References: <4EE72C0E.4080704@googlemail.com> <20111214225204.GC11299@atypical.net> <20111215021017.GB25751@atypical.net> <4F2AA097.3020202@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I don't think it's such a slam-dunk, but maybe I'm guilty of a goal-tending violation. It depends on whether you intend to keep replicating the two copies to keep them synchronized. If you want that (and most of the time, I do), then I think it's an advantage to keep the same "UUID". The (matching) internal UUIDs indicates that you think of these two things as the same abstract entity. The full URL distinguishes the "physical" copies. If on the other hand, you expect the copies to evolve into something differently over time, then I can see how you might want different UUIDs. But again, the full, easy-to-construct URL distinguishes them. As far as I can tell, the existing system still lets you have it both ways.... On 2/2/2012 8:45 AM, Robert Newson wrote: > ... until you copy the database (and its uuid) and have two databases > with the same uuid. This has always been the slam-dunk argument > against database uuid's. > > B. > > On 2 February 2012 09:41, Kevin R. Coombes wrote: >> For CouchDB, I think UUIDs are clearly the way to go. After all, given the >> UUID, database, and hostname, you can construct the desired URL directly by >> forming >> http://hostname:5984/database/UUID >> As Noah points out, if you used this entire URL as the identifier (by which >> I assume he means the _id field), then you would lose the ability to copy >> the document elsewhere. This would, of course, break replication >> completely. >> >> Keeping the UUIDs as they are gives the best of both worlds. Easy >> replication, and (as long as the database is hosted at the same place) an >> easy way for humans and programs to construct stable URIs or URLs that point >> to each document. >> >> -- Kevin >> >> >> On 1/22/2012 12:44 PM, Noah Slater wrote: >>> Sorry to bump this old thread, but just going through my backlog. >>> >>> With regard to URLs, I think there is some confusion about the purpose of >>> a >>> URL here. >>> >>> If I write a a cool essay, say, and I stick that up at >>> nslater.org/my-cool-essay, then I can link to it from other places on the >>> web using that address. I might also want to put my cool essay on Dropbox, >>> or post it to Tumblr, or send it in an email. Now my cool essay has lots >>> of >>> URLs. Each one of them perfectly valid. I don't have to go and edit the >>> original copy at nslater.org/my-cool-essay, because I am making copies of >>> it. My cool essay is completely unaware of the URLs that are being used to >>> point to it. And it doesn't care that many URLs point to it. >>> >>> Yes, URLs can be used as identifiers. But when you do this, you tie the >>> thing you're naming to the place you're hosting it. Sometimes that is >>> useful, other times it will cripple you. There is nothing about URLs that >>> requires you to do this. I would hazard a guess that 99% of URLs are >>> de-coupled from the things they point to. WebArch is much more robust when >>> the identity of the object is de-coupled from the URL. Look at Atom, the >>> ID >>> element is supposed to be a URL, but they recommend a non-dereferencable >>> format, precisely to decouple posts from the location you happen to be >>> hosting them this month. >>> >>> Hey, if we're gonna use URLs, maybe we want to go down the same route? >>> >>> http://en.wikipedia.org/wiki/Tag_URI >>> >>> >>> At this point, I'm not sure what they buy us over UUIDs. >>> >>> Thoughts? >>> >>> Thanks, >>> >>> N >>>