On Dec 15, 2005, at 3:41 PM, Jesus Cea wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jesus Cea wrote: >> Any suggestion?. Any pitfall I should know?. > > Just remember the cyclic reference graphs. That could be a real > issue :-/ > > I suppose I could use a lazy thread sweeping over the database, but it > is UGLY. > > Any suggestion? The easiest thing to do would be to use the exact same record format that FileStorage does, and use the same packing strategy. You won't need to run it very frequently because your storage won't have any accumulation of obsolete versions of instances. The only growth will be from abandoned or lost instances, and that amount of space would, I expect, tend to be small. I think this also makes the BerkeleyDB version of the Storage very simple to implement, since you just store the mapping of oids to pickles, pushing them out transactiionally.