[Zope-dev] catalogaware dtml document

2000-05-21 Thread Sin Hang Kin

Is it possible (worth?) to make dtml-document catalogue aware by default? Or
to allow the creater to decide this behavior by setting a property?


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] Create an empty DTML Method

2000-05-21 Thread Lindell Alderman

I want to write some dtml code that will add a DTML method that is
totally empty.  The add_DTMLMethod method in Zope puts in the default
Zope content.  How do I avoid that?

-L

___
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] authorization and SQL-methods

2000-05-21 Thread Peter Toneby

Hi

I'm using the latest cvs-version of Zope and I seem to not be able to
acces ZSql-methods, I get the login-box, but I can't login as anyone (I
have tried to login as superuser, myself (owner/manager) and not at all,
but all I get is not authorized. The methods do work in management-mode,
but not in the actual pages (or in he view-tab for index_html).

Everything Aquires security from the root-folder, but that doesn't seem
to help any (neither does giving everyone full rights...). And yes I
checked to see that the root-folder is setting "Use database methods".

So if anyone has any ideas to try, I'd be happy ;)

My guess is that it has something to do with the new security patches,
but I'm not sure.

oh, right, and another thing, could you cool developers of Zope please
take a quick look through all the management-tabs and make sure that
they don't move around alot like they do now ;), this would speed up
productivity a little for us users ;).

/Peter Toneby, who finds stability boring ;)
-- 
Alpha Test Version:  Too buggy to be released to the paying public. 
Beta Test Version:  Still too buggy to be released. 
Release Version:  Alternate pronunciation of "Beta Test Version". 

___
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] ZSQL methods inside of ZClasses

2000-05-21 Thread Lindell Alderman

I want to create a ZClass that will incorporate a number of ZSQL methods.
I have a couple of questions about how I should do this.

1. I don't want to tie my ZClass to a particular database adapter.  But
to create my ZSQL methods inside of my zclass I need a connection.  How
do I circumvent this?

2. Even when I do create a ZSQL connection inside of my ZClass and I
create my ZSQL method.  Every time I run the method, I get a "connection
not found" error.  What is up?

-L

___
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: Re: [Zope-dev] ZPatterns framework improvements

2000-05-21 Thread Phillip J. Eby

At 03:51 PM 5/21/00 -0400, Tres Seaver wrote:

This is really just the classic Observer pattern, a la GoF Design
Patterns.  "ObjectAdded" and "ObjectRemoved" are events a
"RackObserver" would register for;  "AfterCreate", "Changed",
and "BeforeDestroy" are events of the "hosted" object itself.  Note
that "ObjectAdded" and "ObjectRemoved" would be called during move or
rename operations, even though the object is not being created.

Yes, but the DataManager will filter that such that Zope "Move" and
"Rename" operations will show to Indexing and Rule agents as though they
were just "Change" events.  See the DataManagementEvents entry in the new
ZPatterns Wiki for details on how this will work.


___
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] Memory creep

2000-05-21 Thread Chris McDonough

John,

If you can figure out how to use them, the pair of methods implemented
on the Control_Panel named "manage_debug" and "manage_profile" might
help you... e.g. http://yourserver/Control_Panel/manage_debug .  I can't
give much in the way of explanation of them, there might be some good
archived mail messages on them.

