Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > c3732731228538f6126cae930c10ad71 > files > 192

python-pyro4-4.21-3.mga4.noarch.rpm



<!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="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Intro and Example &mdash; Pyro 4.21 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '4.21',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </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>
    <link rel="top" title="Pyro 4.21 documentation" href="index.html" />
    <link rel="next" title="Installing Pyro" href="install.html" />
    <link rel="prev" title="Pyro - Python Remote Objects - 4.21" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="install.html" title="Installing Pyro"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Pyro - Python Remote Objects - 4.21"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Pyro 4.21 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="intro-and-example">
<h1>Intro and Example<a class="headerlink" href="#intro-and-example" title="Permalink to this headline">¶</a></h1>
<img alt="_images/pyro-large.png" class="align-center" src="_images/pyro-large.png" />
<p>This chapter contains a little overview of Pyro&#8217;s features and a simple example to show how it looks like.</p>
<div class="section" id="about-pyro-feature-overview">
<h2>About Pyro: feature overview<a class="headerlink" href="#about-pyro-feature-overview" title="Permalink to this headline">¶</a></h2>
<p>Pyro is a library that enables you to build applications in which
objects can talk to each other over the network, with minimal programming effort.
You can just use normal Python method calls, with almost every possible parameter
and return value type, and Pyro takes care of locating the right object on the right
computer to execute the method. It is designed to be very easy to use, and to
generally stay out of your way. But it also provides a set of powerful features that
enables you to build distributed applications rapidly and effortlessly.
Pyro is written in <strong>100% pure Python</strong> and therefore runs on many platforms and Python versions,
<strong>including Python 3.x</strong>.</p>
<p>Here&#8217;s a quick overview of Pyro&#8217;s features:</p>
<ul class="simple">
<li>written in 100% Python so extremely portable.</li>
<li>defaults to a safe serializer (<a class="reference external" href="https://pypi.python.org/pypi/serpent">serpent</a>) that supports many Python data types.</li>
<li>supports different serializers (serpent, json, marshal, pickle).</li>
<li>support for all Python data types that are pickleable when using the &#8216;pickle&#8217; serializer.</li>
<li>runs on normal Python 2.x, Python <strong>3.x</strong>, IronPython, Jython 2.7, Pypy.</li>
<li>works between systems on different architectures and operating systems (64-bit, 32-bit, Intel, PowerPC...)</li>
<li>designed to be very easy to use and get out of your way as much as possible.</li>
<li>name server that keeps track of your object&#8217;s actual locations so you can move them around transparently.</li>
<li>support for automatic reconnection to servers in case of interruptions.</li>
<li>automatic proxy-ing of Pyro objects which means you can return references to remote objects just as if it were normal objects.</li>
<li>one-way invocations for enhanced performance.</li>
<li>batched invocations for greatly enhanced performance of many calls on the same object.</li>
<li>you can define timeouts on network communications to prevent a call blocking forever if there&#8217;s something wrong.</li>
<li>asynchronous invocations if you want to get the results &#8216;at some later moment in time&#8217;. Pyro will take care of gathering the result values in the background.</li>
<li>remote exceptions will be raised in the caller, as if they were local. You can extract detailed remote traceback information.</li>
<li>stable network communication code that works reliably on many platforms.</li>
<li>possibility to use Pyro&#8217;s own event loop, or integrate it into your own (or third party) event loop.</li>
<li>many simple examples included to show various features and techniques.</li>
<li>large amount of unit tests and high test coverage.</li>
<li>built upon more than 10 years of existing Pyro history.</li>
<li>can use IPv4, IPv6 and Unix domain sockets</li>
</ul>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">When configured to use the <tt class="xref py py-mod docutils literal"><span class="pre">pickle</span></tt> serializer, your system may be vulnerable
because of the sercurity risks of the pickle protocol (possibility of arbitrary
code execution).
Pyro does have some security measures in place to mitigate this risk somewhat.
They are described in the <a class="reference internal" href="security.html"><em>Security</em></a> chapter. It is strongly advised to read it.
By default, Pyro is configured to use a different serializer, so you won&#8217;t have
to deal with this unless you change it explicitly.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Pyro will send the whole object graph you&#8217;re passing over the wire, even when only a tiny fraction
of it is used on the receiving end. Be aware of this: it may be necessary to define special objects
for your Pyro interfaces that hold the data you need, rather than passing a huge object structure.</p>
</div>
<div class="section" id="pyro-s-history">
<h3>Pyro&#8217;s history<a class="headerlink" href="#pyro-s-history" title="Permalink to this headline">¶</a></h3>
<p>Pyro was started in 1998, more than ten years ago, when remote method invocation technology such as Java&#8217;s RMI
and CORBA were quite popular. I wanted something like that in Python and there was nothing available, so I decided
to write my own. Over the years it slowly gained features till it reached version 3.10 or so.
At that point it was clear that the code base had become quite ancient and couldn&#8217;t reliably support any new features,
so Pyro4 was born in early 2010, written from scratch. After a couple of versions Pyro4 became stable enough to be considered
the new &#8216;main&#8217; Pyro version to be preferred over Pyro 3.x (unless you have specific requirements that force you
to stick with Pyro3). See <a class="reference internal" href="upgrading.html"><em>Upgrading from Pyro 3</em></a> for more information on the different versions and how to upgrade old code to Pyro4.</p>
<p><tt class="docutils literal"><span class="pre">Pyro</span></tt> is the package name of the older, 3.x version of Pyro.
<tt class="docutils literal"><span class="pre">Pyro4</span></tt> is the package name of the new, current version. Its API and behavior is similar to Pyro 3.x but it is not
backwards compatible. So to avoid conflicts, this new version has a different package name.</p>
<p>If you&#8217;re interested in the old version, here is <a class="reference external" href="http://irmen.home.xs4all.nl/pyro3/">its homepage</a>
and it is also <a class="reference external" href="http://pypi.python.org/pypi/Pyro/">available on PyPi</a>.</p>
</div>
</div>
<div class="section" id="what-can-you-use-it-for">
<h2>What can you use it for?<a class="headerlink" href="#what-can-you-use-it-for" title="Permalink to this headline">¶</a></h2>
<p>Essentially, Pyro can be used to distribute various kinds of resources or responsibilities:
computational (hardware) resources (cpu, storage, printers),
informational resources (data, privileged information)
and business logic (departments, domains).</p>
<p>An example would be a high performance compute cluster with a large storage system attached to it.
Usually such a beast is not be accessible directly, rather, smaller systems connect to it and
feed it with jobs that need to run on the big cluster. Later, they collect the results.
Pyro could be used to expose the available resources on the cluster to other computers.
Their client software connects to the cluster and calls the Python program there to perform its
heavy duty work, and collect the results (either directly from a method call return value,
or perhaps via asynchronous callbacks).</p>
<p>Remote controlling resources or other programs is a nice application as well.
For instance, you could write a simple
remote controller for your media server that is running on a machine somewhere in a closet.
A simple remote control client program could be used to instruct the media server
to play music, switch playlists, etc.</p>
<p>Another example is the use of Pyro to implement a form of <a class="reference external" href="http://en.wikipedia.org/wiki/Privilege_separation">privilege separation</a>.
There is a small component running with higher privileges, but just able to execute the few tasks (and nothing else)
that require those higher privileges. That component could expose one or more Pyro objects
that represent the privileged information or logic.
Other programs running with normal privileges can talk to those Pyro objects to
perform those specific tasks with higher privileges in a controlled manner.</p>
<p>On a lower level Pyro is just a form of inter-process communication. So everywhere you would otherwise have
used a more primitive form of IPC (such as plain TCP/IP sockets) between Python components, you could consider to use
Pyro instead.</p>
<p>Have a look at the <tt class="file docutils literal"><span class="pre">examples</span></tt> directory in the source archive, perhaps one of the many example
programs in there gives even more inspiration of possibilities.</p>
</div>
<div class="section" id="simple-example">
<h2>Simple Example<a class="headerlink" href="#simple-example" title="Permalink to this headline">¶</a></h2>
<p>This example will show you in a nutshell what it&#8217;s like to use Pyro in your programs.
A much more extensive introduction is found in the <a class="reference internal" href="tutorials.html"><em>Tutorial</em></a>.</p>
<p>We&#8217;re going to write a simple greeting service that will return a personalized greeting message to its callers.</p>
<p>Let&#8217;s start by just writing it in normal Python first (create two files):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># save this as greeting.py</span>
<span class="k">class</span> <span class="nc">GreetingMaker</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">get_fortune</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
        <span class="k">return</span> <span class="s">&quot;Hello, {0}. Here is your fortune message:</span><span class="se">\n</span><span class="s">&quot;</span> \
               <span class="s">&quot;Behold the warranty -- the bold print giveth and the fine print taketh away.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># save this as client.py</span>
