couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <>
Subject using external to generate shortid ?
Date Mon, 13 Apr 2009 11:20:25 GMT

For some project I need to generate short ids/name used in database. I
created a quick external to send shortid on each call. External use an
empty doc['shortcode'] which is saved each time the external is called
thend send bac the rev stem b62encoded. I then use the shortid across

But I wonder if it's enough to be sure 2 doc don't have same short id
for a node. In fact how are handled externals ? Does couchdb open a
process each time external is called or does it reuse it ? Does
couchdb open one external / guest connected to the db ? I would prefer
to store the sort increment in couchdb so I could do backup easyly.
What could be the other way to create  a short id ?

- benoit

View raw message