[Zope-dev] Put Zope objects into a ZODB

2000-05-31 Thread Petr Knapek

Hi all,
I would like to use ZODB3 as an object DB to store my objects. I know
How-To by Michael Pelletier on this topic. So that is to store objects
in ZODB out of Zope. I prefer to store objects which are subclassed of
Zope objects (especially Folder and ZClass - not multiple) because in
future I would like to import this my ZODB into a Zope ZODB as its part
into a folder. Could anybody help me where to find any information,
documentation ... 
My task is to use ZODB as object database to storage
objects. Containers, subclassed from Zope Folder which will store other
objects sublassed from ZClass object or other Container. And that all
with possibility to import this ODB into a ZServer ZODB and to see my
objects over URL.

Thanks, Petr  
-- 
Petr Knpek
NEXTRA Czech Republic, s.r.o., Veve 102, 659 10 Brno, Czech Republic
e-mail: mailto:[EMAIL PROTECTED]
tel:+420-5-41 558 394
FAX:+420-5-41 558 390

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998

___
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 )




[Zope-dev] Re: [zope-xml] XMLDocument beta release 3

2000-05-31 Thread Uche Ogbuji

 This seems still to be rather linux-centric. Now with the 4DOM binaries for
 windows released, would there be a way to use this on win32 without jumping
 to a string of hoops?

Now that we have "official" Windows Binaries for all the 4Suite tools I think 
the greatest barrier is dhaving to patch Zope.  This will likely be addressed 
by providing a CVS branch for the XML integration and incorporating it all 
into the existing cross-platform compatible structure.  Hopefully we'll have 
this sorted out very quickly, but at least we have eliminated 75% of the hoops 
in question.  We're working on the rest.

Thanks.


-- 
Uche Ogbuji   Principal Consultant
[EMAIL PROTECTED]   +01 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python



___
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 )




[Zope-dev] RE: Memory issue 2.1.1 wrap up (Long)

2000-05-31 Thread Jason Spisak

Thanks to everyone who gave me advise on what was going on.

I think the problem was that I need some tuning in a variety of areas. 
(One of them being my brain) I am going to write up a little ditty on
what I discovered so that people can check it before they claim leakage
is occuring.

I don't know enough about OS's to really put the *technical*
explanations of some of the things to look for so, Matt, if you'd take a
look at it when I post the url, I'd appreciate it.

Just a quick rehash--

1. I was running on an SMP machine, andthe setcheckinterval in Python
wasn't helping me realize the machine's potential.  This contributed to
the slow down. 
Points:(2 physical, 1 psychological)

2. The 'Cache' tab in Zope was set to give objects a long, leisurely
time in memory.  This was causing Zope to rapidly claim and hold onto a
ton of memory for objects it wan't even using. I adjusted it to 3
seconds. I worked the number until I found a happy medium. (BTW, I
didn't really know *exactly* what this meant, and I hope there's a help
system file on it in 2.2) 
Points:(1 physical, 1 psychological)

3. The 'Cache tab in Zope was set to allow a large amount of objects
(20,000) to be a target size.  This made those large amounts of objects
that were lying around just happy to be there, I guess, I'm stil not
sure what it does exaclty.
Points:(1 physical, 1 psychological)

4. I store ton of information in my ZCatalog.  The way the ZCatalog does
an update (from what Shane told me) is a memory intensive task, loading
lots of objects (I'd love help here), and when you combine that with 2 
3, you get maxed out pretty quick. Catalog updates were taking a long
time.
Points:(2 physical, 2 psychological)

5. I use the standard Folder object to store 12,000 objects.  Whenever a
new object is added there is a huge hit on performance.  Also, that
object just so happens to get ZCataloged!  That's turns Zope into a dog
for a bit.  [A good solution here is ZPatterns' RackMountable, but this
is a production environment, and I want to let ZPatterns stabilize a
bit.  I am very excited about it though.;)]
Points:(2 physical, 2 psychological)

