+++ /dev/null
-Filesystem, RCS and CVS client and server classes\r
-=================================================\r
-\r
-*** See the security warning at the end of this file! ***\r
-\r
-This directory contains various modules and classes that support\r
-remote file system operations.\r
-\r
-CVS stuff\r
----------\r
-\r
-rcvs Script to put in your bin directory\r
-rcvs.py Remote CVS client command line interface\r
-\r
-cvslib.py CVS admin files classes (used by rrcs)\r
-cvslock.py CVS locking algorithms\r
-\r
-RCS stuff\r
----------\r
-\r
-rrcs Script to put in your bin directory\r
-rrcs.py Remote RCS client command line interface\r
-\r
-rcsclient.py Return an RCSProxyClient instance\r
- (has reasonable default server/port/directory)\r
-\r
-RCSProxy.py RCS proxy and server classes (on top of rcslib.py)\r
-\r
-rcslib.py Local-only RCS base class (affects stdout &\r
- local work files)\r
-\r
-FSProxy stuff\r
--------------\r
-\r
-sumtree.py Old demo for FSProxy\r
-cmptree.py First FSProxy client (used to sync from the Mac)\r
-FSProxy.py Filesystem interface classes\r
-\r
-Generic client/server stuff\r
----------------------------\r
-\r
-client.py Client class\r
-server.py Server class\r
-\r
-security.py Security mix-in class (not very secure I think)\r
-\r
-Other generic stuff\r
--------------------\r
-\r
-cmdfw.py CommandFrameWork class\r
- (used by rcvs, should be used by rrcs as well)\r
-\r
-\r
-Client/Server operation\r
------------------------\r
-\r
-The Client and Server classes implement a simple-minded RPC protocol,\r
-using Python's pickle module to transfer arguments, return values and\r
-exceptions with the most generality. The Server class is instantiated\r
-with a port number on which it should listen for requests; the Client\r
-class is instantiated with a host name and a port number where it\r
-should connect to. Once a client is connected, a TCP connection is\r
-maintained between client and server.\r
-\r
-The Server class currently handles only one connection at a time;\r
-however it could be rewritten to allow various modes of operations,\r
-using multiple threads or processes or the select() system call as\r
-desired to serve multiple clients simultaneously (when using select(),\r
-still handling one request at a time). This would not require\r
-rewriting of the Client class. It may also be possible to adapt the\r
-code to use UDP instead of TCP, but then both classes will have to be\r
-rewritten (and unless extensive acknowlegements and request serial\r
-numbers are used, the server should handle duplicate requests, so its\r
-semantics should be idempotent -- shrudder).\r
-\r
-Even though the FSProxy and RCSProxy modules define client classes,\r
-the client class is fully generic -- what methods it supports is\r
-determined entirely by the server. The server class, however, must be\r
-derived from. This is generally done as follows:\r
-\r
- from server import Server\r
- from client import Client\r
-\r
- # Define a class that performs the operations locally\r
- class MyClassLocal:\r
- def __init__(self): ...\r
- def _close(self): ...\r
-\r
- # Derive a server class using multiple inheritance\r
- class MyClassServer(MyClassLocal, Server):\r
- def __init__(self, address):\r
- # Must initialize MyClassLocal as well as Server\r
- MyClassLocal.__init__(self)\r
- Server.__init__(self, address)\r
- def _close(self):\r
- Server._close()\r
- MyClassLocal._close()\r
-\r
- # A dummy client class\r
- class MyClassClient(Client): pass\r
-\r
-Note that because MyClassLocal isn't used in the definition of\r
-MyClassClient, it would actually be better to place it in a separate\r
-module so the definition of MyClassLocal isn't executed when we only\r
-instantiate a client.\r
-\r
-The modules client and server should probably be renamed to Client and\r
-Server in order to match the class names.\r
-\r
-\r
-*** Security warning: this version requires that you have a file\r
-$HOME/.python_keyfile at the server and client side containing two\r
-comma- separated numbers. The security system at the moment makes no\r
-guarantees of actuallng being secure -- however it requires that the\r
-key file exists and contains the same numbers at both ends for this to\r
-work. (You can specify an alternative keyfile in $PYTHON_KEYFILE).\r
-Have a look at the Security class in security.py for details;\r
-basically, if the key file contains (x, y), then the security server\r
-class chooses a random number z (the challenge) in the range\r
-10..100000 and the client must be able to produce pow(z, x, y)\r
-(i.e. z**x mod y).\r