[ZODB-Dev] Re: Fixing Broken Objects?

Chris Spencer gmane.20.evilspam at spamgourmet.com
Thu Oct 13 19:54:06 EDT 2005


Jim Fulton wrote:
> Andreas Jung wrote:
> 
>>> --On 13. Oktober 2005 02:54:51 -0400 Chris Spencer 
> <gmane.20.evilspam at spamgourmet.com> wrote:
>>
>> But what if the client doesn't know what sources it's supposed to have?
>> What if it only has a limited understanding of the objects, and needs to
>> load certain objects on the server from scratch. Is this really a
>> necessary limitation? I realize I may be using Zope in a way it was not
>> designed for, but wouldn't it be useful to persist the entire object,
>> source code as well as state?
> 
>> Sorry, this is a stupid assumption.
> 
> 
> Nooooo. It was an incorrect assumption.
> 
> Jim

Well, actually it was a hypothetical ;)

I'm fully aware of Pickle's limitations. My question was why are you 
accepting them? What's to stop someone from extending Pickle to 
serialize state *and* code? Python's inspect module certainly allows for 
this. You could define entire programs on the database without the 
client having to maintain any code, only loading what it needs to 
connect to the database. Could it be we're making the incorrect 
assumption that state serialization is enough?

Chris



More information about the ZODB-Dev mailing list