<span class="kn">import</span> <span class="nn">greeting</span>
<span class="n">name</span><span class="o">=</span><span class="nb">raw_input</span><span class="p">(</span><span class="s">&quot;What is your name? &quot;</span><span class="p">)</span>
<span class="n">greeting_maker</span><span class="o">=</span><span class="n">greeting</span><span class="o">.</span><span class="n">GreetingMaker</span><span class="p">()</span>
<span class="k">print</span> <span class="n">greeting_maker</span><span class="o">.</span><span class="n">get_fortune</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
</pre></div>
</div>
<p>If you then run it with <strong class="command">python client.py</strong> a session looks like this:</p>
<div class="highlight-python"><pre>$ python client.py
What is your name? Irmen
Hello, Irmen. Here is your fortune message:
Behold the warranty -- the bold print giveth and the fine print taketh away.</pre>
</div>
<p>Right that works like a charm but we are now going to use Pyro to make this into a greeting server that you
can access easily from anywhere. The <tt class="file docutils literal"><span class="pre">greeting.py</span></tt> is going to be our server. We&#8217;ll need to import the
Pyro package, start up a Pyro daemon (server) and connect a GreetingMaker object to it:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># saved as greeting.py</span>
<span class="kn">import</span> <span class="nn">Pyro4</span>

