[Zope-dev] Zope view as object file system instead of web content management

2000-05-28 Thread Sin Hang Kin

Hello DC:

It have been pointed out that zope is an object file system instead of an
web content management system. But the current activities of zope usage have
been mainly apply it as an web app server. This point of view may not
release fully the potentials of zope.

We have currently seen perl is being introduce to zope, I think this is just
an start: more and more people will join in to use zope with their native
language.

However, the current zope status is not suitable to accept such an change, I
shall say we should have something like DOM for xml for zope before we can
invite them to explore the world of zope.

1, zope should based on unicode, having everything look at them as if it
serve their native encoding by translating encoding during the publishing
machanism.

2, zope should be prepared to meet the distribution world where multiple
zope co-operative is possible. I can see the benefit to have unique zope
object id by having a auto-gen local zope id and together with system
identifier to form globally unique id. This will benefit many things:
storing object to database, transfer them, archive, tracking their changes,
etc. To solve the mirror and duplicate copy, the new objectid shall take the
original id, plus the duplicate type and the new system id, to preserve link
and unique id.

3. some zope object can be float around without a fixed location, this can
be view as all of them are located in the root location or been placed to
under a transparent folder. This make no big different but can free our way
to utilize objects.

4. some interfaces of creating, modifing, publish through various protocol,
access to meta data, attach method, make invisible (delete), duplicate,
changing its storage method, spliting version, and such can be defined as
what DOM does.

5. Make the publishing machenism forgiving by nature, i.e., one can access
an object by putting before it some non-exist path, as if it were located in
an non-existing location. This does not change many thing, but will give
greate flexability to what people can do.

6. Map  dtml to the new DOM model and let everybody happy using their own
native language.

I am not a programmer but I feel that the current zope have been very
confusing with too many surprise in dtml and its syntax. If we continue to
go on like this and introduce perl people, I am afraid the result will be
fatal. Zope is very powerful but it might also its deadly weakpoint. Make
zope stronger before injecting more power in it.




Rgs,

Kent Sin
-
kentsin.weblogs.com
kentsin.imeme.net



___
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] Zope view as object file system instead of web content management

2000-05-28 Thread Sin Hang Kin

Hello DC:

It have been pointed out that zope is an object file system instead of an
web content management system. But the current activities of zope usage have
been mainly apply it as an web app server. This point of view may not
release fully the potentials of zope.

We have currently seen perl is being introduce to zope, I think this is just
an start: more and more people will join in to use zope with their native
language.

However, the current zope status is not suitable to accept such an change, I
shall say we should have something like DOM for xml for zope before we can
invite them to explore the world of zope.

1, zope should based on unicode, having everything look at them as if it
serve their native encoding by translating encoding during the publishing
machanism.

2, zope should be prepared to meet the distribution world where multiple
zope co-operative is possible. I can see the benefit to have unique zope
object id by having a auto-gen local zope id and together with system
identifier to form globally unique id. This will benefit many things:
storing object to database, transfer them, archive, tracking their changes,
etc. To solve the mirror and duplicate copy, the new objectid shall take the
original id, plus the duplicate type and the new system id, to preserve link
and unique id.

3. some zope object can be float around without a fixed location, this can
be view as all of them are located in the root location or been placed to
under a transparent folder. This make no big different but can free our way
to utilize objects.

4. some interfaces of creating, modifing, publish through various protocol,
access to meta data, attach method, make invisible (delete), duplicate,
changing its storage method, spliting version, and such can be defined as
what DOM does.

5. Make the publishing machenism forgiving by nature, i.e., one can access
an object by putting before it some non-exist path, as if it were located in
an non-existing location. This does not change many thing, but will give
greate flexability to what people can do.

6. Map  dtml to the new DOM model and let everybody happy using their own
native language.

I am not a programmer but I feel that the current zope have been very
confusing with too many surprise in dtml and its syntax. If we continue to
go on like this and introduce perl people, I am afraid the result will be
fatal. Zope is very powerful but it might also its deadly weakpoint. Make
zope stronger before injecting more power in it.




Rgs,