6. The 'free' command on GNU/Linux shows just how much Linux buffers.  A
ton.  Linux basically took my box from 1 gig of memory down to 1 MB,
everytime.  And that's is where it likes to stay.  That's scary, but not
fatal.  Then the swap increased to about 40MB.  When staying right on
top of those numbers, it looks pretty bad while it's happening, so I
believed things were headed down the drain.  Zope's performance was poor
(due to 1,2,3,4,5), so I thought the end was near. "If I don't restart
Zope, things will only get worse." This is not true, the swap has
hovered at 12MB average, and the free mem is averaging 4MB bobbing like
a rubber duck.
Points:(1 physical, 4 psychological)

7. There is in fact a memory leak in the SQLSession product. ;)
Points:(0 physical, 2 psychological)

All of these together with the fact that I learn more everyday about
Zope and Linux, and you have the prime situation for Memorious Falsis. 
A syndrome where the hacker sees memory leaks that aren't there.

Thanks wholeheartedly,
-- 
Jason Spisak
[EMAIL PROTECTED]

___
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] Import (was: Zope 2.2.0 alpha 1 released... )

2000-05-31 Thread Kevin Dangoor

- Original Message -
From: "Heiko Stoermer" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 31, 2000 4:40 AM
Subject: Re: [Zope-dev] Import (was: Zope 2.2.0 alpha 1 released... )


 Digicool: do you plan to offer an upload functionality for .zexp import
 just like we have a download for the export now ? this would be _very_
 handy, because I do not want all my customers to be able to access the
 import dir on my harddrive. (maybe it exists already and I just don't
 know?)

I believe this is considered to be a security hazard, because you would then
be able to send more or less arbitrary pickles through the web. Anything
that allows that is generally not allowed through the web.

Kevin


___
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] Traversal Stuff

2000-05-31 Thread Evan Simpson

- Original Message -
From: Chris Withers [EMAIL PROTECTED]
 What this offers is having a URL like:
 http://mysite.com/folder/object/some/parameters

 processed by the 'object' object with a parameter of '/some/parameters'
 or better still a 'URL objects' list as a parameter.

 This sounds like Traversal Interface stuff so I thought now would be a
 good time to mention it given the traversal interface is being re-done.

ZSQLMethods do this in __bobo_traverse__, through a rather complicated
system of temporary traversal objects.  Once the new traversal machinery is
in place, you'll be able to do it in either __bobo_traverse__ or
__before_publishing_traverse__ (the former if you want to be able to do it
all the time, the latter only during ZPublisher traversal) by manipulating
REQUEST['TraversalRequestNameStack'].  The specifics of this are still in
flux.

Cheers,

Evan @ digicool  4-am


___
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] TextIndex Questions

2000-05-31 Thread R. David Murray

On Sun, 28 May 2000, Chris Withers wrote:
  may be queried with a simple boolean query language that allows 
  'and', 'or', phrasing, parenthesized boolean expressions, and 
  proximity matching. Relevance ranking is supported and returns the
  sum of the occurances of all query terms in the "hit". A normalized 
  score is also provided that is normalized from 0 to 100 over the 
  whole result set.
 
 This sounds really useful...
 
 Is it still true?

I believe Michel said that the code for all this was still in
ZCatalog but had not been tested.  'and' and 'or' work, but the
rest I'm not sure about.  And no, as far as I know it's not documented
anywhere, unless someone put something in the interfaces wiki.

--RDM


___
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] New Help System in 2.2

2000-05-31 Thread Martijn Faassen

Paul Everitt wrote:
 
 I can add a bit more background on the decision to have the API docs not
 rendered from the source.
 
 First, Zope used to have an online help system that inspected the source
 and rendered documenation on the fly.  Very nice indeed.  But we yanked
 it.
 
 Why?  The most primary reason is philosophical, a la Jim Fulton.  Jim
 believes strongly in the idea that interfaces are _not_ connected to
 implementation:
 
   http://www.zope.org/Members/jim/PythonInterfaces/Summary

I think it's more important that interfaces should be explicit, not 
implicit. They should be connected to the implementation all right; just
not *implicit* in the implementation. It would be very nice eventually
if the implementation could explicitly check whether an object
conforms to a certain interface though, and as far as I'm aware this is
also what Jim's saying.

 Thus, the new system is patterned after this philosophy.  The interface
 is the contract that one or more implementations should live up to.
 
 Right now we aren't doing much of that which Jim described.  The
 interface is just a documentation artifact.  But it is philosophically
 consistent with what we'd ultimately like to do.

Ultimately I'd like to be able to say in the Zope sources loud and clearly
'this object conforms to THIS interface'. And then you'd have somewhere else
in the Zope sources the interface definition (which is also just in
Python source), which has documentation associated with it, probably
as a docstring in the code, though potentially also with a reference to
some file in another format.

And then you should generate the API documentation from that. I'd also
say that actually active source-wise implementation of this interface
philosophy is quite important for the long term viability of the Zope
sources. Otherwise the documentation (even of interfaces) will always
end up being behind the actual Zope sources, making it worth a lot
less.

Regards,

Martijn


___
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] 2.2.0a1 won't work with query objects

2000-05-31 Thread T.J. Mannos

 I think this is actually Zope's bug - if I'm not mistaken, the
 TinyTables product uses the Results class provided in
 lib/python/Shared/DC/ZRDB/Results.py, which would make it
 subject to breaking in the same way that SQLMethod results
 broke in the 2.2 alpha. I've included a copy of the note I
 sent to the folks reporting problems with SQLMethods that
 includes the patch you can use to verify that it fixes
 the problem for TinyTables as well:

That got me further, but it's still not all the way there:

Traceback (innermost last):
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 224, in
publish_module
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 189, in
publish
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 175, in
publish
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLDocument.py, line 168, in
__call__
(Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
(Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLMethod.py, line 156, in
__call__
(Object: standard_html_header)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
(Object: standard_html_header)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
333, in eval
(Object: REQUEST.set('login',validateUser(_.None, _)))
(Info: REQUEST)
  File string, line 0, in ?
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLMethod.py, line 156, in
__call__
(Object: validateUser)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
(Object: validateUser)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_With.py, line
146, in render
(Object: PARENTS[0].sessions)
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLMethod.py, line 156, in
__call__
(Object: getLogin)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
(Object: getLogin)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
333, in eval
(Object: SESSION.has_key('login'))
(Info: SESSION)
  File string, line 0, in ?
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
140, in careful_getattr
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLMethod.py, line 180, in
validate
(Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/AccessControl/SecurityManager.py,
line 139, in validate
  File /usr/Zope-2.2.0a1-src/lib/python/AccessControl/ZopeSecurityPolicy.py,
line 160, in validate
Unauthorized: has_key


So close!  Many of my queries work, but a few break when trying to access a
simple property or value (such as has_key).  Some even break inconsistently,
such as my getInstructorInfo query, which works fine inside a DTML document
but doesn't work at all inside a Z SQL method.  Here's its traceback:


You are not authorized to access getInstructorInfo.
Traceback (innermost last):
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 224, in
publish_module
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 189, in
publish
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 175, in
publish
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: edit_instructors)
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: edit_instructors)
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLDocument.py, line 168, in
__call__
(Object: edit_instructors)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
(Object: edit_instructors)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_With.py, line
146, in render
(Object: REQUEST)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
333, in eval
(Object: db.updateInstructorInfo(login=login, name=name, email=email,
phone=phone, office=office, homepage=homepage, password=password))
(Info: phone)
  File string, line 0, in ?
  File /usr/Zope-2.2.0a1-src/lib/python/Shared/DC/ZRDB/DA.py, line 432, in
__call__
(Object: updateInstructorInfo)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
(Object: string)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
327, in eval
(Object: getInstructorInfo(login=login))
(Info: getInstructorInfo)
Unauthorized: (see above)




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

[Zope-dev] ZServerSSL trouble

2000-05-31 Thread Ivan Raikov


Greetings,

I just installed ZServerSSL, but when I try to access the https server,
I get the following:

Traceback (innermost last):
File "/home/ivan/src/Zope-2.1.6-src/z2s.py", line 681, in ?
asyncore.loop()
File "/home/ivan/src/Zope-2.1.6-src/ZServer/medusa/asyncore.py", line 
115, in loop
poll_fun (timeout)
File "/home/ivan/src/Zope-2.1.6-src/ZServer/medusa/asyncore.py", line 
62, in poll
(r,w,e) = select.select (r,w,e, timeout)
ValueError: filedescriptor out of range in select()

I don't know enough about Zope innards, so I was wondering if someone
can explain when such a situation can occur. I also noticed that the
lists (or tuples) r and w get their values from an object called
`socket_map', so I'd like to know what the purpose of this object is,
and where it is initialized.

Regards,
Ivan Raikov

___
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] Memory Management How-To

2000-05-31 Thread Tres Seaver

Jason Spisak [EMAIL PROTECTED] wrote:
 
 Zopists,
 
 Can anyone see a document before it's been Cataloged?
 
 If so, check out:
 
 http://www.zope.org/Members/jspisak/memory
 
 and help me fill in the part where I just don't know enough.
 
 If not, then I'll request a review.

I just linked your How-To from the High Availability / Stability
wiki:

  URL
http://www.zope.org/Members/tseaver/Projects/HighlyAvailableZope/BleedingLikeAStuckPig

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations"Zope Dealers"http://www.zope.org

___
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] Memory 2.1.4-2.1.6

2000-05-31 Thread Eric Sattler

Bill Anderson wrote:
 
 Eric Sattler wrote:
 
  Bill,
 
  Jason and I seem to have gotten mixed up here.
 
 Yeah, mix-ups tend to happen on lists ;-)
 
  Here is my
  configuration and situation, the 2.1.4-2.1.6 means that it occurs
  under both versions of Zope.  It also occurs with the Neil Schemenauer
  gc python patches.  Here is my original posting:
 
  I also am having severe problems with memory creep.  Our problem
  exhibits itself by quickly using gobs of memory and requiring a
  zope restart after about a day and a half at about 100M resident.
 
  First our configuration:
 
  Core Components:
 
  FreeBSD 4.0/FreeBSD 3.4 - on separate machines of course
  Postgres 6.5.3/Postgres 7.0(fixes some memory leaks)
  Python 1.5.2
  Zope 2.1.4/2.1.6 have tried both
  pcgi with ZServer
  Apache w/mod_ssl 1.3.9 and 1.3.12
 
  Products:
 
  ZPySQLDA
  SQLSession
  GenericUserFolder
 
 I don't know if you saw it or not, but so far GUF has been determined to
 be a memory leak, and further was dermined to be causing further leakage
 in SQLSession (as well as on or two other products, IIRC). A patch/new
 version was posted, and may be worth a trial upgrade to see if that
 fixes it. IIRC, it was related to things not being removed from cache,
 imagine that! :)
 
Did see that, sounds like some promising progress has been made.  Is the
latest version of SQLSession up on the Zope site?  I think Anthony
Baxter
referred to releasing a 0-2-9 version?  Can't seem to find anything
greater than 0-2-3, or else there is a patch directory I am missing.

 To do this without compromising your production site, you can basically
 copy your setup to the other machine (remember that the paths should be
 kept the same if possible), carry out the experiments, and note the
 results. This is how I test many things.

Got several machines with 3 different versions of zope on 'em ready once
I 
install the patches for GUF and SQLSession.

___
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 )