[Zope-dev] Temp Folders and Transient Object Containers

2002-06-20 Thread Jeffrey P Shell

Under the category of feigning smartness by blindly copying what I see, In
a subfolder of the Zope root, I set up a browser_id_manager, a
session_data_manager, a temp folder (cleverly named 'temp_folder'), and put
a Transient Object Container inside that temp folder, named 'tix_sessions'.
Of course, when I restarted Zope, the 'tix_sessions' object itself was gone.

So, why is the default Transient Object Container put in a Temporary Folder?
If I want to use an application specific one that doesn't get lost on
restart, is it OK to put it into a normal persistent folder?

-- 
Jeffrey P Shell 
www.cuemedia.com




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Temp Folders and Transient Object Containers

2002-06-20 Thread Chris McDonough

 So, why is the default Transient Object Container put in a
Temporary Folder?
 If I want to use an application specific one that doesn't get lost
on
 restart, is it OK to put it into a normal persistent folder?

Yup.

The TOC is put into the temp folder mostly because:

1) Sessions are write-intensive and cause bloat on undoing storages
   like FileStorage.

2) Sessions are write-intensive and cause conflicts when accessed
   via a normal ZODB connection.  The temp folder is mounted into
   a database which has a special low conflict connection type
   that ignores read conflict errors.

You will get more conflicts and more bloat if you put a TOC into a
normal persistent folder (esp. one backed by FileStorage), but it
will work.  That said, there are a few bugs in the 2.5 transience
implementation that I'm working on as we speak that might be more
egregious if you have a truly persistent TOC, so pls. keep an eye
towards 2.6 (or CVS ;-) in the next few weeks.  You will notice the
bugs in the form of phantom key errors (not unlike the old Catalog
bugs ;-)

- C




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Temp Folders and Transient Object Containers

2002-06-20 Thread Jeffrey P Shell

On 6/20/02 4:01 PM, Chris McDonough [EMAIL PROTECTED] wrote:

 So, why is the default Transient Object Container put in a
 Temporary Folder?
 If I want to use an application specific one that doesn't get lost
 on
 restart, is it OK to put it into a normal persistent folder?
 
 Yup.
 
 The TOC is put into the temp folder mostly because:
 
 1) Sessions are write-intensive and cause bloat on undoing storages
  like FileStorage.
 
 2) Sessions are write-intensive and cause conflicts when accessed
  via a normal ZODB connection.  The temp folder is mounted into
  a database which has a special low conflict connection type
  that ignores read conflict errors.
 
 You will get more conflicts and more bloat if you put a TOC into a
 normal persistent folder (esp. one backed by FileStorage), but it
 will work.  That said, there are a few bugs in the 2.5 transience
 implementation that I'm working on as we speak that might be more
 egregious if you have a truly persistent TOC, so pls. keep an eye
 towards 2.6 (or CVS ;-) in the next few weeks.  You will notice the
 bugs in the form of phantom key errors (not unlike the old Catalog
 bugs ;-)

Oh yes.  Those were fun days!

So, I want to have different TOC's, preferably in non persistent folders
(the site I'm working on could be quite high traffic at times).  A big
problem is - if one is in a temporary folder, it will disappear if Zope ever
restarts.

So, at present, it looks like you can only have one reliable non-persistent
TOC per Zope instance, since that one's always initialized during the time
Zope is checking its root for required objects (Zope 2.5.1
lib/python/OFS/Applicatoin.py (revision 1.179.4.1), starting at line 277).
This could be a rather crappy situation for Zope instances hosting multiple
applications with different Session requirements.  Fortunately for the
project I'm on, I think it will have a dedicated Zope instance.

No one's working on a Kinda Sorta Temporary Folder are they?  ;)  Or, as
Jim might put it Temporary, except for when I don't want it to be.

-- 
Jeffrey P Shell 
www.cuemedia.com




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Temp Folders and Transient Object Containers

2002-06-20 Thread Chris McDonough

I would probably work around this by creating a Product that gets a
hold of the app object in its __init__ and creates all the necessary
stuff.  Actually, it would be kinda nice if instead of creating only
the session_data object in the temp_folder initialization code we
imported some (replaceable) arbitrary .zexp file that contained
whatever you wanted.  You could hack something up like this I'm
sure.

 Oh yes.  Those were fun days!

 So, I want to have different TOC's, preferably in non persistent
folders
 (the site I'm working on could be quite high traffic at times).  A
big
 problem is - if one is in a temporary folder, it will disappear if
Zope ever
 restarts.

 So, at present, it looks like you can only have one reliable
non-persistent
 TOC per Zope instance, since that one's always initialized during
the time
 Zope is checking its root for required objects (Zope 2.5.1
 lib/python/OFS/Applicatoin.py (revision 1.179.4.1), starting at
line 277).
 This could be a rather crappy situation for Zope instances hosting
multiple
 applications with different Session requirements.  Fortunately for
the
 project I'm on, I think it will have a dedicated Zope instance.

 No one's working on a Kinda Sorta Temporary Folder are they?  ;)
Or, as
 Jim might put it Temporary, except for when I don't want it to
be.

 --
 Jeffrey P Shell
 www.cuemedia.com






___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )