sources for execnet-overview.html [rev. unknown]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>[execnet-overview] </title>
    <meta content="text/html;charset=ISO-8859-1" name="Content-Type"/>
    <link href="../style.css" media="screen" rel="stylesheet" type="text/css"/></head>
  <body>
    <div><a href="http://codespeak.net"><img alt="py lib" height="114" id="pyimg" src="http://codespeak.net/img/pylib.png" width="154"/></a></div>
    <div id="metaspace">
      <div class="project_title">[execnet-overview] </div>
      <div id="menubar"><a class="menu" href="../index.html">index</a> <a class="menu" href="../../../apigen/api/index.html">api</a> <a class="menu" href="../../../apigen/source/index.html">source</a> <a class="menu" href="../contact.html">contact</a> <a class="menu" href="../download.html">download</a></div></div>
    <div id="contentspace">
      <div id="docinfoline">
        <div style="float: right; font-style: italic;"> </div></div>
<div class="document" id="py-execnet-simple-ad-hoc-networking">
<h1 class="title">py.execnet - simple ad-hoc networking</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Authors:</th>
<td>Holger Krekel
<br />merlinux GmbH</td></tr>
<tr><th class="docinfo-name">Date:</th>
<td>13th March 2006</td></tr>
</tbody>
</table>
<!-- Definitions of interpreted text roles (classes) for S5/HTML data. -->
<!-- This data file has been placed in the public domain. -->
<!-- Colours
======= -->
<!-- Text Sizes
========== -->
<!-- Display in Slides (Presentation Mode) Only
========================================== -->
<!-- Display in Outline Mode Only
============================ -->
<!-- Display in Print Only
===================== -->
<!-- Incremental Display
=================== -->
<div class="section">
<h1><a id="remote-method-invocation-is-cumbersome" name="remote-method-invocation-is-cumbersome">remote method invocation is cumbersome</a></h1>
<ul class="simple">
<li>CORBA/RMI/SOAP model is cumbersome</li>
<li>&quot;infection&quot; with object references throughout your program</li>
<li>need to define interfaces, generate stubs/skeletons</li>
<li>need to start server processes ahead of time</li>
<li>complicates programming</li>
</ul>
</div>
<div class="section">
<h1><a id="what-you-want-of-ad-hoc-networks" name="what-you-want-of-ad-hoc-networks">what you want of ad-hoc networks</a></h1>
<ul class="simple">
<li>ad hoc <strong>local protocols</strong></li>
<li>avoid defining and maintaining global interfaces</li>
<li>deploy protocols purely from the client side</li>
<li>zero installation required on server side</li>
</ul>
</div>
<div class="section">
<h1><a id="py-execnet-model-of-ad-hoc-networks" name="py-execnet-model-of-ad-hoc-networks">py.execnet model of ad-hoc networks</a></h1>
<ul class="simple">
<li><em>Gateways</em> can be setup via e.g. SSH logins or via Popen</li>
<li><em>Gateway.remote_exec</em> allows execution of arbitrary code</li>
<li>means of communication between the two sides: <em>Channels</em>
(with send &amp; receive methods)</li>
<li>example requirements: ssh login + python installed</li>
</ul>
</div>
<div class="section">
<h1><a id="py-execnet-sshgateway-example" name="py-execnet-sshgateway-example">py.execnet.SshGateway example</a></h1>
<p>interactive:</p>
<pre class="literal-block">
gw = py.execnet.SshGateway('codespeak.net')

channel = gw.remote_exec(&quot;&quot;&quot;
    for filename in channel:
        try:
            content = open(filename).read()
        except (OSError, IOError):
            content = None
        channel.send(content)
&quot;&quot;&quot;)
</pre>
</div>
<div class="section">
<h1><a id="next-steps-references" name="next-steps-references">next steps / references</a></h1>
<ul>
<li><p class="first">ad-hoc p2p networks</p>
</li>
<li><p class="first">chaining channels / passing channels around</p>
</li>
<li><p class="first">ensure it also works nicely on win32</p>
</li>
<li><p class="first">btw, py.execnet is part of the py lib</p>
<blockquote>
<p><a class="reference" href="http://codespeak.net/py/">http://codespeak.net/py/</a></p>
</blockquote>
</li>
</ul>
</div>
</div>
<div class="footer">
<hr class="footer" />
Holger Krekel (merlinux) &#8226; 13th March 2006
</div>
</div></body></html>