incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Aimonetti <mattaimone...@gmail.com>
Subject Re: Unique human readable ID
Date Wed, 29 Jul 2009 03:54:13 GMT
>
> If I drop the requirement of replication everything becomes simple. Then I
> have to wonder - why am I using CouchDB then??
>

load balancing, backup, http api, caching, schemaless and probably many
other reasons ;)

I usually generate slugs when I need to use easy doc ids. You can add a
timestamp to your slugs, prepend them by your node id, verify their
uniqueness in your local DB etc...

It works great for me.

- Matt



On Tue, Jul 28, 2009 at 8:33 PM, Nicholas Orr <nicholas.orr@zxgen.net>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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message