diff --git a/docs/_static/style.css b/docs/_static/style.css index 610f221e..2ca15e1d 100644 --- a/docs/_static/style.css +++ b/docs/_static/style.css @@ -10,3 +10,43 @@ div.figure { div.body li { margin-bottom: 0.5em; } + + + +/* + * Setting :width; on an image causes Sphinx to turn the image into a link, so + * set :Class: instead. + */ +.mitogen-full-width { + width: 100%; +} + +.mitogen-right-150 { + float: right; + padding-left: 8px; + width: 150px; +} + +.mitogen-right-225 { + float: right; + padding-left: 8px; + width: 225px; +} + +.mitogen-right-275 { + float: right; + padding-left: 8px; + width: 275px; +} + +.mitogen-right-300 { + float: right; + padding-left: 8px; + width: 300px; +} + +.mitogen-right-350 { + float: right; + padding-left: 8px; + width: 350px; +} diff --git a/docs/ansible.rst b/docs/ansible.rst index 33c73d06..614f9cc8 100644 --- a/docs/ansible.rst +++ b/docs/ansible.rst @@ -1,6 +1,7 @@ -.. image:: images/ansible/cell_division.png - :align: right +.. image:: images/ansible/ansible_mitogen.svg + :class: mitogen-right-225 + Mitogen for Ansible =================== @@ -211,8 +212,8 @@ New Features & Notes Connection Delegation ~~~~~~~~~~~~~~~~~~~~~ -.. image:: images/jumpbox.png - :align: right +.. image:: images/jumpbox.svg + :class: mitogen-right-275 Included is a preview of **Connection Delegation**, a Mitogen-specific implementation of `stackable connection plug-ins`_. This enables connections @@ -959,12 +960,12 @@ Sample Profiles Local VM connection ~~~~~~~~~~~~~~~~~~~ -This demonstrates Mitogen vs. connection pipelining to a local VM, executing -the 100 simple repeated steps of ``run_hostname_100_times.yml`` from the -examples directory. Mitogen requires **43x less bandwidth and 4.25x less -time**. +This demonstrates Mitogen vs. connection pipelining to a local VM executing +``bench/loop-100-items.yml``, which simply executes ``hostname`` 100 times. +Mitogen requires **43x less bandwidth and 6.5x less time**. -.. image:: images/ansible/run_hostname_100_times.png +.. image:: images/ansible/run_hostname_100_times_mito.svg +.. image:: images/ansible/run_hostname_100_times_plain.svg Kathmandu to Paris diff --git a/docs/api.rst b/docs/api.rst index bfba1f77..5cd5f2af 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -71,8 +71,8 @@ mitogen.parent mitogen.fakessh --------------- -.. image:: images/fakessh.png - :align: right +.. image:: images/fakessh.svg + :class: mitogen-right-300 .. automodule:: mitogen.fakessh .. currentmodule:: mitogen.fakessh diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 20d1c2b3..020760bc 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -13,8 +13,8 @@ Liability Waiver Before proceeding, it is critical you understand what you're involving yourself and possibly your team and its successors with: -.. image:: images/pandora.jpg - :align: right +.. image:: images/pandora.svg + :class: mitogen-right-350 * Constructing the most fundamental class, :py:class:`Broker `, causes a new thread to be spawned, exposing a huge @@ -78,7 +78,9 @@ operate across machines and privilege domains: Broker And Router ----------------- -.. image:: images/layout.png +.. image:: images/layout.svg + :class: mitogen-full-width + .. currentmodule:: mitogen.core Execution starts when your program constructs a :py:class:`Broker` and diff --git a/docs/howitworks.rst b/docs/howitworks.rst index 65a6daee..1ff0af48 100644 --- a/docs/howitworks.rst +++ b/docs/howitworks.rst @@ -554,7 +554,8 @@ associated with that stream if the stream is disconnected for any reason. Example ####### -.. image:: images/context-tree.png +.. image:: images/context-tree.svg + :class: mitogen-full-width In the diagram, when ``node12b`` is creating the ``sudo:node12b:webapp`` context, it must send ``ADD_ROUTE`` messages to ``rack12``, which will @@ -572,7 +573,8 @@ When ``sudo:node22a:webapp`` wants to send a message to ``sudo:node22a:webapp -> node22a -> rack22 -> dc2 -> bastion -> dc1 -> rack12 -> node12b -> sudo:node12b:webapp`` -.. image:: images/route.png +.. image:: images/route.svg + :class: mitogen-full-width Disconnect Propagation diff --git a/docs/images/ansible/ansible_mitogen.svg b/docs/images/ansible/ansible_mitogen.svg new file mode 100644 index 00000000..922f1200 --- /dev/null +++ b/docs/images/ansible/ansible_mitogen.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/docs/images/ansible/cell_division.png b/docs/images/ansible/cell_division.png deleted file mode 100644 index 6f0df4ca..00000000 Binary files a/docs/images/ansible/cell_division.png and /dev/null differ diff --git a/docs/images/ansible/run_hostname_100_times.png b/docs/images/ansible/run_hostname_100_times.png deleted file mode 100644 index 00574a4b..00000000 Binary files a/docs/images/ansible/run_hostname_100_times.png and /dev/null differ diff --git a/docs/images/ansible/run_hostname_100_times_mito.svg b/docs/images/ansible/run_hostname_100_times_mito.svg new file mode 100644 index 00000000..53837ec9 --- /dev/null +++ b/docs/images/ansible/run_hostname_100_times_mito.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/ansible/run_hostname_100_times_plain.svg b/docs/images/ansible/run_hostname_100_times_plain.svg new file mode 100644 index 00000000..68cf8af3 --- /dev/null +++ b/docs/images/ansible/run_hostname_100_times_plain.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/async.png b/docs/images/async.png index c73c2888..fdbb74a0 100644 Binary files a/docs/images/async.png and b/docs/images/async.png differ diff --git a/docs/images/billing.png b/docs/images/billing.png deleted file mode 100644 index f919acc3..00000000 Binary files a/docs/images/billing.png and /dev/null differ diff --git a/docs/images/billing.svg b/docs/images/billing.svg new file mode 100644 index 00000000..abc09e22 --- /dev/null +++ b/docs/images/billing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/cell_division.png b/docs/images/cell_division.png deleted file mode 100644 index 067d5613..00000000 Binary files a/docs/images/cell_division.png and /dev/null differ diff --git a/docs/images/context-tree.png b/docs/images/context-tree.png deleted file mode 100644 index eb17ee8b..00000000 Binary files a/docs/images/context-tree.png and /dev/null differ diff --git a/docs/images/context-tree.svg b/docs/images/context-tree.svg new file mode 100644 index 00000000..9b39b8eb --- /dev/null +++ b/docs/images/context-tree.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/detached-subtree.png b/docs/images/detached-subtree.png deleted file mode 100644 index d8bb46df..00000000 Binary files a/docs/images/detached-subtree.png and /dev/null differ diff --git a/docs/images/detached-subtree.svg b/docs/images/detached-subtree.svg new file mode 100644 index 00000000..cb4add59 --- /dev/null +++ b/docs/images/detached-subtree.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/distribute2.png b/docs/images/distribute2.png index a738925d..36acf154 100644 Binary files a/docs/images/distribute2.png and b/docs/images/distribute2.png differ diff --git a/docs/images/fakessh.png b/docs/images/fakessh.png deleted file mode 100644 index d25b006b..00000000 Binary files a/docs/images/fakessh.png and /dev/null differ diff --git a/docs/images/fakessh.svg b/docs/images/fakessh.svg new file mode 100644 index 00000000..2b4a4c05 --- /dev/null +++ b/docs/images/fakessh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/jumpbox.png b/docs/images/jumpbox.png deleted file mode 100644 index 9ec1aec7..00000000 Binary files a/docs/images/jumpbox.png and /dev/null differ diff --git a/docs/images/jumpbox.svg b/docs/images/jumpbox.svg new file mode 100644 index 00000000..9c5138f0 --- /dev/null +++ b/docs/images/jumpbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/layout.png b/docs/images/layout.png deleted file mode 100644 index 2c4d9524..00000000 Binary files a/docs/images/layout.png and /dev/null differ diff --git a/docs/images/layout.svg b/docs/images/layout.svg new file mode 100644 index 00000000..83b4901f --- /dev/null +++ b/docs/images/layout.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/mitogen.svg b/docs/images/mitogen.svg new file mode 100644 index 00000000..29081f99 --- /dev/null +++ b/docs/images/mitogen.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/docs/images/pandora-orig.jpg b/docs/images/pandora-orig.jpg deleted file mode 100644 index 86deb6fc..00000000 Binary files a/docs/images/pandora-orig.jpg and /dev/null differ diff --git a/docs/images/pandora.jpg b/docs/images/pandora.jpg deleted file mode 100644 index b0d22f3c..00000000 Binary files a/docs/images/pandora.jpg and /dev/null differ diff --git a/docs/images/pandora.svg b/docs/images/pandora.svg new file mode 100644 index 00000000..3238d750 --- /dev/null +++ b/docs/images/pandora.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/docs/images/persistent.png b/docs/images/persistent.png deleted file mode 100644 index 5ca6cd4a..00000000 Binary files a/docs/images/persistent.png and /dev/null differ diff --git a/docs/images/persistent.svg b/docs/images/persistent.svg new file mode 100644 index 00000000..e059b070 --- /dev/null +++ b/docs/images/persistent.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/pipe.png b/docs/images/pipe.png index 3d674273..b842b447 100644 Binary files a/docs/images/pipe.png and b/docs/images/pipe.png differ diff --git a/docs/images/radiation.png b/docs/images/radiation.png deleted file mode 100644 index 3181a369..00000000 Binary files a/docs/images/radiation.png and /dev/null differ diff --git a/docs/images/route.png b/docs/images/route.png deleted file mode 100644 index d535f847..00000000 Binary files a/docs/images/route.png and /dev/null differ diff --git a/docs/images/route.svg b/docs/images/route.svg new file mode 100644 index 00000000..dc22063c --- /dev/null +++ b/docs/images/route.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/topogit.png b/docs/images/topogit.png index 2694f6de..551a0e3a 100644 Binary files a/docs/images/topogit.png and b/docs/images/topogit.png differ diff --git a/docs/index.rst b/docs/index.rst index e2a6d7af..6aff35aa 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,8 +12,8 @@ Mitogen is a Python library for writing distributed self-replicating programs. } -.. image:: images/cell_division.png - :align: right +.. image:: images/mitogen.svg + :class: mitogen-right-225 There is no requirement for installing packages, copying files around, writing shell snippets, upfront configuration, or providing any secondary link to a @@ -76,8 +76,8 @@ program's domain of control outward to other machines, enabling your program to **manipulate machines behind a firewall**, or enable its **data plane to cohere to your network topology**. -.. image:: images/billing.png - :align: right +.. image:: images/billing.svg + :class: mitogen-right-150 .. code:: @@ -158,8 +158,8 @@ Common sources of import latency and bandwidth consumption are mitigated: SSH Client Emulation #################### -.. image:: images/fakessh.png - :align: right +.. image:: images/fakessh.svg + :class: mitogen-right-300 Support is included for starting subprocesses with a modified environment, that cause their attempt to use SSH to be redirected back into the host program. In @@ -192,7 +192,8 @@ for example enforce an interactive TTY and account password. Message Routing ############### -.. image:: images/route.png +.. image:: images/route.svg + :class: mitogen-full-width Slaves may communicate autonomously without direct interaction with the master, allowing a wide variety of complex data and control flows to be expressed using @@ -230,7 +231,8 @@ uptime')** without further need to capture or manage output. Detached Subtrees ################# -.. image:: images/detached-subtree.png +.. image:: images/detached-subtree.svg + :class: mitogen-full-width Contexts may detach from and outlive the running program, while maintaining communication with descendents in their subtree. This enables persistent diff --git a/docs/svg-boxify.py b/docs/svg-boxify.py new file mode 100644 index 00000000..728b9241 --- /dev/null +++ b/docs/svg-boxify.py @@ -0,0 +1,13 @@ + +# Add viewBox attr to SVGs lacking it, so IE scales properly. + +import lxml.etree +import glob + + +for name in glob.glob('images/*.svg') + glob.glob('images/ansible/*.svg'): + doc = lxml.etree.parse(open(name)) + svg = doc.getroot() + if 'viewBox' not in svg.attrib: + svg.attrib['viewBox'] = '0 0 %(width)s %(height)s' % svg.attrib + open(name, 'w').write(lxml.etree.tostring(svg, xml_declaration=True, encoding='UTF-8'))