Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 33719 invoked from network); 29 Jul 2009 21:04:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jul 2009 21:04:08 -0000 Received: (qmail 35798 invoked by uid 500); 29 Jul 2009 21:04:08 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 35719 invoked by uid 500); 29 Jul 2009 21:04:07 -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 35709 invoked by uid 99); 29 Jul 2009 21:04:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2009 21:04:07 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of awolff@gmail.com designates 74.125.92.25 as permitted sender) Received: from [74.125.92.25] (HELO qw-out-2122.google.com) (74.125.92.25) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2009 21:03:58 +0000 Received: by qw-out-2122.google.com with SMTP id 3so595179qwe.29 for ; Wed, 29 Jul 2009 14:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=L5n3YCcHxWPa/M/Mch1jABdhcuP03hUFA/mLWkmgm+A=; b=u5C0De1Q9tz1MKvNpfg5NzqSHKxP3Rj3PJcEjZ9DnhMR40vfTpzHlx4nqUu2Bed/An O05GgEez5dqdfRH1gkNgj+KvlkiSbmqloSRia0+zlzYSJQe6VTftXWHKMizMatHjiqko Q8lxj/gm1wTWXU5pbelDmvoBhzyULpO06Q6T8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=bN6PT6IJPCTw6t03Yw9hahKRxp/NCQDvknEf2TvrmSVAmkBf6zgS5Qf3D9SoOEXX4q 9j8ck24ysjZfgTe1nGvMdB/JCcxgohsrMXcehQe/3tnjr4H/PxEgdwnWOZ+tiXze7DvO JM5Q2FmVSUtgLyclhQJt8P3Ptcpv0J7pmIgSg= MIME-Version: 1.0 Received: by 10.229.90.207 with SMTP id j15mr65694qcm.5.1248901417099; Wed, 29 Jul 2009 14:03:37 -0700 (PDT) In-Reply-To: <55047b710907282033y6dd4624of96fd9b3fd90cc88@mail.gmail.com> References: <55047b710907282033y6dd4624of96fd9b3fd90cc88@mail.gmail.com> Date: Wed, 29 Jul 2009 14:03:37 -0700 Message-ID: Subject: Re: Unique human readable ID From: Adam Wolff To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=001636426cd55361d9046fde85cc X-Virus-Checked: Checked by ClamAV on apache.org --001636426cd55361d9046fde85cc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit We are handling this by generating 128 bit random numbers (same amount of data in a UUID) and then mapping them to 22 character strings, where the first two characters are hex and the next 20 are base 64 (using uppercase+lowercase+10 digits+"_"+"-" = 64 possible characters.)So 2^4 + 2^4 + 20 * 2^6 = 128 bits These could be trivially converted back to UUIDs. Not a lot better than 36 character UUIDs, but a little. A On Tue, Jul 28, 2009 at 8:33 PM, Nicholas Orr wrote: > I get the whole point of letting couchdb generate id's. > At the same time I need a way to create a human > memorable/readable/communicative id: > - ID: 45060, 45061, 45062, etc > That is a whole lot simpler to relay over a phone call compared to: > - 1d98d82f5b6a628527344ba991cb7e2f > > What have people done to satisfy the users of their systems with a simple > id > and also be able to replicate the documents between different couchdb > instances? > > I've come up with 2 ideas: > > # 1 > Have a single couchdb that has 50 documents (tickets) (figure out a way to > always have 50 available) in it like what is mentioned in the wiki to do > transactions[1] > > #2 > For each instance of the application prefix the id with it's instance id so > 1.45060 & 2.45060 have the same id but were created on different instances. > Therefore when the two instances of the couchdb's replicate with each other > there are two unique id's > I can see this adding a fair amount of overhead if it gets to the point of > more then a few instances... > > If I drop the requirement of replication everything becomes simple. Then I > have to wonder - why am I using CouchDB then?? > > Nick > > > [1] - > http://wiki.apache.org/couchdb/Frequently_asked_questions#transactions > --001636426cd55361d9046fde85cc--