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 B3EDB9D46 for ; Thu, 2 Feb 2012 14:45:37 +0000 (UTC) Received: (qmail 95199 invoked by uid 500); 2 Feb 2012 14:45:37 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 95134 invoked by uid 500); 2 Feb 2012 14:45:36 -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 95126 invoked by uid 99); 2 Feb 2012 14:45:36 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 14:45:36 +0000 Received: from localhost (HELO mail-iy0-f180.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 14:45:35 +0000 Received: by iabz7 with SMTP id z7so4422611iab.11 for ; Thu, 02 Feb 2012 06:45:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.236.73 with SMTP id us9mr12569334igc.16.1328193935302; Thu, 02 Feb 2012 06:45:35 -0800 (PST) Received: by 10.42.6.72 with HTTP; Thu, 2 Feb 2012 06:45:35 -0800 (PST) In-Reply-To: <4F2AA097.3020202@gmail.com> References: <4EE72C0E.4080704@googlemail.com> <20111214225204.GC11299@atypical.net> <20111215021017.GB25751@atypical.net> <4F2AA097.3020202@gmail.com> Date: Thu, 2 Feb 2012 09:45:35 -0500 Message-ID: Subject: Re: Unique instance IDs? From: Robert Newson To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ... 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 wrot= e: > For CouchDB, I think UUIDs are clearly the way to go. =A0After all, given= the > UUID, database, =A0and hostname, you can construct the desired URL direct= ly by > forming > =A0 =A0http://hostname:5984/database/UUID > As Noah points out, if you used this entire URL as the identifier (by whi= ch > I assume he means the _id field), then you would lose the ability to copy > the document elsewhere. =A0This would, of course, break replication > completely. > > Keeping the UUIDs as they are gives the best of both worlds. =A0Easy > 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 po= int > to each document. > > =A0 =A0-- 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 o= f >> 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 th= e >> web using that address. I might also want to put my cool essay on Dropbo= x, >> 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 o= f >> 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 tha= t >> 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 wh= en >> 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 >> >