The Tree Lister sends a list of the client's files to the server, along with relevant information such as their modification times. At the same time, the Tree Differ generates a list of the server's files. As the client's list arrives from the Tree Lister, the Tree Differ compares it against its own list to determine which files need to be updated. Because both lists are generated in a particular order (alphabetical order, with a wrinkle or two), the Tree Differ can determine immediately as each file comes up in the list whether it is missing, extra, out of date, or up to date on the client--before the rest of the list has even been generated. The first three cases represent differences, i.e., things that need to be changed on the client. Each difference causes the Tree Differ to send a command to the client via the second communication channel in the diagram:
|Type of Difference||Command to File Detailer|
|Missing file on client||Add file|
|Extra file on client||Delete file|
|Out of date file on client||Update file|
The commands from the Tree Differ to the File Detailer represent files that need to be updated in some way on the client. Since for typical update runs most of the client's files will already be up to date, very few of these commands need to be sent.
The File Detailer is responsible for determining the most efficient way to update a given file, and sending the necessary information to the server. CVSup uses a variety of different updating algorithms that are tailored to different kinds of files. One kind of file that is handled particularly efficiently is RCS files. When the File Detailer recognizes that a file to be updated is an RCS file, it parses the file and sends a list of its deltas, symbolic tags, and administrative fields to the server. These arrive at the File Differ, which examines the server's version of the file and gathers the same information. By comparing the lists of deltas and tags (in much the same way as the Tree Differ compares lists of files), the File Differ determines which ones are missing from the client's version of the RCS file. It extracts just the missing pieces from its version of the file, and sends them to the client.
For other kinds of files, different updating methods are used. For example, CVSup detects log files, which change only by having data appended at the end. CVSup updates such files by sending only the new portion. For more general files, CVSup uses the rsync differential update algorithm of Andrew Tridgell and Paul Mackerras. Regardless of the update method chosen, the commands sent by the File Differ can be viewed as instructions to the client for editing its version of a file in order to make it identical to the server's version. The File Updater receives these commands and applies the edits to the client's files. By the time the entire process has finished, the client's collection of files has been made identical to the server's.
This architecture is a major improvement over the traditional way of updating files. First, at all times at least one client thread and one server thread are doing something useful. Neither side wastes any time waiting. Second, all communication between pairs of threads is strictly unidirectional. The five threads form a linear pipeline without cycles. No part of the system ever waits for a response to a command it has issued, because there literally are no responses. Consequently, the delay inflicted by the network is rendered irrelevant. Third, the network traffic is balanced. The volume of data sent by the client is comparable to that sent by the server. On a typical full-duplex link, this effectively doubles the usable bandwidth.