[ZODB-Dev] Newbe ZODB questions
Christian Robottom Reis
kiko@async.com.br
Fri, 1 Jun 2001 18:05:37 -0300 (BRT)
On Wed, 30 May 2001, Patrick Down wrote:
> initial development it has become slow for larger files sizes. I am looking
> at ZODB as a replacement solution for my document storage. However I have a
> couple of questions:
You should; it's simple, fast and stable.
> 1. I see multiple storages talked about in the documentation but it is
> unclear if they are implemented. My application has two separate object
Multiple storages meaning multiple storage `drivers' -- you can store
objects in a file database, a bsddb database, and an Oracle database for
now. All these are provided in the StandaloneZODB package.
> hierarchies stored in two separate files. One represents a set of
> "templates" and the other the "document". Subsections of the template
> hierarchy are deep copied to the document hierarchy and then modified. Does
> ZODB support having more than one storage open? How would I associate
> persistent objects with one or the other?
For your application you could just go ahead and use a single storage
connection. If you need to use two connections to two separate storages,
however, I believe you'll need to use two threads (as get_transaction() is
a builtin and doesn't specify one or the other). Am I wrong, ZODB ninjas?
> well in a situation like this? I also have seen discussion that the
> FileStorage grows with every write and needs to be periodically
> compressed. Is this true?
Yep, just pack it periodically. No big deal.
Take care,
--
/\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311