There are various storage implementations that implement standard storage interfaces. They differ primarily in their constructors.
Application code rarely calls storage methods, and those it calls are generally called indirectly through databases. There are interface-defined methods that are called internally by ZODB. These aren't shown below.
ZODB.interfaces.IStorage
ZODB.interfaces.IStorageIteration
ZODB.interfaces.IStorageUndoable
ZODB.interfaces.IStorageCurrentRecordIteration
ZODB.interfaces.IBlobStorage
ZODB.interfaces.IStorageRecordInformation
ZODB.interfaces.IStorageTransactionInformation
ZODB.FileStorage.FileStorage.FileStorage
ZODB.FileStorage.interfaces.IFileStoragePacker
File storages are configured using the filestorage
section:
<filestorage>
path Data.fs
</filestorage>
which accepts the following options:
ZODB component.xml filestorage
ZODB.MappingStorage.MappingStorage
File storages are configured using the mappingstorage
section:
<mappingstorage>
</mappingstorage>
Options:
ZODB component.xml mappingstorage
ZODB.DemoStorage.DemoStorage
Demo storages are configured using the demostorage
section:
<demostorage>
<filestorage base>
path base.fs
</filestorage>
<mappingstorage changes>
name Changes
</mappingstorage>
</demostorage>
demostorage
sections can contain up to 2 storage subsections, named base
and changes
, specifying the demo storage's base and changes storages. See ZODB.DemoStorage.DemoStorage.__init__
for more on the base and changes storages.
Options:
ZODB component.xml demostorage
A number of important ZODB storages are distributed separately.
Unlike the included storages, all the implementations listed in this section allow multiple processes to share the same database.
- NEO
NEO can spread data among several computers for load-balancing and multi-master replication. It also supports asynchronous replication to off-site NEO databases for further disaster resistance without affecting local operation latency.
For more information, see https://lab.nexedi.com/nexedi/neoppod.
- RelStorage
RelStorage stores data in relational databases. This is especially useful when you have requirements or existing infrastructure for storing data in relational databases.
For more information, see http://relstorage.readthedocs.io/en/latest/.
- ZEO
ZEO is a client-server database implementation for ZODB. To use ZEO, you run a ZEO server, and use ZEO clients in your application.
For more information, see https://github.com/zopefoundation/ZEO.
- ZRS
ZRS provides replication from one database to another. It's most commonly used with ZEO. With ZRS, you create a ZRS primary database around a
~ZODB.FileStorage.FileStorage.FileStorage
and in a separate process, you create a ZRS secondary storage around anystorage <ZODB.interfaces.IStorage>
. As transactions are committed on the primary, they're copied asynchronously to secondaries.For more information, see https://github.com/zc/zrs.
- zlibstorage
zlibstorage compresses database records using the compression algorithm used by gzip.
For more information, see https://pypi.org/project/zc.zlibstorage/.
- beforestorage
beforestorage provides a point-in-time view of a database that might be changing. This can be useful to provide a non-changing view of a production database for use with a
~ZODB.DemoStorage.DemoStorage
.For more information, see https://pypi.org/project/zc.beforestorage/.
- cipher.encryptingstorage
cipher.encryptingstorage provided compression and encryption of database records.
For more information, see https://pypi.org/project/cipher.encryptingstorage/.