Kent Sin
-
kentsin.weblogs.com
kentsin.imeme.net


___
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] Zope 2.1.6 minor ZCatalog bug?

2000-05-28 Thread Dieter Maurer

I have a ZCatalog object in Zope's root folder.
Its ContentView uses absolute URL's to reference its objects: e.g.
"//acl_users" rather than "/acl_users". Such URL's cause a browser
to interprete the first URL part as host. In the above case,
it looks for host "acl_users" which, of cause, does not exist.

The following patch fixes the problem in my case. It might, however,
introduce other problems if the ZCatalog is not in the root folder.

Dieter


--- :catalogView.dtml   Wed Nov  3 19:56:32 1999
+++ catalogView.dtmlSat May 27 17:04:55 2000
@@ -48,7 +48,7 @@
   /TD
   td valign="top"dtml-var meta_type/td
   td valign="top" align="left"
-a href="/dtml-var "getpath(data_record_id_)"/manage_workspace"dtml-var 
"getpath(data_record_id_)"
+a href="dtml-var "getpath(data_record_id_)"/manage_workspace"dtml-var 
+"getpath(data_record_id_)"
 dtml-if title (dtml-var title)/dtml-if/a
   /td 
 /tr


___
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 a.k.a. how to get objects out of the cache

2000-05-28 Thread Eric Sattler

All,

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 have looked at a lot of different things.  This includes:

Installing the gc(garbage collection) python package 
   - Neil Schemenauer's patches
Installing Postgres 7.0(fixes some connection memory leaks)
Tracking the cache cleanup inside zope
Tracking thread locking inside DB.py, Transaction.py

Results:

gc python didn't help alleviate the problem
Postgres 7.0 instead of 6.5.3 didn't help the problem

I do see GenericUserFolder and SQLSession objects with the
Control_Panel_Debug screen, and they do not seem to go away.  I wrote
a simple python script to do nothing more than authenticate (log in)
using the GenericUserFolder method docLogin.  The memory usage quickly
grows out of control.  After waiting 15 minutes(my cookie timeout),
no decrease in memory usage.  The objects are still in the cache also. 

Restarting zope clears everything up, and starts out nice and clean
again.
We have a cron job doing this right now.

Questions:

1.  How does a user's connection resources etc. get cleaned up
by Zope after a cookie timeout?  Do I need to do this myself?

2.  How does a genericuserfolder's set of objects used by
an   
authenticated user get cleaned up.  I can't seem to make those
objects get reclaimed by the system, even when the user logs
off?

3.  I am not explicitly removing SQLSession objects.  Will my usage
counts for these objects remain  1, thereby never allowing them
to get cleaned up, and thereby keeping my usage counts for 
genericuserfolder's  1?

4.  Since GenericUserFolder inherits from Folder objects, is it 
possible that the reason my memory grows so fast is that Zope
does not release the resources used by a user properly, during
an abrupt disconnect?

I will assist/help trying different things to try to solve this problem!

thanks.

eric.

___
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] Preprocessed Output

2000-05-28 Thread Itamar Shtull-Trauring

A common pattern when developing in Zope is to have a sort of Document that
contains text with some special codes, and then to render them and return
the output to the user.  So we have DTML Documents, and Structured Text
Documents, and Python Methods, and I've written a few for my own use and I'm
sure other people have.

Has anyone thought of making this into some sort of generalized superclass
that does this sort of I thing.  I remember Michel Pelletier worked on
something like this and was telling me about it at IPC8.  Any code written
for that?

-- 
Itamar S.T.  [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 )




[Zope-dev] Problems with RackMountable

2000-05-28 Thread Itamar Shtull-Trauring

I'm adding some RackMountable objects (subclassed from RackMountable and
SimpleItem.Item) and when I try to access them via URL I get an
AttributeError like they don't have attribute __of__:

   Traceback (innermost last):
 File /hd1/zope/lib/python/ZPublisher/Publish.py, line 214,
in publish_module
 File /hd1/zope/lib/python/ZPublisher/Publish.py, line 179,
in publish
 File /hd1/zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
   (Object: ElementWithAttributes)
 File /hd1/zope/lib/python/ZPublisher/Publish.py, line 151,