<span class="k">class</span> <span class="nc">GreetingMaker</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">get_fortune</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
        <span class="k">return</span> <span class="s">&quot;Hello, {0}. Here is your fortune message:</span><span class="se">\n</span><span class="s">&quot;</span> \
               <span class="s">&quot;Behold the warranty -- the bold print giveth and the fine print taketh away.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>

<span class="n">greeting_maker</span><span class="o">=</span><span class="n">GreetingMaker</span><span class="p">()</span>

<span class="n">daemon</span><span class="o">=</span><span class="n">Pyro4</span><span class="o">.</span><span class="n">Daemon</span><span class="p">()</span>                 <span class="c"># make a Pyro daemon</span>
<span class="n">uri</span><span class="o">=</span><span class="n">daemon</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">greeting_maker</span><span class="p">)</span>   <span class="c"># register the greeting object as a Pyro object</span>

<span class="k">print</span> <span class="s">&quot;Ready. Object uri =&quot;</span><span class="p">,</span> <span class="n">uri</span>      <span class="c"># print the uri so we can use it in the client later</span>
<span class="n">daemon</span><span class="o">.</span><span class="n">requestLoop</span><span class="p">()</span>                  <span class="c"># start the event loop of the server to wait for calls</span>
</pre></div>
</div>
<p>And now all that is left is a tiny piece of code that invokes the server from somewhere:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># saved as client.py</span>
<span class="kn">import</span> <span class="nn">Pyro4</span>