You should also probably consult (and add to) the HighlyAvailableZope
wiki at
http://www.zope.org/Members/tseaver/Projects/HighlyAvailableZope/FrontPa
ge (especially "BleedingLikeAStuckPig" :-)

 -Original Message-
 From: John Hile [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, May 21, 2000 3:40 PM
 To: zope-admin
 Subject: RE: [Zope] Memory creep
 
 
 Actually, after following several of the threads here, we're 
 looking into
 switching from MySQL to PostgreSQL, but for the moment, I'd 
 like to figure
 out who's holding on to that memory.
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On 
 Behalf Of Nils
  Kassube
  Sent: Sunday, May 21, 2000 8:05 AM
  To: John Hile; [EMAIL PROTECTED]
  Subject: Re: [Zope] Memory creep
 
 
  [EMAIL PROTECTED] (John Hile) wrote:
 
  [MySQL database]
   Having two people simultaneously access pages that DID access
  the database
   without the client running on either machine DID cause 
 memory creep.
 
  Are you sure that you want to use MySQL for this?
 
  http://openacs.org/why-not-mysql.html
 
  Cheers,
  Nils
 
 
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

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




Re: [Zope] ZScheduler

2000-05-21 Thread Loren Stafford

What happens when you execute the event's "trigger" method from the
browser's location line?

e.g.
http://my.site.dom/my_scheduled_method/trigger

-- Loren


 In article 000101bfc01a$1ec3e2e0$[EMAIL PROTECTED], Loren
 Stafford [EMAIL PROTECTED] writes
 You can try out ZScheduler on Windows (I tested on Win98). It actually
runs
 the scheduled tasks. However, because the inter-thread communication
isn't
 working, it degrades to polling the schedule table.

 I tried this out on my notebook running NTWK4.0 and got this from the
 log

 Failed to trigger event.
 Type=exceptions.AttributeError
 Val=this (File: D:\zope2\lib\python\Products\MailHost\SendMailTag.py
 Line: 188)
 500 Internal Server Error for http://a7800nt:8080/myfolder/cron/trigger
 - --
 2000-05-20T05:40:24 PROBLEM(100) Products.ZScheduler.Loggerr Failed to
 disarm event

 The DTML code just sends an email, and works fine when tested outside
 the ZEvent.

 - --
 Regards,  Graham Chiu
 gchiuatcompkarori.co.nz
 http://www.compkarori.co.nz/index.php
 Powered by Interbase and Zope



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




Re: [Zope] SQLSession vs FSSession for ultra-high scalability and speed.

2000-05-21 Thread chas

Thank you very much for the comprehensive and speedy reply, J.

Let me give it a try (or just dump all of what I know).

Much more than I expected - and greatly appreciated. Thank you.

First of all it looks like you are going to want ZEO. If you don't 
know ZEO, get to know ZEO, it fits perfectly with what you want for 
the frontline servers.

Wow, has it been released for public consumption yet ? 
(I've been out of the Zope-loop for a while unfortunately)
But yes, I had ZEO in mind for keeping the application 
logic on the frontline servers in sync.

As for the database, MySQL is hands down the fastest, but certainly 
not the most robust in terms of features. Oracle is great if you have 
$10,000 and a full time DBA but PostgreSQL 7.0 is really your best 
bet. You might also want to take the money you were going to spend on 
the DB2 and put it right back into DB1 and house everything there. 
Just get a beefy machine, RAID it up for redundancy and call it a day.

Will definitely be getting RAID for the application data.


The other idea that I have been playing around with in terms of 
redundancy is to build something into the Zope code for the ZSQL 
Methods that can go into a "cached" mode if your database dies. I 
have only begun to play with this, but in theory since, Zope can 
cache all your common data that comes from SQL you could, in effect, 
bring down the SQL database and have Zope continue to work with the 
cached data. I think all that it would involve (and I am sure that I 
am simplifying the hell out of this) is to have Zope know that the 
SQL database is no longer there (look for an error) and just turn the 
"Maximum time (seconds) to cache results" to unlimited until the 
database was restored.

Has anyone else thought about this or played with this idea?

I think in most cases, if the DB dies, it's game over until
it goes up again.


Graham Chiu wrote:
It may be the way I designed my site, but if the database serving
SQLSessions had to be taken down for maintenance, my site became
inaccessible.

Same would happen to my site. Rather than try to build around 
that, I think I'll try to keep the DB up instead - since I won't
have much functionality without sessions.

Based upon this experience, I would therefore now prefer to use
different database engines for the main database and for the session
tables.  And since for sessions, all you really want is speed without
any fancy SQL transactions, then MySQL for the session data seems an
appropriate use.

Exactly what I was hoping - thank you for the confirmation :)



Graham Chiu wrote:

Steve Alexander wrote:
I seem to recall from the MySQL vs Postgres thread a while ago that
MySQL was fastest in mostly-reading situations, whereas Postgres was far
better when there is quite a lot of writing as well as reading.

Interesting. I would have thought that MySQL won in writes b/c it
doesn't have the transaction overhead. Then again, Postgres 7 seems
to have updated the ante a lot.

If this is true, the Postgres should be a better choice for a
session-data DBMS.

 For SQLSessions, you only write the session data once, and read multiple
 times.  So, that would suit MySQL ?

I guess it depends what you're doing with your session object.
We'll be changing the properties of the session object as the 
user traverses the site, so the session object will have to be
updated (ie. updated on the RDB).


Thank you all for your help. 

chas


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




[Zope] Zclass inheritence

2000-05-21 Thread John Morton

What does a product need to do in order to be a base class for a ZClass?
Can another Zclass act as a base class for a ZClass?
If not, why not?

John



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




RE: [Zope] Zclass inheritence

2000-05-21 Thread Chris McDonough

 What does a product need to do in order to be a base class 
 for a ZClass?

It needs contain a class that is registered as a base class in the
product's __init__.py "initialize()" method via
"context.registerBaseClass()"

e.g. context.registerBaseClass(ZCatalog.ZCatalog)

See lib/python/Products/ZCatalog/__init__.py for an example...

 Can another Zclass act as a base class for a ZClass?
 If not, why not?

Yep.  Try it.  :-)

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




RE: [Zope] Calling External Method...

2000-05-21 Thread Eric L. Walstad

//  Am I on the right track with this?  Shouldn't it be easy ( secure) to
//  launch a C app on the server and pipe the results back to
//  Zope?  If so, how.
//  The approach I took (above) was recommended by someone else on
//  the list.
//
// I think you should  probably make sure the function works from Python
// (unless you already have).  Use an absolute path to the executable, as
// your cwd may change inside of Zope.  Then when you're able to import the
// Python module that makes up the external method module and execute the
// function successfully, make it an external method within Zope.

That's the frustrating thing, it *is* working from the Python command line
but it is outputting an entire web page, shich may be a problem(?).  I will
compile something that spits out extremely simple output, follow your
directions regarding the absolute path and hard code in the name of the
executable for security sake, then plug that into Zope with an external
method.

Thanks for your help, Chris!

Eric.


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