[Persistence-sig] newbie on this list

Stephan Diehl stephan.diehl@gmx.net
Fri, 16 Aug 2002 15:55:18 +0200


Dear all,

my name is Stephan Diehl and I'm living in Germany. After reading some mail 
from this list I'm still not really sure what the purpose of this SIG is. 
Please excuse me, if the rest of the section is beside the point :-)

I've written a persistence layer for some (internal) project. At some point, 
I want to publish it as open source, but there is no documentation yet, and 
it will take at least a couple of weeks to write some and get the software 
into a releasable state.
If there is interest, I could give out the stuff anyway.

so, why on earth did I write another persistence layer?
At first, I used Standalone ZODB but got cold feet due to the blackbox 
behaviour, I just want to see, what's in the database :-)

Design requirements (not everything implemented):
threadsafe
process safe (more than one process can access the store without problem)
easy to use
objects are stored in plaintext and shoud be usable from other languages as 
well (maybe PHP for a web frontend)
every object has a unique id

you could use the system in the following way:

from PStore import PStore
from PObject import PObject,PList,PDict

class class1(PObject):pass

store 1= PStore(...)
store2 = PStore(...) #the same store
store1['entry1'] = obj1 = class1()
obj1.a = 1
obj1.b = 'some string'
store1.update()
obj2 = store2['entry1']
# obj1 and obj2 have now the same attributes
obj2.c = 100
# obj1 and obj2 are now different
store2.update()
# obj1 and obj2 have again the same attributes

-----------------------------------------------------------------------------------

so, all in all, the stuff works similar to ZODB, but uses MySQL as a database.
You can store even objects that are not subclassed from PObject, but you 
can't change them.

As I said, If anybody is intersted or has further questions, please contact 
me.

Cheers

Stephan