-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeremy Hylton
committed
Jun 11, 2002
1 parent
d09403d
commit 81f586c
Showing
26 changed files
with
2,602 additions
and
1,942 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,80 @@ | ||
Zope Enterprize Objects | ||
|
||
ZEO 1.0 requires Python 2.0 when used without Zope. It depends on | ||
versions of asyncore and cPickle that were first released with | ||
Python 2.0. | ||
Installation | ||
|
||
Put the ZEO package in a directory on your Python path. On a Unix | ||
system, you can use the site-packages directory of your Python lib | ||
directory. The ZEO package is the directory named ZEO that contains | ||
an __init__.py file. | ||
ZEO 2.0 requires Python 2.1 or higher when used without Zope. If | ||
you use Python 2.1, we recommend the latest minor release (2.1.3 as | ||
of this writing) because it includes a few bug fixes that affect | ||
ZEO. | ||
|
||
Starting (and configuring) the ZEO Server | ||
ZEO is packaged with distutils. To install it, run this command | ||
from the top-level ZEO directory:: | ||
|
||
python setup.py install | ||
|
||
The setup script will install the ZEO package in your Python | ||
site-packages directory. | ||
|
||
You can test ZEO before installing it with the test script:: | ||
|
||
To start the storage server, run the start.py script contained in | ||
the ZEO package. You can run the script from the package | ||
directory or copy it to a directory on your path. | ||
python test.py -v | ||
|
||
Run the script with the -h option for a full list of options. The | ||
ZEO 2.0a1 release contains 87 unit tests on Unix. | ||
|
||
Starting (and configuring) the ZEO Server | ||
|
||
Specify the port number when you run the script:: | ||
To start the storage server, go to your Zope install directory and | ||
run:: | ||
|
||
python ZEO/start.py -p port_number | ||
python lib/python/ZEO/start.py -p port_number | ||
|
||
Or run start.py without arguments to see options. The options are | ||
documented in start.txt. | ||
This run the storage sever under zdaemon. zdaemon automatically | ||
restarts programs that exit unexpectedly. | ||
|
||
The server and the client don't have to be on the same machine. | ||
If the server and client *are* on the same machine, then you can | ||
use a Unix domain socket:: | ||
If they are on the same machine, then you can use a Unix domain | ||
socket:: | ||
|
||
python ZEO/start.py -U filename | ||
python lib/python/ZEO/start.py -U filename | ||
|
||
The start script provides a number of options not documented here. | ||
See doc/start.txt for more information. | ||
|
||
Running a ZEO client | ||
|
||
In your application, create a ClientStorage, rather than, say, a | ||
FileStorage: | ||
|
||
import ZODB, ZEO.ClientStorage | ||
Storage=ZEO.ClientStorage.ClientStorage(('',port_number)) | ||
db=ZODB.DB(Storage) | ||
import ZODB | ||
from ZEO.ClientStorage import ClientStorage | ||
Storage = ClientStorage(('', port_number)) | ||
db = ZODB.DB(Storage) | ||
|
||
You can specify a host name (rather than '') if you want. The port | ||
number is, of course, the port number used to start the storage | ||
server. | ||
|
||
You can also give the name of a Unix domain socket file:: | ||
|
||
import ZODB, ZEO.ClientStorage | ||
Storage=ZEO.ClientStorage.ClientStorage(filename) | ||
db=ZODB.DB(Storage) | ||
import ZODB | ||
from ZEO.ClientStorage import ClientStorage | ||
Storage = ClientStorage(filename) | ||
db = ZODB.DB(Storage) | ||
|
||
There are a number of configuration options available for the | ||
ClientStorage. See ClientStorage.txt for details. | ||
|
||
If you want a persistent client cache which retains cache contents | ||
across ClientStorage restarts, you need to define the environment | ||
variable, ZEO_CLIENT, to a unique name for the client. This is | ||
needed so that unique cache name files can be computed. Otherwise, | ||
the client cache is stored in temporary files which are removed when | ||
variable, ZEO_CLIENT, or set the client keyword argument to the | ||
constructor to a unique name for the client. This is needed so | ||
that unique cache name files can be computed. Otherwise, the | ||
client cache is stored in temporary files which are removed when | ||
the ClientStorage shuts down. | ||
|
||
Dependencies on other modules | ||
|
||
- The module ThreadedAsync must be on the Python path. | ||
|
||
- The zdaemon module is necessary if you want to run your | ||
storage server as a daemon that automatically restarts itself | ||
if there is a fatal error. | ||
|
||
- The zLOG module provides a handy logging capability. | ||
|
||
If you are using a version of Python before Python 2: | ||
|
||
- ZServer should be in the Python path, or you should copy the | ||
version of asyncore.py from ZServer (from Zope 2.2 or CVS) to | ||
your Python path, or you should copy a version of a asyncore | ||
from the medusa CVS tree to your Python path. A recent change | ||
in asyncore is required. | ||
|
||
- The version of cPickle from Zope, or from the python.org CVS | ||
tree must be used. It has a hook to provide control over which | ||
"global objects" (e.g. classes) may be pickled. | ||
ZEO depends on other modules that are distributed with | ||
StandaloneZODB and with Zope. You can download StandaloneZODB | ||
from http://www.zope.org/Products/StandaloneZODB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.