Persistence Woes.

Muppet google.com at magicdb.com
Sun Mar 9 14:44:30 EST 2003


Persistence is giving me major grief.

The problem is that stuff which should "obviously" work doesn't. I got
into considering the whole mess trying to fiddly with Shelve so that
rather than copying all of my sub-objects, they'd come out with
references intact.

If there's a smart way of doing that, it's so well known that I
couldn't find it written down, nor find a way of doing it. I'm kinda
hoping that somebody will post a fifteen line hack which takes care of
it nicely, but I'm not holding my breath :-)

Cog seems very promising, but I can't install new DB libraries on my
deployment environment (production webservers), and it's dependent on
bsddb. ZODB is overkill, really. Object Prevaylance works poorly in a
CGI environment, and I was hoping to at least offer the option of
running as a CGI.

So, here's what I'd like to see in a lightweight persistence
framework.

1> A dictionary-style interface, like Shelve.

2> Objects referenced by multiple other stored objects come back from
storage as independent objects.

3> Some notion of being able to identify object graphs and operate on
them (being able to pull out everything a given object depends on
except items already in a given list, for example)

4> Options for storing objects in an SQL database, working with
SQL-style keys to identify which objects are stored where, one object
per row.

(I'm thinking of a table with a key and a string, as a standard
alternative to files, for storage of objects)

How hard can it be?




More information about the Python-list mailing list