[ZODB-Dev] Re: BTrees strangeness (was [Zope-dev] Zope 2.X BIGSession problems - blocker - our site dies - need help of experienceZope developer, please)

Shane Hathaway shane at zope.com
Thu Mar 4 13:52:37 EST 2004


Casey Duncan wrote:
> You are basically reimplementing a kind of pack operation here, except
> it is an application pack not utilizing the underlying ZODB pack
> mechanism. But what if you could use that instead? An add() methods was
> recently added to the ZODB connection interface which allows you to add
> unreferenced objects to the database. What if transient objects were
> just unreferenced persistent objects stored in the database? Their "key"
> would simple be their oid. So a session key could be the oid of the
> transient session object. Whenever a session was accessed it would be
> marked changed in the database and its mtime would be updated.

That's a very nice idea.  One other wrinkle is that session IDs must be 
unpredictable, not sequential, and OIDs are usually sequential.  Perhaps 
the new_oid() method of the storage should generate unpredictable (but 
non-conflicting) OIDs.

BTW, here's a non-issue: OIDs can be any length.  AFAIK, the only ZODB 
component that forces OIDs to be 8 characters is FileStorage.

Shane



More information about the ZODB-Dev mailing list