You are not logged in Log in Join
You are here: Home » Members » ivo » Quota Folder

Log in



Folder icon Quota Folder

QuotaFolder - Quota support for Zope

What is it? -----------

QuotaFolder is a folder-ish object that restricts the total number of objects, their total size and their individual maximum size. QuotaFolder takes subfolders (recursively) into account, so it should not be possible to escape the quota restrictions.

The basic goal of QuotaFolder is not to put an absolute limit on ZODB usage - it is impossible to determine this. For example, each object may have several revisions in the ZODB, and some of the internal state of the object is stored in the ZODB that's not returned by get_size(). The goal is to limit the use of objects in general, to prevent people from offering large files or using up resources with enormous amounts of objects.

How does it work? -----------------

QuotaFolder MonkeyPatches (tm) some of the internal Zope components such as ObjectManager, File, Image, DTMLMethod, DTMLDocument and more. The patching constist of making the components quota aware. This basically means the objects will track changes and report them to parent folders. If one of the parent folders is a QuotaFolder, and the QuotaFolder detects that the change will exceed the quota, a QuotaExceededException is raised, and the transaction is rolled back.

At this moment, if an object supports the get_size() method, it's used. The value reported by this method will not take all usage (i.e. properties) into account, so this may be changed in the future.

Supported products ------------------

The QuotaFolder product knows how to account File, Image, DTMLMethod, DTMLDocument and PythonScript objects. It also understands ObjectManager based products such as Folder and BTreeFolder (TransparentFolder is not thoroughly tested, but it seems to work well)

Most products (i.e. FLE, Squishdot, PhotoFolder, ZWiki) exist of ObjectManagers with subobjects, and QuotaFolder knows how to handle these quite well. Unknown objects who's size (and changes in size) cannot be determined are accounted as 1 object with size 0. If this is not satisfactory (for example, it's not at this moment for TinyTablePlus), extra support can be built in for these objects (as has been done with, for example, ZPT).

QuotaFolder also supports .zexp imports and copy/paste operations.

QuotaFolder has been tested with Zope 2.4.3, 2.4.4b1 and 2.5.0. It has not been tested in ZEO setups.

More information can be found in the README.txt

 Title   Type   Size   Modified   Status 
 First Release, with fixes Edit object Software Release   2002-03-22 published
 QuotaFolder 0.1 released Edit object News Item 1 K 2002-03-21 published