[Zope] advice on storing in Zope instances of a python class inherited from UserList

Giuseppe Bonelli giuseppe.bonelli@tiscali.it
Fri, 24 Jan 2003 11:20:20 +0100


Hi all,

I want to use Zope as the persistent storage for a big number of =
instances of a python class inherited from UserList and I ask advice to =
this list's wisdom on the best strategy to use.

The class models structured contents (text) organized as a hierarchical =
tree a few level deep and obtained by parsing an input data stream.

The class instances are about 200.000 (i.e. BTree Folders will be =
needed), but their max. size is small (couple of KB). The key of using =
Zope (apart from being Python and object oriented) is to leverage the =
use of ZCatalog.

I see 2 alternatives:
1. Store them as XMLDocument instances (from XMLKit) and use ParsedXML =
and XMLTransform to build a search and display UI using XSLTs.
2. Store them using their native python structure and build from scratch =
a dtml search and display UI.

Main advantage of 2. should be performance (no extra xml layer), but =
standard Zope objects don't seems (at least as far I Know) to permit an =
easy implementation of hierarchies of UserList-like properties and I =
would like to maintain a 1 object for each class instance approach. On =
the other hand, the xml approach seems natural because of the =
hierarchical nature of the class, but I am worried about performance =
issues due to the extra xml layer.

Any advice or experience in implementing something like this =
(essentially a big single-object searchable storage) will be very =
helpful.

Also, is there any problem on using Zope 2.6 instead of 2.5.1 (in =
principle better indexing, but all python work done so far is in 2.1.3 =
and I am worried about potential incompatibilities among BTree, XMLKit, =
ParsedXML, XMLTRansform and Zope 2.6).

Thanks in advance,

--Giuseppe Bonelli