in publish
 File /hd1/zope/lib/python/ZPublisher/BaseRequest.py, line
308, in traverse
 File
/hd1/zope/lib/python/Products/ZPatterns/Specialists.py, line 27, in
__bobo_traverse__
   (Object: SheetProviderContainer)
 File
/hd1/zope/lib/python/Products/ZPatterns/Specialists.py, line 39, in getItem
   (Object: SheetProviderContainer)
 File /hd1/zope/lib/python/Products/ZPatterns/Rack.py, line
515, in __get_attr__
   (Object: cheese4)
   AttributeError: __of__

What am I doing wrong here?

-- 
Itamar S.T.  [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] Problems with LoginManager form-based login

2000-05-28 Thread Phillip J. Eby

At 06:14 PM 5/26/00 -0400, Evan Simpson wrote:

D'oh!  How 'bout if REQUEST.close() were to always do a
self.__dict__.clear()?


Are you absolutely positively sure that REQUEST.response is never accessed
following REQUEST.close()?  In my cursory examination of the code paths, I
wasn't sure that could be definitively said.


___
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] [Fwd: ZCatalog.. Again.. I know..]

2000-05-28 Thread Chris Withers

"R. David Murray" wrote:
 On Wed, 24 May 2000, Chris Withers wrote:
  This is weird... the bit of code in question was:
  lib/python/SearchIndex/Lexicon.py line 132:
 [...]
  Now Michel's patch was to change this to:
  else:
  self.counter = self.counter + 1
  self._lexicon[intern(word)] = self.counter
  return self.counter
 
 I patched my 2.1.4 site with the above code, and my key errors
 and wrong-results went away.  My site has 60K records being
 searched, so this constitues a fairly good test.

I'm giving this a try on 2.1.6 and it appears to be working.
However, have you noticed any speed decrease since you applied this
patch?
I'm not sure, but I think cataloging large numbers of objects has
significantly slowed down since I applied it...

cheers,

Chris

___
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] Case Insensitive TextIndices

2000-05-28 Thread Chris Withers

Since www.zope.org and classic.zope.org (not to mention digicool.com)
all seem to be down, I'll dump my feature request here (although given
the lack of mail this morning, maybe mailman is down too ;-)

Could it at least be an option, my view is that it should be the default
option ;-), for text indices to be case insensitive...

It seems crazy to me that a search for 'Fishing' will not return objects
containing 'fishing'. 

Am I the only one?

cheers,

Chris

___
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] Re: ZCatalog and Unique IDs

2000-05-28 Thread Chris Withers

Tres Seaver wrote:
  who's the CTO?
 
 Jim is.

Okay, I get the joke now :-)

  * "persistent" references are effectively required to be immortal:
 it is _mandated_ that one be able to stringify the IOR, copy it
to a piece of paper, put the paper in a bottle, and cast it on
the waves;  whoever opens the bottle should be able to transcribe
the IOR, reify the reference from the string, and communicate with
the object (which may be an entirely new "incarnation" created
just for this request).

This is the sort of persistent reference I meant, it's one of the
reasons I like CORBA as a model ;-)

 A general-purpose, persistable reference in Zope pretty much has to
 be represented as an absolute containment path

I don't agree. What happens when you move an object? The object doesn't
change so why should its persistent reference? In a similar way, what
happens when an object moves between storages? I reckon it should have
the same POID...

 A man with one watch knows what time it is;  A man with two is never sure.

That's not quite what I meant... An object is unique. It's aquisition
context may give it more attributes to play with, but at the end of the
day it is a seperate entity. This entity should have a unique, global
identifier; it's POID.

I think putting a path in front of this identifies the context, but
doesn't really do a lot to identify the object.

I guess my view depends on _data_ being stored in the object rather than
acquired. Is this the case?

cheers,

Chris

___
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] newbie question: parameter passing for ZSQL Object

2000-05-28 Thread Stephan Richter


With dtml-call insertItem, Zope gives me following error message:

If the parameters are from another SQL statement, then the SQL method will 
not find them, since not the entire namespace is sent.

Try:
dtml-call "insertItem(param1=pvalue1, param2=pvalue2, param3=pvalue3, 
param4=pvalue4)"

pvalueX can be also a variable. If your variables are called paramX, then 
the following will work:

dtml-call "insertItem(param1=param1, param2=param2, param3=param3, 
param4=param4)"

That is typical Python syntax. So in case you want to know why and how that 
works, read a little in the Python documentation (which is btw excellent.)

Regards,
Stephan
--
Stephan Richter
CBU - Physics and Chemistry
Web2k - Web Design/Development  Technical Project Management


___
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 a.k.a. how to get objects out of the cache

2000-05-28 Thread Bill Anderson

Eric Sattler wrote:
 
 All,
 
 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.

[...]

 I do see GenericUserFolder and SQLSession objects with the
 Control_Panel_Debug screen, and they do not seem to go away.  I wrote
 a simple python script to do nothing more than authenticate (log in)
 using the GenericUserFolder method docLogin.  The memory usage quickly
 grows out of control.  After waiting 15 minutes(my cookie timeout),
 no decrease in memory usage.  The objects are still in the cache also.
 
 Restarting zope clears everything up, and starts out nice and clean
 again.
 We have a cron job doing this right now.


This seems to dovetail with the reports of SQLSession being a memory
leak source.
Could you drop the SQLSession, and repeat the test?

___
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] use ODBC to access other database

2000-05-28 Thread Chris McDonough

Thomas Weholt wrote:
 Does anybody know if there are a Interbase-databaseadapter in development?
 Interbase is open-source, free etc. and allready an established product so
 it would be strange if it wasn`t supported by Zope, at least in the future.

Thomas,

There is a python-level Interbase adapter named kinterbasdb written by
Alexander Kuznetsin that I've been fooling a little bit with lately...
If I get the time I may try to write an Interbase DA against Alexander's
work.  No ETA.

___
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] Zope 2.1.6 ZCatalog: minor bug, missing find import -- with patch

2000-05-28 Thread Dieter Maurer

I just found a minor bug in Zope 2.1.6's ZCatalog (distribution).

"ZCatalog.py" does not import "find".
If the "containing" field contains a value, a NameError exception
is raised.

Patch appended.

Dieter

 ZCatalog.pat


[Zope-dev] Zope 2.1.6 DateTime bug: daylight saving time not handled -- with patch

2000-05-28 Thread Dieter Maurer

The Zope 2.1.6 DateTime module does not recognize daylight saving time.

Patch attached.

Dieter


--- lib/python/DateTime/:DateTime.py	Tue Mar 14 18:04:59 2000
+++ lib/python/DateTime/DateTime.py	Sun May 28 18:43:28 2000
@@ -94,6 +94,8 @@
 from types import InstanceType,IntType,FloatType,StringType
 try: from time import tzname
 except: tzname=('UNKNOWN','UNKNOWN')
+try: from time import daylight; tzname_index= daylight; del daylight
+except: tzname_index= 0
 
 
 
@@ -687,7 +689,7 @@
   'saturday': 7,  'sat': 7}
 
 
-try: _localzone=_cache._zmap[lower(tzname[0])]
+try: _localzone=_cache._zmap[lower(tzname[tzname_index])]
 except:
 try:
 t=time()



[Zope-dev] Cataloging LocalFS content

2000-05-28 Thread Dieter Maurer

Dear Zopistas,

I think, cataloging "LocalFS" content would be nice.

I have the following problems with it:

 1. "LocalFS" defines various meta types:
"Local File System", "Local Directory" and "Local File".

Only "Local File System" is a "true" meta type which
should appear in the available objects list of ObjectManager's.

However, I may well be useful, to select the others, too,
in for "find" and cataloging.

 2. ZCatalog uses "bobo_modification_time" in its meta table
and for indexing. For "LocalFS" content, this is not
the best modification time to use for indexing.

It would be nice, if "bobo_modification_time" could somehow
be synchronized with the object's modification time in the
file system.


Can you give me some ideas how to best solve these problems.


Dieter

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