incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svilen ...@svilendobrev.com>
Subject Re: any good way of filtering out your own _changes?
Date Wed, 03 Oct 2012 15:33:23 GMT
> > ah, and any way to automaticaly sequence items? Even if "eventual"
> > as in "eventual consistency"..

talking to myself, after some trials, neither _local_seq nor some
automade .seq gives decent results. The local_seq gives the order in
which changes happened to the local copy (made by me or imported via
replication. so something done yesterday elsewhere but coming just now
would have bigger _local_seq than my changes from today); the
me-made .seq gives only changes i did - but may duplicate, if 2
databases start a new and not knwo about each other, both would number
1,2,...

next option is to use local time as sequencer... as sort-of globaly
agreed increasing number that everyone is trying to be in sync with ..

or sequencing should be done only in one place - central server..

svil

> > ah, and any way to automaticaly sequence items? Even if "eventual"
> > as in "eventual consistency"..
> ?
> > Now i am putting a separate field for that ( =db.doc_count ) at each
> > update, but i dont like it..
> 
> Use either a view (look up complex keys on the wiki for example), or
> put it into the id of the doc:
> 
> 00001_the_other_id
> 00002_the_next_id
> 
> > there is _local_seq in the document API that returns the sequenceid
> > of the revision, but that is not accesible in views.. or actualy
> > now i see it can be made accessible by adding extra options in the
> > view definition. hmm i have to try that.
> 
> Seems like a better fit. A little more info on what you're trying to
> achieve might give us some better ideas.
> 
> A+
> Dave

Mime
View raw message