ZODB without undo functionality
Hello list, I use the ZODB seperately from Zope. The Undo-functionlity of the FileStorage makes a lot of sense for the usage by Data.fs. But it's just inconvenient for my application. I don't need the functionality, but because of the functionality more disk space is needed, I have to implement way to pack the database quite often an I suppose because of the big amount of data the application has performance losses. My question: Is there a way, to get the FileStorage to work without the undo functionality? I've tried other Storages (gdbmStorage and anydbmStorage) but could not get them to work. Could you recommend them or another Storage? Or should I stay by the FileStorage. Thanks in advance, Ulla.
Ulla Theiss wrote:
My question: Is there a way, to get the FileStorage to work without the undo functionality?
I don't think so. The FileStorage is logging. This means that each object that is written (even if it already exists) is written to teh end of the file. This is to support making an object larger without making objects fragmented. The undo functionality is really only a nice side effect of this, since you then can undo the saves, since the previous version is still in the storage. So to make FileStorage without undo, you would have to make it non-logging, and then you would have to implement support for fragmented storage, and finally you'd probably end up rewriting the whole thing from scratch. ;) I don't have any recommendations for non-logging storages, sorry.
I use the ZODB seperately from Zope. The Undo-functionlity of the FileStorage makes a lot of sense for the usage by Data.fs. But it's just inconvenient for my application. I don't need the functionality, but because of the functionality more disk space is needed, I have to implement way to pack the database quite often an I suppose because of the big amount of data the application has performance losses.
My question: Is there a way, to get the FileStorage to work without the undo functionality?
I've tried other Storages (gdbmStorage and anydbmStorage) but could not get them to work. Could you recommend them or another Storage? Or should I stay by the FileStorage.
There's stuff coming down the pipe (or just landed) that can get you a non-undoable storage. There's some proposal in the Fishbowl about this (I think) and I believe that DirectoryStorage has or will very soon grow this option. You might also be able to do this with Ape (nee AdaptableStorage) -- I don't know for sure, but I say this because Ape can do anything. It baked me a pie last Tuesday. But perhaps what you need is very old. In the ZODB code there is at least one other dead simple implementation of a storage that iirc is non-undoable. Dunno if it still works or anything else, but I have seen such a beast. Browse the ZODB source (perhaps via cvs.zope.org.) I'd love to look it up for you, but I'm about to get locked in my building. --jcc
participants (3)
-
J Cameron Cooper -
Lennart Regebro -
Ulla Theiss