1. Introduction
For a short overview of what Pyro is, see the Pyro page online
(http://pyro.sourceforge.net/). You can also download the package from there.
Copyright
This software is copyright © by Irmen de Jong. It is subject to change without notice. License: Pyro is released under the GNU LGPL, see the file "LICENSE".
To get an idea of how Pyro works, here is a scenario:
- You write a module '
test
' containing a class 'testclass
', which will be accessed remotely.
- Optional: using the PyroC proxy compiler, you can generate client proxy code for your '
test
' module.
- The server creates one or more instances of the '
testclass
', and registers them with the Pyro Name Server.
- The client queries the Name Server for the location of those objects. It gets a Pyro URI (Universal Resource Identifier) for them.
- The client creates proxies for the remote objects.
- Because the proxy mimics the real '
testclass
', the client can now invoke methods on the remote objects. The proxy will forward the method invocations and return the results, just as if it was the remote object itself.
Not a single line of network communication code has been written.
This looks like a big oversimplification, but it isn't!
To dive directly into the code, have a look at the various Pyro examples in the examples
directory (read the Readme.txt
). There is much to learn there.
Required Software:
- Pyro needs at least Python 2.0.1. However, it is strongly recommended
to use the latest Python version available (at the time of writing 2.2.1).
Some features might not work on older Python versions, and Pyro might
require a later Python version as time goes on.
- Starting with Pyro 2.4 there is some compatibility with Jython (clients only).
- Pyro should run wherever Python is available, however, the command line
utility scripts are designed for Windows(NT) and Unix sh. You might
experience problems trying to run them on other systems
- The
xnsc
tool requires the Tkinter Python extension module, with Tcl/Tk installed.
Related technology
- Java Remote Method Invocation (RMI)
- Common Object Request Broker Architecture (CORBA)
- Fnorb - a CORBA implementation in Python
- Milton L. Hankins' PyBrenda
- The remoting code included in Profigure by Tom Cocagne
Thanks
- John Wiegley (suggestions for attribute access and proxy marshalling, "quickstart" example code, initial multithreading solution, various other small improvements)
- Shinji Suzuki (connection loop bug fix)
- Olaf Trygve Berglihn (for a good reason to reimplement hostname arguments)
- Jesus Cea Avion (binary GUID bug fix)
- Niki Spahiev (reference cycle fix)
- Joe VanAndel (early quickstart example improvement)
- Mark Millikan (speedup for large messages)
- ...everybody I forgot and all people that are interested in this project. Thank you!