On Apr 23, 2010, at 8:52 AM, Miles Fidelman wrote: > Hi Folks, > > I've been thinking of putting together some kind of broadcast mechanism for > propagating updates - but I gather that there's pretty much no documentation > of the replication protocol other than what's in the code itself. > > I wonder if anybody has pulled together, in any form, either: > > - notes on the replication process (step-by-step, what happens when > replication is invoked - what code modules are involved and so forth), and/or,
couch_rep_* modules handle replication. How familiar are you with Erlang/OTP? couch_rep_sup is a supervisor for all replications, each of which has a couch_rep gen_server and changes_feed, missing_revs, reader, and writer processes. Each of those processes handles one part of the "conversation" on the slide I pointed out to you two days ago. Data flows from changes_feed -> missing_revs -> reader -> writer. > - an overview of the code for someone new to the project - what lives in what > modules, how they string together - anything that might shortcut having to > read through every module and make sense of things from scratch > > Anything - handwritten notes, slides from a code walkthrough, that kind of > thing. Hi Miles, not to sound critical, but I don't think such a broad request will get you very far. If you have specific questions I'll be happy to answer them. Please, take a shot at reading the code for the part you're interested in. If you come across something you don't understand, send an email or join #couchdb on IRC. Many of the devs hang out there regularly and can walk you through the code. Best, Adam > > Thanks very much, > > Miles Fidelman