[Zope-dev] Warning! TransparentFolders and ZClasses

Jason Spisak 444@hiretechs.com
Thu, 04 May 2000 19:46:27 GMT


Phillip J. Eby:

> At 06:57 PM 5/4/00 +0000, Jason Spisak wrote:
> >R. David Murray:
> >
> >> On Thu, 4 May 2000, Jason Spisak wrote:
> >> > How is this different from having the 30,000 objects that I have in
> one of
> >> > my instace folders?
> >> 
> >> How do you manage to get Zope to even respond with 30K objects in
> >> one Folder?  You must be using boatloads of memory.
> >
> >That's a yes. 1 gig of memory.
> >
> >Actually I don't use the management interface for these folders as you
> >probably guessed :)
> >
> >Well I have a folder called Candidates which contains 15,000 candidates,
> >and each candidate contains a resume.  Isn't that 30,000 objects in the
> >Candidates namespace?
> 
> I would suggest you move them to a Rack/Specialist combination, which is
> designed for this sort of thing.  You'll still have the data in the ZODB,
> but it won't be as attributes and you'll avoid the boatloads of memory
> issue.  Plus, you won't have the enormous disk space hits that occur
> whenever you add another candidate to the folder.  :)

Which I am begining to notice.

> 
> To do this with ZPatterns 0.3.0, subclass Candidate from
> Products.ZPatterns.Rack.RackMountable (or use the ZClass base provided).
> Create a Specialist called Candidates (or whatever), with a Rack to store
> the instances.  On the Rack's Storage tab, select your candidate ZClass as
> the kind of object to store.  You can then proceed to load up your Rack
> with objects, and add methods to the Specialist for any search operations
> you might need.  The default Specialist implementation is traversable like
> a folder, but will search all contained racks for the specified id.
> Acquisition will be in effect (each candidate acquiring from the
> Specialist, but not the Rack) but will not include the other candidates as
> acquirable attributes. 

It sounds easy enough.

> Less memory, less fuss, less disk space.  To get an
> object from DTML, just say Candidates.getItem(id), and to create one, use
> Candidates.newItem(id), then populate its attributes.
> 
> You know, I probably should stop doing all this posting today so I can
> finish 0.3.0 for release tomorrow.  There are still a few bits of cleanup
> and testing not done yet.  Ty's also working on the necessary updates to
> LoginManager for compatibility with 0.3.0.
> 

This is a production systems that is in *heavy* use. I don't feel
comfortable with the fact that the RIPP will probably change quite a bit
and break a few things.  Also, it's all ZClass based.  I am really in a
bind as to using ZClasses for web access to development, or Python Products
for mutability.

All my best,

Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.