<span class="n">uri</span><span class="o">=</span><span class="nb">raw_input</span><span class="p">(</span><span class="s">&quot;What is the Pyro uri of the greeting object? &quot;</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
<span class="n">name</span><span class="o">=</span><span class="nb">raw_input</span><span class="p">(</span><span class="s">&quot;What is your name? &quot;</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>

<span class="n">greeting_maker</span><span class="o">=</span><span class="n">Pyro4</span><span class="o">.</span><span class="n">Proxy</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span>          <span class="c"># get a Pyro proxy to the greeting object</span>
<span class="k">print</span> <span class="n">greeting_maker</span><span class="o">.</span><span class="n">get_fortune</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>   <span class="c"># call method normally</span>
</pre></div>
</div>
<p>Open a console window and start the greeting server:</p>
<div class="highlight-python"><pre>$ python greeting.py
Ready. Object uri = PYRO:obj_edb9e53007ce4713b371d0dc6a177955@localhost:51681</pre>
</div>
<p>(The uri is randomly generated) Open another console window and start the client program:</p>
<div class="highlight-python"><pre>$ python client.py
What is the Pyro uri of the greeting object?  &lt;&lt;paste the printed uri from the server&gt;&gt;
What is your name?  &lt;&lt;type your name, Irmen in this example&gt;&gt;
Hello, Irmen. Here is your fortune message:
Behold the warranty -- the bold print giveth and the fine print taketh away.</pre>
</div>
<p>This covers the most basic use of Pyro! As you can see, all there is to it is starting a daemon,
registering one or more objects with it, and getting a proxy to these objects to call methods on
as if it was the actual object itself.</p>
<div class="section" id="with-a-name-server">
<h3>With a name server<a class="headerlink" href="#with-a-name-server" title="Permalink to this headline">¶</a></h3>
<p>While the example above works, it could become tiresome to work with object uris like that.
There&#8217;s already a big issue, <em>how is the client supposed to get the uri, if we&#8217;re not copy-pasting it?</em>
Thankfully Pyro provides a <em>name server</em> that works like an automatic phone book.
You can name your objects using logical names and use the name server to search for the
corresponding uri.</p>
<p>We&#8217;ll have to modify a few lines in <tt class="file docutils literal"><span class="pre">greeting.py</span></tt> to make it register the object in the name server:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># saved as greeting.py</span>
<span class="kn">import</span> <span class="nn">Pyro4</span>

<span class="k">class</span> <span class="nc">GreetingMaker</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">get_fortune</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
        <span class="k">return</span> <span class="s">&quot;Hello, {0}. Here is your fortune message:</span><span class="se">\n</span><span class="s">&quot;</span> \
               <span class="s">&quot;Tomorrow&#39;s lucky number is 12345678.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>

<span class="n">greeting_maker</span><span class="o">=</span><span class="n">GreetingMaker</span><span class="p">()</span>

<span class="n">daemon</span><span class="o">=</span><span class="n">Pyro4</span><span class="o">.</span><span class="n">Daemon</span><span class="p">()</span>                 <span class="c"># make a Pyro daemon</span>
<span class="n">ns</span><span class="o">=</span><span class="n">Pyro4</span><span class="o">.</span><span class="n">locateNS</span><span class="p">()</span>                   <span class="c"># find the name server</span>
<span class="n">uri</span><span class="o">=</span><span class="n">daemon</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">greeting_maker</span><span class="p">)</span>   <span class="c"># register the greeting object as a Pyro object</span>
<span class="n">ns</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="s">&quot;example.greeting&quot;</span><span class="p">,</span> <span class="n">uri</span><span class="p">)</span>  <span class="c"># register the object with a name in the name server</span>

<span class="k">print</span> <span class="s">&quot;Ready.&quot;</span>
<span class="n">daemon</span><span class="o">.</span><span class="n">requestLoop</span><span class="p">()</span>                  <span class="c"># start the event loop of the server to wait for calls</span>
</pre></div>
</div>
<p>The <tt class="file docutils literal"><span class="pre">client.py</span></tt> is actually simpler now because we can use the name server to find the object:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># saved as client.py</span>
<span class="kn">import</span> <span class="nn">Pyro4</span>

<span class="n">name</span><span class="o">=</span><span class="nb">raw_input</span><span class="p">(</span><span class="s">&quot;What is your name? &quot;</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>

<span class="n">greeting_maker</span><span class="o">=</span><span class="n">Pyro4</span><span class="o">.</span><span class="n">Proxy</span><span class="p">(</span><span class="s">&quot;PYRONAME:example.greeting&quot;</span><span class="p">)</span>    <span class="c"># use name server object lookup uri shortcut</span>
<span class="k">print</span> <span class="n">greeting_maker</span><span class="o">.</span><span class="n">get_fortune</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
</pre></div>
</div>
<p>The program now needs a Pyro name server that is running. You can start one by typing the
following command: <strong class="command">python -m Pyro4.naming</strong> in a separate console window
(usually there is just <em>one</em> name server running in your network).
After that, start the server and client as before.
There&#8217;s no need to copy-paste the object uri in the client any longer, it will &#8216;discover&#8217;
the server automatically, based on the object name (<tt class="kbd docutils literal"><span class="pre">example.greeting</span></tt>).
If you want you can check that this name is indeed known in the name server, by typing
the command <strong class="command">python -m Pyro4.nsc list</strong>, which will produce:</p>
<div class="highlight-python"><pre>$ python -m Pyro4.nsc list
--------START LIST
Pyro.NameServer --&gt; PYRO:Pyro.NameServer@localhost:9090
example.greeting --&gt; PYRO:obj_663a31d2dde54b00bfe52ec2557d4f4f@localhost:51707
--------END LIST</pre>
</div>
<p>(Once again the uri for our object will be random)
This concludes this simple Pyro example.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In the source archive there is a directory <tt class="file docutils literal"><span class="pre">examples</span></tt> that contains a truckload
of example programs that show the various features of Pyro. If you&#8217;re interested in them
(it is highly recommended to be so!) you will have to download the Pyro distribution archive.
Installing Pyro only provides the library modules. For more information, see <a class="reference internal" href="config.html"><em>Configuring Pyro</em></a>.</p>
</div>
</div>
<div class="section" id="other-means-of-creating-connections">
<h3>Other means of creating connections<a class="headerlink" href="#other-means-of-creating-connections" title="Permalink to this headline">¶</a></h3>
<p>The example above showed two of the basic ways to set up connections between your client and server code.
There are various other options, have a look at the client code details: <a class="reference internal" href="clientcode.html#object-discovery"><em>Object discovery</em></a>
and the server code details: <a class="reference internal" href="servercode.html#publish-objects"><em>Pyro Daemon: publishing Pyro objects</em></a>. The use of the name server is optional, see
<a class="reference internal" href="nameserver.html#name-server"><em>Name Server</em></a> for details.</p>
</div>
</div>
<div class="section" id="performance">
<h2>Performance<a class="headerlink" href="#performance" title="Permalink to this headline">¶</a></h2>
<p>Pyro4 is really fast at what it does. This is due to its low overhead and optional use of native Python serialization (pickle).
Here are some measurements done between two processes running on a Core 2 Duo 3Ghz, Windows 7 machine.</p>
<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" colspan="2">benchmark/connections.py:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><div class="first line-block">
<div class="line">2000 connections in 1.139 sec = 1756 conn/sec</div>
<div class="line">2000 new proxy calls in 1.451 sec = 1378 calls/sec</div>
<div class="line">10000 calls in 1.058 sec = 9452 calls/sec</div>
</div>
</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">benchmark/client.py:</th></tr>
<tr class="field-even field"><td>&nbsp;</td><td class="field-body"><div class="first line-block">
<div class="line">total time 1.761 seconds</div>
<div class="line">total method calls: 15000</div>
<div class="line">avg. time per method call: 0.117 msec (8517/sec)</div>
</div>
</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">hugetransfer/client.py:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><div class="first line-block">
<div class="line">It took 0.48 seconds to transfer 51269 kilobyte.</div>
<div class="line">That is 106148 k/sec. = 103.7 mb/sec.</div>
</div>
</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">batchedcalls/client.py:</th></tr>
<tr class="field-even field"><td>&nbsp;</td><td class="field-body"><div class="first line-block">
<div class="line">Batched remote calls...</div>
<div class="line">processing the results...</div>
<div class="line">total time taken 0.29 seconds (136500 calls/sec)</div>
<div class="line">batched calls were 14.1 times faster than normal remote calls</div>
</div>
<div class="last line-block">
<div class="line">Oneway batched remote calls...</div>
<div class="line">executing batch, there will be no result values. Check server to see printed messages...</div>
<div class="line">total time taken 0.19 seconds (215000 calls/sec)</div>
<div class="line">oneway batched calls were 22.2 times faster than normal remote calls</div>
</div>
</td>
</tr>
</tbody>
</table>
<p>Other serialization protocols (serpent, json, marshal) will usually be slower than pickle.
But because of the security risks of the pickle protocol, a slower but safer protocol is used by default.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/pyro.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Intro and Example</a><ul>
<li><a class="reference internal" href="#about-pyro-feature-overview">About Pyro: feature overview</a><ul>
<li><a class="reference internal" href="#pyro-s-history">Pyro&#8217;s history</a></li>
</ul>
</li>
<li><a class="reference internal" href="#what-can-you-use-it-for">What can you use it for?</a></li>
<li><a class="reference internal" href="#simple-example">Simple Example</a><ul>
<li><a class="reference internal" href="#with-a-name-server">With a name server</a></li>
<li><a class="reference internal" href="#other-means-of-creating-connections">Other means of creating connections</a></li>
</ul>
</li>
<li><a class="reference internal" href="#performance">Performance</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">Pyro - Python Remote Objects - 4.21</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="install.html"
                        title="next chapter">Installing Pyro</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <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>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="install.html" title="Installing Pyro"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Pyro - Python Remote Objects - 4.21"
             >previous</a> |</li>
        <li><a href="index.html">Pyro 4.21 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright Irmen de Jong.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>