Re: [ZODB-Dev] A koan: persistent object with no container
On Friday 14 November 2008, Shane Hathaway wrote: > ... which opens the door for a lot of interesting ways to use the > persistence framework. Linking your object to the root causes your > object to be managed by a ZODB.Connection and you get all the associated > assumptions about pickling, ID management, etc. But if you instead > assign the object to some persistence manager other than a > ZODB.Connection, you could integrate with other kinds of storage systems > without using pickles. I don't think this area has been explored nearly > as much as it deserves. Yep, I agree. I was at some point thinking about writing a storage layer for an XML or JSON DB. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan Richter" ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] A koan: persistent object with no container
On Nov 14, 2008, at 6:51 PM, Shane Hathaway wrote: > Jim Fulton wrote: >> On Nov 14, 2008, at 6:16 PM, Paul Winkler wrote: >> >>> If I instantiate a subclass of Persistent, but I don't ever assign >>> it >>> as an attribute on the root (or any other Persistent instance) ... >>> then what happens to my instance when the transaction commits? >>> >>> A) it's saved in the ZODB, but not reachable? >>> or >>> B) it's never saved at all? >>> or >>> C) something else that I can't imagine? >> >> >> B. IOW, nothing. > > ... which opens the door for a lot of interesting ways to use the > persistence framework. Linking your object to the root causes your > object to be managed by a ZODB.Connection and you get all the > associated > assumptions about pickling, ID management, etc. But if you instead > assign the object to some persistence manager other than a > ZODB.Connection, you could integrate with other kinds of storage > systems > without using pickles. I don't think this area has been explored > nearly > as much as it deserves. Yup. In theory. Currently, persistent's implementation is highly tied to ZODB, although I have plans for a much scaled down persistent in ZODB4. (Well, out of ZODB4, since it will no longer depend on ZODB. :) Jim -- Jim Fulton Zope Corporation ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] A koan: persistent object with no container
Jim Fulton wrote: > On Nov 14, 2008, at 6:16 PM, Paul Winkler wrote: > >> If I instantiate a subclass of Persistent, but I don't ever assign it >> as an attribute on the root (or any other Persistent instance) ... >> then what happens to my instance when the transaction commits? >> >> A) it's saved in the ZODB, but not reachable? >> or >> B) it's never saved at all? >> or >> C) something else that I can't imagine? > > > B. IOW, nothing. ... which opens the door for a lot of interesting ways to use the persistence framework. Linking your object to the root causes your object to be managed by a ZODB.Connection and you get all the associated assumptions about pickling, ID management, etc. But if you instead assign the object to some persistence manager other than a ZODB.Connection, you could integrate with other kinds of storage systems without using pickles. I don't think this area has been explored nearly as much as it deserves. Shane ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] A koan: persistent object with no container
On Nov 14, 2008, at 6:16 PM, Paul Winkler wrote: > If I instantiate a subclass of Persistent, but I don't ever assign it > as an attribute on the root (or any other Persistent instance) ... > then what happens to my instance when the transaction commits? > > A) it's saved in the ZODB, but not reachable? > or > B) it's never saved at all? > or > C) something else that I can't imagine? B. IOW, nothing. JIm -- Jim Fulton Zope Corporation ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
[ZODB-Dev] A koan: persistent object with no container
If I instantiate a subclass of Persistent, but I don't ever assign it as an attribute on the root (or any other Persistent instance) ... then what happens to my instance when the transaction commits? A) it's saved in the ZODB, but not reachable? or B) it's never saved at all? or C) something else that I can't imagine? -- http://www.slinkp.com ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev