<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Initial push / pull — Bazaar 2.7.0 documentation</title> <link rel="stylesheet" href="_static/classic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/language_data.js"></script> <link rel="shortcut icon" href="_static/bzr.ico"/> <link rel="search" title="Search" href="search.html" /> <link rel="stylesheet" href="_static/bzr-doc.css" type="text/css" /> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li><a href="http://bazaar.canonical.com/"> <img src="_static/bzr icon 16.png" /> Home</a> | </li> <a href="http://doc.bazaar.canonical.com/en/">Documentation</a> | </li> <li class="nav-item nav-item-0"><a href="index.html">Developer Document Catalog (2.7.0)</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="initial-push-pull"> <h1>Initial push / pull<a class="headerlink" href="#initial-push-pull" title="Permalink to this headline">¶</a></h1> <div class="section" id="optimal-case"> <h2>Optimal case<a class="headerlink" href="#optimal-case" title="Permalink to this headline">¶</a></h2> <p>(a motivating example of ultimate performance) Assume there is a file with exactly the right data in compressed form. This may be a tarred branch, a bundle, or a blob format. Performance in this case scales with the size of the file.</p> </div> <div class="section" id="disk-case"> <h2>Disk case<a class="headerlink" href="#disk-case" title="Permalink to this headline">¶</a></h2> <p>Assume current repo format. Attempt to achieve parity with <code class="docutils literal notranslate"><span class="pre">cp</span> <span class="pre">-r</span></code>. Read each file only 1 time.</p> <ul class="simple"> <li>read knit graph for revisions</li> <li>write filtered copy of revision knit O(d+a)</li> <li>write filtered copy of knit index O(d)</li> <li>Open knit index for inventory</li> <li>Write a filtered copy of inventory knit and simultaneously not all referenced file-ids O(b+d)</li> <li>Write filtered copy of inventory knit index O(d)</li> <li>For each referenced file-id:<ul> <li>Open knit index for each file knit O(e)</li> <li>If acceptable threshold of irrelevant data hard-link O(f)</li> <li>Otherwise write filtered copy of text knit and simultaneously write the fulltext to tree transform O(h)</li> </ul> </li> <li>Write format markers O(1)</li> </ul> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">a:</th><td class="field-body">size of aggregate revision metadata</td> </tr> <tr class="field-even field"><th class="field-name">b:</th><td class="field-body">size of inventory changes for all revisions</td> </tr> <tr class="field-odd field"><th class="field-name">c:</th><td class="field-body">size of text changes for all files and all revisions (e * g)</td> </tr> <tr class="field-even field"><th class="field-name">d:</th><td class="field-body">number of relevant revisions</td> </tr> <tr class="field-odd field"><th class="field-name">e:</th><td class="field-body">number of relevant versioned files</td> </tr> <tr class="field-even field"><th class="field-name">f:</th><td class="field-body">size of the particular versioned file knit index</td> </tr> <tr class="field-odd field"><th class="field-name">g:</th><td class="field-body">size of the filtered versioned file knit</td> </tr> <tr class="field-even field"><th class="field-name">h:</th><td class="field-body">size of the versioned file fulltext</td> </tr> <tr class="field-odd field"><th class="field-name">i:</th><td class="field-body">size of the largest file fulltext</td> </tr> </tbody> </table> </div> <div class="section" id="smart-network-case"> <h2>Smart Network Case<a class="headerlink" href="#smart-network-case" title="Permalink to this headline">¶</a></h2> <div class="section" id="phase-1"> <h3>Phase 1<a class="headerlink" href="#phase-1" title="Permalink to this headline">¶</a></h3> <p>Push: ask if there is a repository, and if not, what formats are okay Pull: Nothing</p> </div> <div class="section" id="phase-2"> <h3>Phase 2<a class="headerlink" href="#phase-2" title="Permalink to this headline">¶</a></h3> <p>Push: send initial push command, streaming data in acceptable format, following disk case strategy Pull: receive initial pull command, specifying format</p> <p>Pull client complexity: O(a), memory cost O(1) Push client complexity: procesing and memory cost same as disk case</p> </div> </div> <div class="section" id="dumb-network-case"> <h2>Dumb Network Case<a class="headerlink" href="#dumb-network-case" title="Permalink to this headline">¶</a></h2> <p>Pull: same as disk case, but request all file knit indices at once and request al file knits at once. Push: same as disk case, but write all files at once.</p> </div> <div class="section" id="wants"> <h2>Wants<a class="headerlink" href="#wants" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>Read partial graph</li> <li>Read multiple segments of multiple files on HTTP and SFTP</li> <li>Write multiple files over SFTP</li> </ul> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Initial push / pull</a><ul> <li><a class="reference internal" href="#optimal-case">Optimal case</a></li> <li><a class="reference internal" href="#disk-case">Disk case</a></li> <li><a class="reference internal" href="#smart-network-case">Smart Network Case</a><ul> <li><a class="reference internal" href="#phase-1">Phase 1</a></li> <li><a class="reference internal" href="#phase-2">Phase 2</a></li> </ul> </li> <li><a class="reference internal" href="#dumb-network-case">Dumb Network Case</a></li> <li><a class="reference internal" href="#wants">Wants</a></li> </ul> </li> </ul> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/initial-push-pull.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <div class="searchformwrapper"> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li><a href="http://bazaar.canonical.com/"> <img src="_static/bzr icon 16.png" /> Home</a> | </li> <a href="http://doc.bazaar.canonical.com/en/">Documentation</a> | </li> <li class="nav-item nav-item-0"><a href="index.html">Developer Document Catalog (2.7.0)</a> »</li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2009-2011 Canonical Ltd. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4. </div> </body> </html>