[ https://issues.apache.org/jira/browse/COUCHDB-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13780911#comment-13780911 ]
Jens Alfke commented on COUCHDB-1824: ------------------------------------- This document has a lot of grammatical errors; would you like a detailed proofreading list? Or actually it would make things easier if you put the document on the wiki where I could edit it. Technical issues: >1. Assign an unique identifier to the source Database. Most of the time it >will be the URI. No, that won't work. The identifier has to take into account other characteristics of the replication like the filter name and parameters, and the optional list of doc IDs to replicate. Otherwise multiple replications between the same two endpoints will collide and mess up each other's state. It's also a good idea for security to add in a randomized value that's only known to the local server, so the document ID isn't guessable by others (since there are no read or write access controls on _local documents.) >2. Save this identifier in a special Document named _local/<uniqueid> on the >Target database. "Save this identifier" is misleading. You don't save the identifier, you use the identifier as the document ID. What you save is the last remote sequence ID. Also, the checkpoint gets saved at both the source and target, and its contents need to match, to detect either database being rolled back to a backup, for instance. >3. Get the Source changes feed This is missing significant details that were in my document, like the use of style=all_docs (without which you can't find conflicting revisions.) >5. ... Also don't forget to get attachments that aren't already stored at the >target. Way too vague. See my doc for the details. >After the group of revision is stored on the Target Database, save the new >Checkpoint on the Source database. You need to describe _what_ to save in the checkpoint. >Even if some revisions have been ignored the sequence should be take in >consideration for the Checkpoint. I actually can't figure out what this sentence is trying to say. The grammar makes no sense. Also: * My note starting "Replication does not transfer obsolete revisions of documents, only the current ones..." is fairly significant and it would be good to add similar content to your version. * The reference to the TouchDB iOS wiki is obsolete; please change it to https://github.com/couchbase/couchbase-lite-ios/wiki/Replication-Algorithm . Thanks. > Official documentation of replication algorithm? > ------------------------------------------------ > > Key: COUCHDB-1824 > URL: https://issues.apache.org/jira/browse/COUCHDB-1824 > Project: CouchDB > Issue Type: Documentation > Components: Documentation > Reporter: Nathan Vander Wilt > Assignee: Alexander Shorin > Fix For: 1.5.0 > > > Though it's in some ways an internal detail, it might be nice to provide a > canonical description of CouchDB's replication protocol (algorithm, really) > in the documentation. See links at: > http://wiki.apache.org/couchdb/Replication#Protocol_Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira