[
https://issues.apache.org/jira/browse/COUCHDB-1950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13837233#comment-13837233
]
Nathan Vander Wilt commented on COUCHDB-1950:
---------------------------------------------
The overall narrative is I'd like to be able to write apps that:
1. Can simply save data via a PUT request, since CouchDB has infrastructure for
*eventual* consistency anyway [COUCHDB-1948]
2. Then, when the nearly-inevitable replication and/or clustering–based
conflict arises, it'd be nice to have all the information necessary to do a
proper diff/merge [COUCHDB-1949]
3. Since we'd be embracing "write first, resolve conflicts later" it'd be nice
to centralize this resolution pattern by letting apps provide the requisite
custom logic in a design doc rather than making me handle it during a read or
via a background process [COUCHDB-1950]
Does that help? Maybe this is technically infeasible, but it is a system I want
and CouchDB seemed like the best person to ask.
> ddoc-based conflict resolution
> ------------------------------
>
> Key: COUCHDB-1950
> URL: https://issues.apache.org/jira/browse/COUCHDB-1950
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Nathan Vander Wilt
>
> This was discussed at CouchConf in Vancouver last month, but didn't see a
> hook here I could refer to in another conversation, so…
> It'd be great if a design document could include a conflict resolver
> function, in the vein of other "app logic" handler hooks like
> validate_doc_write. I imagine it would look something like either "function
> (currentWinner, nextWinningestLoser, parent)" (simply called multiple times
> if more than 2 leafs) or simply "function (arrayOfDocs, revisionHistor)" — if
> it returns a document, that's the winner, if not the next design document in
> line gets a pass at it. (Bonus: if it throws, the conflict stays no matter
> what other resolvers say?)
--
This message was sent by Atlassian JIRA
(v6.1#6144)