views:

118

answers:

1

let's say i want to implement a distributed database (each node being the replica of the others); i hear that cdb is able to easily sync between two nodes and at least support some form of conflict resolution.

unfortunately i don't know couchdb therefore i have to ask: how's the situation for a "graph" of nodes? let's say we have a thousand disconnected nodes; therefore we'll have - i think - n-way conflicts.

can couchdb mechanisms help me in this case?

otherwise one should assume that a rigid hierarchy of nodes have to be established, and this can't suffice in my case.

thanks in advance ;)

+2  A: 

As far as I know CouchDB will keep all conflicting versions of a document on all nodes. Once you resolve the conflict on one node, it will be propagated to the others. The conflict resolution must be done by your application.

Read the conflict management chapter of the CouchDB book for details.

Zed
now I see, the default "resolution" algorithm is of course pretty generic (can't be any other way) on choosing the winner, and of course doesn't try any kind of merging. the algorithm is basically two-way and only the winner gets propagated. It's not that it's wrong and that I don't appreciate the clever choice, but I don't see how this cannot be done with acceptable effort without using couchdb. the whole couchdb technology package is very nice, btw; it looks amazingly intriguing ;). thanks.
Unknown