ah yes i also had the idea of summarizing all dbs into one just to
aggregate the _changes, and abandoned it.
For now i'm walking a set of databases and give them some
limited attention that handles changes. It very much looks like
web-framework routing and request-handling ;-) add some FSMs..
Was even thinking to setup it that way, and to have a dispatcher
kick proper urls according to database+message-type-and-state, i.e.
translating from stream of changes into stream of commands-as-urls
which would be plain http served..
svil
On Wed, 10 Oct 2012 10:42:27
+0100 Martin Higham wrote:
> We had a similar problem. Initially we had each database replicate
> appropriate documents (via a replication filter) to a queue database
> and just listened for changes to that. The resource overhead for this
> when most databases are dormant didn't make make sense. So we now
> have a custom handler that invokes some python whenever a PUT, PUSH
> or DELETE occur to a subset of databases. I've put this up on GitHub -
> https://github.com/ocastalabs/couchdb_task_handler.
>
> This handler is dependant on CouchDB including the document ID in the
> response headers which it currently doesn't so we had to make a small
> change to the CouchDB source. You can find this at
> https://github.com/ocastalabs/couchdb/tree/id_and_rev_in_response_headers.
> We've raised a Pull Request for this (
> https://github.com/apache/couchdb/pull/32) and it would be great to
> get it into 1.3
>
> Martin
>
>
>
> On 7 October 2012 11:37, svilen wrote:
>
> > no worries, not that in a hurry.
> > i'll put some workaround in the mean time..
> > still prototyping anyway.
> >
> > ciao
> > svil
> >
> > On Sun, 7 Oct 2012 12:18:29 +0200
> > Benoit Chesneau wrote:
> >
> > > On Sun, Oct 7, 2012 at 10:25 AM, svilen
> > > wrote:
> > > >> On 7 October 2012 07:59, svilen wrote:
> > > >> > g'day
> > > >> >
> > > >> > i'm going to have thousands of databases. They are all of
> > > >> > similar kind, but belong to different (groups of) users, so
> > > >> > can't be bundled into one. And setupping 10000 connections to
> > > >> > couchdb/dbXXXXX/_changes doesn't seem very neat, even if on
> > > >> > same machine.
> > > >
> > > > or maybe i can traverse all of them (i think i can figure out
> > > > the db names), paying them some limited attention each - e.g.
> > > > use short-poll with limit 10 changes.. poor-man's time-share
> > > > scheduler ;-)
> > > >
> > > > svil
> > >
> > > Well it will be costly, depending on the number of databases you
> > > have. If you need it fast you can use rcouch waiting that I port
> > > the code to couch. Can be done next week.
> > >
> > > - benoît
> >