[Zope] setup.py build

2006-03-16 Thread wavemaster2000

hey I am trying to setup a connection between python and mysql, trying to get
a connection for zope.
I get this error on building
C:\Program Files\Zope-2.9.1\lib\python\Products\MySQL-python-1.2.0>setup.py
buil
d
running build
running build_py
creating build
creating build\lib.win32-2.4
copying _mysql_exceptions.py -> build\lib.win32-2.4
creating build\lib.win32-2.4\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\sets.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\stringtimes.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\mxdatetimes.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\pytimes.py -> build\lib.win32-2.4\MySQLdb
creating build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\__init__.py ->
build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py ->
build\lib.win32-2.4\MySQLdb\constants

copying MySQLdb\constants\ER.py -> build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py ->
build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-2.4\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win32-2.4
creating build\temp.win32-2.4\Release
C:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.exe /c /nologo /Ox /MD
/W3
/GX /DNDEBUG -IC:\Python24\include -IC:\Python24\PC /Tc_mysql.c
/Fobuild\temp.wi
n32-2.4\Release\_mysql.obj
cl : Command line warning D9035 : option 'GX' has been deprecated and will
be re
moved in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
_mysql.c
c:\python24\include\pyconfig.h(130) : fatal error C1083: Cannot open include
fil
e: 'basetsd.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.exe"'
fail
ed with exit status 2

C:\Program Files\Zope-2.9.1\lib\python\Products\MySQL-python-1.2.0>setup.py
buil
d
running build
running build_py
creating build
creating build\lib.win32-2.4
copying _mysql_exceptions.py -> build\lib.win32-2.4
creating build\lib.win32-2.4\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\sets.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\stringtimes.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\mxdatetimes.py -> build\lib.win32-2.4\MySQLdb
copying MySQLdb\pytimes.py -> build\lib.win32-2.4\MySQLdb
creating build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\__init__.py ->
build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py ->
build\lib.win32-2.4\MySQLdb\constants

copying MySQLdb\constants\ER.py -> build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py ->
build\lib.win32-2.4\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-2.4\MySQLdb\constants
running build_ext
building '_mysql' extension
Traceback (most recent call last):
  File "C:\Program
Files\Zope-2.9.1\lib\python\Products\MySQL-python-1.2.0\setup
.py", line 153, in ?
setup(**metadata)
  File "C:\Python24\lib\distutils\core.py", line 149, in setup
dist.run_commands()
  File "C:\Python24\lib\distutils\dist.py", line 946, in run_commands
self.run_command(cmd)
  File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
cmd_obj.run()
  File "C:\Python24\lib\distutils\command\build.py", line 112, in run
self.run_command(cmd_name)
  File "C:\Python24\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
  File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
cmd_obj.run()
  File "C:\Python24\lib\distutils\command\build_ext.py", line 279, in run
self.build_extensions()
  File "C:\Python24\lib\distutils\command\build_ext.py", line 405, in
build_exte
nsions
self.build_extension(ext)
  File "C:\Python24\lib\distutils\command\build_ext.py", line 470, in
build_exte
nsion
depends=ext.depends)
  File "C:\Python24\lib\distutils\msvccompiler.py", line 309, in compile
depends, extra_postargs)
  File "C:\Python24\lib\distutils\ccompiler.py", line 363, in _setup_compile
raise TypeError, \
TypeError: 'include_dirs' (if supplied) must be a list of strings

--
View this message in context: 
http://www.nabble.com/set

Re: [Zope] how to count authenticated and anonymous users currently online ?

2006-03-16 Thread Andrew Milton
Luca Dall'Olio wrote at 2006-3-16 10:01 +0100:

>I would like to know how many anonymous users are online
>and also if some authenticated users are.

You can do this using exuserfolder, you can effectively track the online users
by setting a session limit which discounts them out after a period of 
inactivity.

It also has support for anonymous user tracking, although there might be some
minor tweaking involved to actually get a count.

You need to be using cookies though.

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


Re: [Zope] errors building zope 3

2006-03-16 Thread Stephan Richter
On Thursday 16 March 2006 18:06, David Bear wrote:
> this happens when I run make test as root as well.

Don't run tests as root. I thought the test produces a warning when run as 
root, mhh.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] errors building zope 3

2006-03-16 Thread David Bear
I have python 2.4.2 installed on freebsd. It is located at /home/webenv/bin/python2.4.

I set my pythonpath to /home/webenv/lib/python2.4

Python works.

Then I downloaded and built zope 3 with make sure to use -with-python and -prefix /home/z3.

I run make then make test and get a lot of :

Error in test testNOK (ZEO.tests.testAuth.PlainTextAuth)
Traceback (most recent call last):
  File "/home/webenv/lib/python2.4/unittest.py", line 270, in run
    self.tearDown()
  File
"/home/iddwb/installs/Zope-3.2.0/build/lib.freebsd-4.10-RELEASE-p2-i386-2.4/ZEO/tests/testAuth.py",
line 54, in tearDown
    self.__super_tearDown()
  File
"/home/iddwb/installs/Zope-3.2.0/build/lib.freebsd-4.10-RELEASE-p2-i386-2.4/ZEO/tests/ConnectionTests.py",
line 118, in tearDown
    forker.shutdown_zeo_server(adminaddr)
  File
"/home/iddwb/installs/Zope-3.2.0/build/lib.freebsd-4.10-RELEASE-p2-i386-2.4/ZEO/tests/forker.py",
line 180, in shutdown_zeo_server
    s.connect(adminaddr)
  File "", line 1, in connect
error: (60, 'Operation timed out')


The errors are all 'operation timed out'.

this happens when I run make test as root as well.

any pointers?-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread Paul Winkler
On Thu, Mar 16, 2006 at 05:54:31PM -0500, [EMAIL PROTECTED] wrote:
> I am perhaps being too lazy here.  What is the minimal CMF
> stuff to install to get the CMFCore/FS... objcts installed?

I suspect you can download CMF from zope.org, unzip it,
and install only the CMFCore directory. It shouldn't depend
on anything else.

But I've never done that myself.

-PW
 
> [EMAIL PROTECTED] wrote on 03/16/2006 03:05:45 PM:
> 
> > On Thu, Mar 16, 2006 at 12:59:04PM -0500, Chris Kratz wrote:
> > > Hello Paul,
> > > 
> > > How does the refresh interval work for DirectoryView?
> > 
> > If I wrote it in english, it wouldn't be any shorter than the code
> > in CMFCore/FSObject.py :-)   See the _updateFromFS() method,
> > you can browse it on svn.zope.org.
> > 
> > -- 
> > 
> > Paul Winkler
> > http://www.slinkp.com
> > ___
> > Zope maillist  -  Zope@zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists - 
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> > 
> 
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread jpenny
I am perhaps being too lazy here.  What is the minimal CMF
stuff to install to get the CMFCore/FS... objcts installed?

[EMAIL PROTECTED] wrote on 03/16/2006 03:05:45 PM:

> On Thu, Mar 16, 2006 at 12:59:04PM -0500, Chris Kratz wrote:
> > Hello Paul,
> > 
> > How does the refresh interval work for DirectoryView?
> 
> If I wrote it in english, it wouldn't be any shorter than the code
> in CMFCore/FSObject.py :-)   See the _updateFromFS() method,
> you can browse it on svn.zope.org.
> 
> -- 
> 
> Paul Winkler
> http://www.slinkp.com
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 

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


Re: [Zope] how to count authenticated and anonymous users currently online ?

2006-03-16 Thread Luca Dall'Olio

Dieter Maurer wrote:


Luca Dall'Olio wrote at 2006-3-16 10:01 +0100:
 


I would like to know how many anonymous users are online
   



Do you know what this should mean?

The server has no a priori notion which users are "online".

You may artificially define the term "session"
and then consider the number of session as representing
the number of online users.
If you do this and you use Zope sessions to implement your
notion of "session", then you can look at the "session_data_manager"
to find out how many sessions are available.

 



This would be more than enough to me, to know how many sessions are 
still available.
If I could have the list of the ids of every active session, I could 
easily build the list I need (by the getSessionDataByKey() method)...

I tried with  something like :


A session.


but not even "manager" is allowed to execute that.

Even trying an External Method :

def activesessionlist( self):
   return self.temp_folder.keys()

does not have any effect, instead :

def sessionperiod( self):
   return self.temp_folder.getPeriodSeconds()

works right.

Could you please help me find out the list of active sessions? this is 
driving me crazy...


Thank you very much, Luca


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] "Define Permissions" in ZMI Products

2006-03-16 Thread Jeff Gentry
On Thu, 16 Mar 2006, Dieter Maurer wrote:
> You can let your class derive from "OFS.ObjectManager.ObjectManager"
> (or maybe "OFS.Folder.Folder"). Then you can put objects
> into them.

Yeah, the problem that I thought was going to exist didn't, as it turned
out.

> It is all voluntary work...
> And documentation is less fun than code...

Oh I fully understand, that wasn't a criticism, just a query of where best
to look so as to try to lower the number of stupid questions I ask :)

Thanks for the info.

-J

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


Re: [Zope] "Define Permissions" in ZMI Products

2006-03-16 Thread Dieter Maurer
Jeff Gentry wrote at 2006-3-15 15:55 -0500:
> ...
>In the past when I've worked with external products, all of my template,
>dtml, html, etc files have already been predefined and I've explicitly
>declared them in my code.  for instance, to use a dtml file I would say
>something like:
>blah = DTMLFile('dtml/blah', globals())

You can let your class derive from "OFS.ObjectManager.ObjectManager"
(or maybe "OFS.Folder.Folder"). Then you can put objects
into them.

> ...
>b) What's the best way besides the mailing list to stay up to date with a
>lot of this stuff.  I ask because when I look at Plope I see a link to the
>2.7 Zope Book.

It is all voluntary work...
And documentation is less fun than code...

The 2.7 edition is still a good reference.
What's new in Zope 2.8 is essentially the integration
of Zope3 via Five. You may look for a Five description
to learn what that means.

> When I try to find a copy of the Zope Developer Guide it
>points me to the 2.4 version.

This is still valid.

Only when you want to use the new Zope3 feature via Five,
you will have to consult a Five description (and maybe read
a Zope3 book).

> Most of what I've learned comes from those
>two guides and looking at other products - but then I'll end up seeing
>this or that which I picked up from XYZ product is "the wrong way to do
>it now"

Do not worry too much. The right/wrong way is not absolute/objective
but relative/subjective.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope + Apache on Quad Debian machine

2006-03-16 Thread Dieter Maurer
Hugo Ramos wrote at 2006-3-15 17:45 -0300:
>I'm using Zope+Apache on a 4 xeon's/4GB ram machine running Debian.
>I've noticed that the CPU's never go beyond 30% top occupation... but
>on rush hours the site takes too long to load...
>
>I've been reading about process affinity and how it could speed up
>everything by making zope run on 1 CPU, Apache on another and so on...

A further, more promissing option, is to run several Zope
processes on the same machine (using different ports)
with a load balancer in front feeding them with work.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] how to count authenticated and anonymous users currently online ?

2006-03-16 Thread Dieter Maurer
Luca Dall'Olio wrote at 2006-3-16 10:01 +0100:
>I would like to know how many anonymous users are online

Do you know what this should mean?

The server has no a priori notion which users are "online".

You may artificially define the term "session"
and then consider the number of session as representing
the number of online users.
If you do this and you use Zope sessions to implement your
notion of "session", then you can look at the "session_data_manager"
to find out how many sessions are available.

>and also if 
>some authenticated users are.

Same problem for authenticated users.
You see them coming (because they log in) but you do not see
them going. Thus, you do not know when they become offline...

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] read-only-database

2006-03-16 Thread Dieter Maurer
Ulla Theiss wrote at 2006-3-16 17:00 +0100:
>I want to run the database in read-only mode from CD and configured it 
>accordingly in the zope.conf:
>
>read-only-database on

This is a relict from earlier times. It is no longer working...

Nowadays, you specify the "read-only" property on the
storage object.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] AttributeError on SESSION

2006-03-16 Thread Dieter Maurer
Peter Bengtsson wrote at 2006-3-15 22:02 +:
> ...
>What do you get AttributeError on actually? What line?
>The code above looks just fine. Are you perhaps trying to do session 
>['last view'] somewhere else without checking that it first exists?

The reported problem looks as if the REQUEST were used
after it has been closed.

This can for example happen when an acquisition wrapper
is cached in a "_v_" variable. The wrapper has at its
bottom a stale REQUEST object, now closed.
A closed REQUEST has lost all content of its "other", among them
"SESSION".

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] how to add zopewiki product pages

2006-03-16 Thread Simon Michael

Following on from a zope-dev thread:

On 3/15/06, Chris Withers <[EMAIL PROTECTED]> wrote:

Simon Michael wrote:
> You forgot to make a page under http://zopewiki.org/Products . Doh! :)
>
> Only half joking. If I'm looking for a dimly-remembered product from six
> months ago, this is where I find what I need to know fastest.

Is there any chance I could persuade you to add some info on them all?

(or at least some stub pages you can point me at to edit?)


There are a lot, and more than that I don't think it's a great model to 
have me typing in every product page myself.


On the other hand.. it wouldn't take *that* long..

If you and I another volunteer or three spent 10 minutes a day on #zope, it 
wouldn't take long at all.


Here's three ways to add a page:

- create by url: go to http://zopewiki.org/TheProduct . If it isn't found, 
click the create button. Enter some notes. Even a single hyperlink or a 
one-line description is a good start.


- create in the right place: go to http://zopewiki.org/products . Scroll 
down, look for a suitable sub-category and go there. Enter "TheProduct" in 
the page management form at the bottom of the page and click the create button.


- create by mail-in: subscribe (http://zopewiki.org/ZopeWiki/subscribeform) 
and then forward email to [EMAIL PROTECTED] .


Here are some niceties, which you can follow if you like:

- include the word ZopeProduct, to unambiguously mark this page as a 
distinct zope product. This is a little bit handy for things like 
http://zopewiki.org/WikiStats#products .


- the first paragraph is used as the page summary, so make it a nice snappy 
overview.


- after that, add the home page link and any others you want. Most pages 
use STX's -- definition lists.


- subscribe to the wiki or watch the front page to hear about and augment 
new product pages



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread Paul Winkler
On Thu, Mar 16, 2006 at 12:59:04PM -0500, Chris Kratz wrote:
> Hello Paul,
> 
> How does the refresh interval work for DirectoryView?

If I wrote it in english, it wouldn't be any shorter than the code
in CMFCore/FSObject.py :-)   See the _updateFromFS() method,
you can browse it on svn.zope.org.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread Chris Kratz
On Thursday 16 March 2006 12:18 pm, Paul Winkler wrote:
> On Thu, Mar 16, 2006 at 11:00:11AM -0500, Chris Kratz wrote:
> > > Now, if using svn for source control is the only reason he was using
> > > APE, surely you'd agree that DirecotyViews are a more appropriate
> > > method?
> > >
> > > cheers,
> > >
> > > Chris
> >
> > Yes, you are more or less correct.   The primary reason we went to APE
> > was after having tried the nightmares of the various zope cvs products
> > which just seemed to be able to tie themselves into knots after awhile. 
> > APElib allowed us to persist all objects as plain text files on the file
> > system so that normal file system tools can be used for development. 
> > After we went to APE we moved from CVS to subversion.  Now most of us
> > develop using a text editor directly modifying our zope objects.  We have
> > the refresh interval dialed down to 1s on our dev boxes and 5-10 minutes
> > on the live servers.  This allows us to easily shoehorn minor patches
> > (fix - commit - update server) without any service interruption on the
> > live server.  So, our reasons for using Apelib were...
> >
> > 1. Allow use of source control (branching, diffs, revision history, etc)
> > on all content types as plain text files, not python pickles.
> > 2. Allow editing of zope objects (DTML, ZPT, ZSQL, py script) externally
> > in appropriate editor.
> > 3. Allow us to quickly push out minor patches to running servers.
> > 4. A distant final item was using TTW editing to do minor tweaks.
>
> DirectoryViews would mean you'd lose #4.
> Otherwise, I think they'd work for you and it's a much simpler solution
> than ape.
>
> Also, if you have any persistent objects for which there isn't an existing
> FSObject-derived version, you'd have to write one.
>
> Another issue is that AFAIK there's no way to control the refresh
> interval of FSObject subclasses.  I guess you could monkeypatch
> FSObject._updateFromFS.  You might want to do that anyway so you
> don't have to run your production servers in debug mode.

Hello Paul,

How does the refresh interval work for DirectoryView?  Obviously it is not 
adjustable, so does it only read when it needs to the first time in and after 
that it hits the cache (until evicted)?

I did extensive profiling of Apelib at one point and all the time was getting 
soaked up with ape checking mod times on thousands of files on the check 
interval.  You don't notice this with a small site, but as the site grows it 
becomes noticeable.  At one point I seriously thought about writing an 
external process/thread that would periodically sweep the files and check for 
modified items and then attempt to evict those items from the cache within 
each zope thread.  Or even better, load the object into the cache out of band 
so it's there the next time the thread runs.  I think that would have made 
apelib much faster and still responsive to changes on the file system.  We 
never got it production ready though.

-Chris

-- 
Chris Kratz
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread Paul Winkler
On Thu, Mar 16, 2006 at 11:00:11AM -0500, Chris Kratz wrote:
> > Now, if using svn for source control is the only reason he was using
> > APE, surely you'd agree that DirecotyViews are a more appropriate method?
> >
> > cheers,
> >
> > Chris
> 
> Yes, you are more or less correct.   The primary reason we went to APE was 
> after having tried the nightmares of the various zope cvs products which just 
> seemed to be able to tie themselves into knots after awhile.  APElib allowed 
> us to persist all objects as plain text files on the file system so that 
> normal file system tools can be used for development.  After we went to APE 
> we moved from CVS to subversion.  Now most of us develop using a text editor 
> directly modifying our zope objects.  We have the refresh interval dialed 
> down to 1s on our dev boxes and 5-10 minutes on the live servers.  This 
> allows us to easily shoehorn minor patches (fix - commit - update server) 
> without any service interruption on the live server.  So, our reasons for 
> using Apelib were...
>  
> 1. Allow use of source control (branching, diffs, revision history, etc) on 
> all content types as plain text files, not python pickles.
> 2. Allow editing of zope objects (DTML, ZPT, ZSQL, py script) externally in 
> appropriate editor.
> 3. Allow us to quickly push out minor patches to running servers.
> 4. A distant final item was using TTW editing to do minor tweaks.

DirectoryViews would mean you'd lose #4.
Otherwise, I think they'd work for you and it's a much simpler solution
than ape.

Also, if you have any persistent objects for which there isn't an existing
FSObject-derived version, you'd have to write one.

Another issue is that AFAIK there's no way to control the refresh
interval of FSObject subclasses.  I guess you could monkeypatch
FSObject._updateFromFS.  You might want to do that anyway so you
don't have to run your production servers in debug mode.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread Chris Kratz
> Now, if using svn for source control is the only reason he was using
> APE, surely you'd agree that DirecotyViews are a more appropriate method?
>
> cheers,
>
> Chris

Yes, you are more or less correct.   The primary reason we went to APE was 
after having tried the nightmares of the various zope cvs products which just 
seemed to be able to tie themselves into knots after awhile.  APElib allowed 
us to persist all objects as plain text files on the file system so that 
normal file system tools can be used for development.  After we went to APE 
we moved from CVS to subversion.  Now most of us develop using a text editor 
directly modifying our zope objects.  We have the refresh interval dialed 
down to 1s on our dev boxes and 5-10 minutes on the live servers.  This 
allows us to easily shoehorn minor patches (fix - commit - update server) 
without any service interruption on the live server.  So, our reasons for 
using Apelib were...
 
1. Allow use of source control (branching, diffs, revision history, etc) on 
all content types as plain text files, not python pickles.
2. Allow editing of zope objects (DTML, ZPT, ZSQL, py script) externally in 
appropriate editor.
3. Allow us to quickly push out minor patches to running servers.
4. A distant final item was using TTW editing to do minor tweaks.

The only downsides we've found for apelib are that 1, it's slow and it's been 
end of lifed by it's creator.  Two of us have taken stabs at trying to make 
it so it can run in newer versions of zope, but our deep zope fu isn't up to 
the challenge (nor do we have a lot of time).  And it seems that low level 
stuff for zodb storage's change with every release (as shane noted in his eol 
announcement).

-Chris

-- 
Chris Kratz
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] read-only-database

2006-03-16 Thread Ulla Theiss

Hello list,

I want to run the database in read-only mode from CD and configured it 
accordingly in the zope.conf:


read-only-database on
enable-product-installation off
zserver-read-only-mode on

Starting Zope, I get the following error:

Traceback (most recent call last):
 File "\Programme\Zope\lib\python\Zope2\Startup\run.py", line 56, in ? 
run()

 File "\Programme\Zope\lib\python\Zope2\Startup\run.py", line 21, in run
   starter.prepare()
 File "E:\Programme\Zope\lib\python\Zope2\Startup\__init__.py", line 
98, in pre

pare
   self.startZope()
 File "E:\Programme\Zope\lib\python\Zope2\Startup\__init__.py", line 
257, in st

artZope
   Zope2.startup()
 File "E:\Programme\Zope\lib\python\Zope2\Startup\__init__.py", line 
47, in sta

rtup
   starter.setConfiguration(cfg)
 File "D:\Programme\Zope\lib\python\Zope2\App\startup.py", line 56, in 
startup
 File "D:\Programme\Zope\lib\python\DBTab\DBTab.py", line 96, in 
getDatabase
 File "D:\Programme\Zope\lib\python\DBTab\DBTab.py", line 113, in 
_createDataba

se
 File "E:\Programme\Zope\lib\python\Zope2\Startup\datatypes.py", line 
163, in o

pen
   DB = self.createDB()
 File "E:\Programme\Zope\lib\python\Zope2\Startup\datatypes.py", line 
160, in c

reateDB
   return ZODBDatabase.open(self)
 File "D:\Programme\Zope\lib\python\ZODB\config.py", line 97, in open
 File "D:\Programme\Zope\lib\python\ZODB\config.py", line 133, in open
 File "D:\Programme\Zope\lib\python\ZODB\FileStorage\FileStorage.py", 
line 112,

in __init__
 File "D:\Programme\Zope\lib\python\ZODB\lock_file.py", line 57, in 
__init__

IOError: [Errno 13] Permission denied: '\\Zope-Instance/var/Data.fs.lock'

r+ means opening the file for updating. This has not to do anything with 
read-only.


Does anybody know what I have to configure additionaly, that read-only 
works?


I run Zope 2.8.4 on windows.

Many thanks in advance,
Ulla.




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread Chris Kratz
On Thursday 16 March 2006 02:41 am, Chris Withers wrote:
> Chris Kratz wrote:
> > Thanks for the pointers.  But, isn't directory view part of plone?
>
> Yes, but they are more a part of CMF. You can either just install the
> CMFCore product, or I remember there being a couple of packagings on
> DirectoryView on its own, purely for doing what you want. I don't have
> urls to them handy, sadly...
> ...
> Well, it'll be miles quicker that APE ;-)
>
> [EMAIL PROTECTED] wouldn't be a bad place to start...
>
> Chris

Thanks for the pointers.  Looks like I'm going to have to do some 
experimentation.
-- 
Chris Kratz
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope + Apache on Quad Debian machine

2006-03-16 Thread Paul Winkler
On Thu, Mar 16, 2006 at 02:38:04PM +0100, Stefan H. Holek wrote:
> a) Your system may be I/O bound - not CPU bound - so you will never  
> see the CPU max out because the limiting factors are memory and disk/ 
> network access.

On that note, if running linux on a box with IDE disks, make sure
that the disks have dma turned on. This can have a big impact on
overall system responsiveness.  man hdparm for details.

-PW
 
-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope + Apache on Quad Debian machine

2006-03-16 Thread Hugo Ramos
Thank you all !! (very insane multiple exclamation marks)

I've been trying different scenarios and Zope performance increased 10
to 11 times faster...


Cheers
Hugo




On 3/16/06, Stefan H. Holek <[EMAIL PROTECTED]> wrote:
> a) Your system may be I/O bound - not CPU bound - so you will never
> see the CPU max out because the limiting factors are memory and disk/
> network access.
>
> b) Make sure to tune Python's checkinterval. While you should
> *always* do that, it is especially important on multi-processor/multi-
> core hardware. The rule of thumb is to run the pystone benchmark,
> divide the "pystones" your machine benchmarks at by 50, and put the
> result into etc/zope.conf.
>
> e.g:
> python-check-interval 1000
>
> Once you get the checkinterval right, playing with processor affinity
> becomes a pointless exercise, in my experience.
>
> c) Always use profiling tools for performance analysis. "Guessing"
> rarely leads to effective optimizations. ZopeProfiler and PTProfiler
> come to mind.
>
> HTH,
> Stefan
>
>
> On 15. Mär 2006, at 21:45, Hugo Ramos wrote:
>
> > Yellow,
> >
> > I'm using Zope+Apache on a 4 xeon's/4GB ram machine running Debian.
> > I've noticed that the CPU's never go beyond 30% top occupation... but
> > on rush hours the site takes too long to load...
> >
> > I've been reading about process affinity and how it could speed up
> > everything by making zope run on 1 CPU, Apache on another and so on...
> >
> > Has any1 tried this before? Can you point me to some documentation?
> > What's your experience? is it true that not doing this the 4 cpu's
> > will not be 100% used?
>
> --
> Anything that happens, happens.  --Douglas Adams
>
>
>


--
Hugo Ramos - [EMAIL PROTECTED]
http://www.orkut.com/Profile.aspx?uid=10082105466310142690
http://otugga.blogspot.com/
http://otuggapoesia.blogspot.com/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] iptables problem

2006-03-16 Thread Bert Vanderbauwhede
> Every time i reboot the server the iptables also reboot and i have to set
> them up again for people to access zope
>
> Does anyone know how to stop this happening?

After you configured iptables, do "service iptables save". That should do it.


Bert...
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] iptables problem

2006-03-16 Thread Jens Vagelpohl


On 16 Mar 2006, at 14:37, JulianRead wrote:



Hi ive installed zope on a dedicated server with linux fedora core3  
on port

8080

Ive used webmin to put port 8080 onto my linuix packet filtering  
iptable


Every time i reboot the server the iptables also reboot and i have  
to set

them up again for people to access zope

Does anyone know how to stop this happening?


I suggest you read up on webmin and iptables. This question has  
nothing to do with Zope. webmin is probably not doing the right thing.


jens

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] iptables problem

2006-03-16 Thread JulianRead

Hi ive installed zope on a dedicated server with linux fedora core3 on port
8080

Ive used webmin to put port 8080 onto my linuix packet filtering iptable

Every time i reboot the server the iptables also reboot and i have to set
them up again for people to access zope

Does anyone know how to stop this happening?
--
View this message in context: 
http://www.nabble.com/iptables-problem-t1291730.html#a3437039
Sent from the Zope - General forum at Nabble.com.

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


Re: [Zope] Forum product

2006-03-16 Thread Jens Vagelpohl


On 16 Mar 2006, at 14:15, cristina clavijo wrote:

Hi! I need a forum in my plone site which has the following  
installation:

- Zope 2.7.8
- Plone 2.1.2
- Python 2.3.5
- LinguaPlone 0.9

I have tried the following ones with no succeed:
- CMFBoard doesn't work with Plone 2.1.x
- PloneBoard works only with Zope 2.8
- SimpleForum works correctly but it's too simple.
- CMFForum gives me an error when trying to add it. (traceback  
attached)


Plone 2.1.2 works with Zope 2.8.6 if you look at the installation  
documentation. Why don't you use that and then try PloneBoard again?


jens

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Forum product

2006-03-16 Thread cristina clavijo

Hi! I need a forum in my plone site which has the following installation:
- Zope 2.7.8
- Plone 2.1.2
- Python 2.3.5
- LinguaPlone 0.9

I have tried the following ones with no succeed:
- CMFBoard doesn't work with Plone 2.1.x
- PloneBoard works only with Zope 2.8
- SimpleForum works correctly but it's too simple.
- CMFForum gives me an error when trying to add it. (traceback attached)

Thanks for your attention
Cris.


Traceback (innermost last):
 Module ZPublisher.Publish, line 101, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 39, in call_object
 Module Shared.DC.Scripts.Bindings, line 306, in __call__
 Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
 Module Products.CMFCore.FSPageTemplate, line 195, in _exec
 Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
 Module Products.PageTemplates.PageTemplate, line 96, in pt_render
  - /rjg/forum.2006-03-16.9207303151>

 Module TAL.TALInterpreter, line 190, in __call__
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 671, in do_useMacro
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 409, in do_optTag_tal
 Module TAL.TALInterpreter, line 394, in do_optTag
 Module TAL.TALInterpreter, line 389, in no_tag
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 702, in do_defineSlot
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 409, in do_optTag_tal
 Module TAL.TALInterpreter, line 394, in do_optTag
 Module TAL.TALInterpreter, line 389, in no_tag
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 650, in do_defineMacro
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 694, in do_defineSlot
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 650, in do_defineMacro
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 409, in do_optTag_tal
 Module TAL.TALInterpreter, line 394, in do_optTag
 Module TAL.TALInterpreter, line 389, in no_tag
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 650, in do_defineMacro
 Module TAL.TALInterpreter, line 234, in interpret
 Module TAL.TALInterpreter, line 460, in do_setLocal_tal
 Module Products.PageTemplates.TALES, line 221, in evaluate
  - URL: file:CMFPlone/skins/plone_templates/folder_contents.pt
  - Line 18, Column 4
  - Expression: 
standard:'batch|python:contentsMethod(contentFilter,batch=True, 
b_size=b_size)'

  - Names:
 {'container': ,
  'context': ,
  'default': 0x00F689E0>,

  'here': ,
  'loop': ,
  'modules': instance at 0x00F6FD78>,

  'nothing': None,
  'options': {'args': ()},
  'repeat': ,
  'request': URL=http://localhost:8090/rjg/forum.2006-03-16.9207303151/folder_contents>,

  'root': ,
  'template': /rjg/forum.2006-03-16.9207303151>,

  'traverse_subpath': [],
  'user': rjg}
 Module Products.PageTemplates.Expressions, line 174, in __call__
 Module Products.PageTemplates.Expressions, line 162, in _eval
 Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
  - __traceback_info__: contentsMethod(contentFilter,batch=True, 
b_size=b_size)
 Module Python expression "contentsMethod(contentFilter,batch=True, 
b_size=b_size)", line 1, in 

 Module Products.CMFCore.FSPythonScript, line 108, in __call__
 Module Shared.DC.Scripts.Bindings, line 306, in __call__
 Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
 Module Products.CMFCore.FSPythonScript, line 163, in _exec
 Module None, line 25, in getFolderContents
  - /rjg/forum.2006-03-16.9207303151>

  - Line 25
 Module Products.CMFCore.FSPythonScript, line 108, in __call__
 Module Shared.DC.Scripts.Bindings, line 306, in __call__
 Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
 Module Products.CMFCore.FSPythonScript, line 163, in _exec
TypeError: queryCatalog() takes no arguments (3 given)
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope + Apache on Quad Debian machine

2006-03-16 Thread Stefan H. Holek
a) Your system may be I/O bound - not CPU bound - so you will never  
see the CPU max out because the limiting factors are memory and disk/ 
network access.


b) Make sure to tune Python's checkinterval. While you should  
*always* do that, it is especially important on multi-processor/multi- 
core hardware. The rule of thumb is to run the pystone benchmark,  
divide the "pystones" your machine benchmarks at by 50, and put the  
result into etc/zope.conf.


e.g:
python-check-interval 1000

Once you get the checkinterval right, playing with processor affinity  
becomes a pointless exercise, in my experience.


c) Always use profiling tools for performance analysis. "Guessing"  
rarely leads to effective optimizations. ZopeProfiler and PTProfiler  
come to mind.


HTH,
Stefan


On 15. Mär 2006, at 21:45, Hugo Ramos wrote:


Yellow,

I'm using Zope+Apache on a 4 xeon's/4GB ram machine running Debian.
I've noticed that the CPU's never go beyond 30% top occupation... but
on rush hours the site takes too long to load...

I've been reading about process affinity and how it could speed up
everything by making zope run on 1 CPU, Apache on another and so on...

Has any1 tried this before? Can you point me to some documentation?
What's your experience? is it true that not doing this the 4 cpu's
will not be 100% used?


--
Anything that happens, happens.  --Douglas Adams


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


[Zope] to inherit from CMFDefault.NewsItem

2006-03-16 Thread Sergio Gomez
Hi,

In my development I need a product which is basicly like
CMFDefault.NewsItem, but I need to add a Selection field
(SelectionWidget). Is there a way of inheriting CMFDefault.NewsItem
and just add what I need?

Thanks,
Sergio
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] Zope + Apache on Quad Debian machine

2006-03-16 Thread John Snowdon
Why do you want to do this? Do you believe that this is more effective
or efficient than the scheduling algorithm that Linux uses? Binding an
application to a single processor makes very little sense at all.

If Zope really is your limiting factor, then you need to spread that
load over as many processors as possible, not lock it down to a single
cpu - if you do that, then the rest of the processors sit idle while
waiting for Zope to respond.

Read up on ZEO. Then set yourself a ZEO server up and a couple of ZEO
clients, balance your requests between the two using pound, apache or
squid. I can guarantee you that if your system is Zope limited, then
this will greatly increase responsiveness and the number of requests you
can process simultaneously - I run over a dozen dual processor machines
hosting approx 60 Zope applications across them, all using ZEO - an
average of 5 or 6 instances per system, we have no problem with Zope
only using one processor; the applications that are across most machines
(up to 10 in our largest application) are very, very fast indeed and can
cope with all the concurrent users we can throw at it.

Your problem is not Zope itself... you definitely need to investigate
further before coming to the conclusion that binding a Zope instance to
a single processor is a solution - if you'll excuse me, that's a rather
simplistic view to take. 

I was also suggest reading up on Apache, Linux, Proxying/Caching,
Clustering and Load Balancing - they're all factors to consider when
developing and deploying a web application.

 John Snowdon - IT Support Specialist
-==-
 School of Medical Education Development 
 Faculty of Medical Sciences Computing
 University of Newcastle

 Email : [EMAIL PROTECTED]


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On 
>Behalf Of Hugo Ramos
>Sent: 15 March 2006 20:45
>To: [Zope]
>Subject: [Zope] Zope + Apache on Quad Debian machine
>
>
>Yellow,
>
>I'm using Zope+Apache on a 4 xeon's/4GB ram machine running Debian.
>I've noticed that the CPU's never go beyond 30% top occupation... but
>on rush hours the site takes too long to load...
>
>I've been reading about process affinity and how it could speed up
>everything by making zope run on 1 CPU, Apache on another and so on...
>
>Has any1 tried this before? Can you point me to some documentation?
>What's your experience? is it true that not doing this the 4 cpu's
>will not be 100% used?
>
>
>Cheers
>--
>Hugo Ramos - [EMAIL PROTECTED]
>http://www.orkut.com/Profile.aspx?uid=10082105466310142690
>___
>Zope maillist  -  Zope@zope.org
>http://mail.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Zope + Apache on Quad Debian machine

2006-03-16 Thread Martijn Pieters
On 3/16/06, Tino Wildenhain <[EMAIL PROTECTED]> wrote:
> > Hey... but thank you Jens for spending all that time writing an email
> > that doesn't help any1 at all...!!!
>
> check google for "multiple use of exclamation marks".

Or look up Terry Pratchett quotes on www.lspace.org:

'"Multiple exclamation marks," he went on, shaking his head, "are a
sure sign of a diseased mind."' -- Eric

"Five exclamation marks, the sure sign of an insane mind." -- Reaper Man

"And all those exclamation marks, you notice? Five? A sure sign of
someone who wears his underpants on his head." -- Maskerade

Terry doesn't like multiple exclamation marks.

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Using Twisted rather than ZServer with Zope >= 2.9.0

2006-03-16 Thread Chris McDonough
You're right.  If you need it, and don't have time to make it prod- 
ready, you could probably get someone from the Twisted community to  
help if they used that code as a reference.


- C

On Mar 15, 2006, at 9:59 PM, Dennis Allison wrote:



Ummm well the sprint code does not look like it's production  
ready.

:-)  I was hoping that the experiment had been taken a bit further.


On Wed, 15 Mar 2006, Chris McDonough wrote:


Only minimally, AFAIK.  A sprint in 2004 had this as the topic:

http://www.zope.org/Members/adytumsolutions/pycon2004/TwistedZope

- C

On Mar 15, 2006, at 8:38 PM, Dennis Allison wrote:



I know Twisted is used in the Zope 3 space.  Has anyone
experimented with
replacing ZServer?  A quick Google search turned up litte  
information.

Pointers?  Experience?



--

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





--



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope + Apache on Quad Debian machine

2006-03-16 Thread S.Hayles


You can do something like:

/usr/bin/taskset -c 0 zeo/bin/zeoctl start
/usr/bin/taskset -c 1 zope.a/bin/zopectl start
/usr/bin/taskset -c 2 zope.b/bin/zopectl start
/usr/bin/taskset -c 3 zope.c/bin/zopectl start

You then need to load-balance across the ZOPE instances with (eg Pound or 
Squid).


AFAIK it's only Python-based programs that need binding to a particular 
CPU, so Apache, Pound and Squid are fine without setting any affinity.


Since ZEO is not very CPU intensive, you can share it's CPU with another 
ZOPE instance should you wish.


We're running twin ZOPE instances and ZEO on a dual CPU Debian box, load 
balancing with Pound and caching and URL rewriting with Apache. The 
feeling these days seems to be that load balancing and caching with Squid 
gives better performance.


Steven

Steven Hayles - Computer Systems Developer, [EMAIL PROTECTED]
Learning Technology Section, Computer Centre, 
University of Leicester, University Rd, Leicester, LE1 7RH 
Fax (0/+44)116 2525027 WWW http://www.le.ac.uk/home/sh23>


On Wed, 15 Mar 2006, Hugo Ramos wrote:


Yellow,

I'm using Zope+Apache on a 4 xeon's/4GB ram machine running Debian.
I've noticed that the CPU's never go beyond 30% top occupation... but
on rush hours the site takes too long to load...

I've been reading about process affinity and how it could speed up
everything by making zope run on 1 CPU, Apache on another and so on...

Has any1 tried this before? Can you point me to some documentation?
What's your experience? is it true that not doing this the 4 cpu's
will not be 100% used?


Cheers
--
Hugo Ramos - [EMAIL PROTECTED]
http://www.orkut.com/Profile.aspx?uid=10082105466310142690
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] how to count authenticated and anonymous users currently online ?

2006-03-16 Thread Luca Dall'Olio
I would like to know how many anonymous users are online and also if 
some authenticated users are.
I tried with "guest counter" but couldn't make it work, and tried also 
to inspect temp-folder/session_data but I get a security error.


Is there a way to accomplish this?

Thank you everybody in advance for any hint!

Luca

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Zope + Apache on Quad Debian machine

2006-03-16 Thread Bakhtiar A Hamid
> Hugo Ramos wrote:>> However, as an aside, how have you established that processor affinity
> is the problem here? I'd suggest looking at your disk and memory usage> patterns. i/o wait or swap death could quite easily see your processors> only hitting 30% even if the affinity is locked down exactly as you'd
> like...

google for taskset and debian.

that'll help tie a process to a cpu

hth
-- http://myzope.kedai.com.my - my-zope org
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Zope + Apache on Quad Debian machine

2006-03-16 Thread Max M

Chris Withers wrote:

Hugo Ramos wrote:

However, as an aside, how have you established that processor affinity 
is the problem here? I'd suggest looking at your disk and memory usage 
patterns. i/o wait or swap death could quite easily see your processors 
only hitting 30% even if the affinity is locked down exactly as you'd 
like...



With a 4 GB machine that is probably not a problem. You can usually run 
quite a few sites with that much memory.



--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Zope + Apache on Quad Debian machine

2006-03-16 Thread Chris Withers

Hugo Ramos wrote:

I think these questions are very ZOPE RELATED since I asked them in a
Zope mailing list don't you think?


No, we don't. This has nothing specific to do with Zope. Process 
affinity is an OS-specific thing, and if you care about it you should as 
on an OS-specific forum. In your case, you're probably going to get help 
much more quickly and usefully on #debian on irc.freenode.net. The guys 
there are really clued up.


However, as an aside, how have you established that processor affinity 
is the problem here? I'd suggest looking at your disk and memory usage 
patterns. i/o wait or swap death could quite easily see your processors 
only hitting 30% even if the affinity is locked down exactly as you'd 
like...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread Chris Withers

Hi Chris,

Please keep replies on the list...

Chris Kratz wrote:
Thanks for the pointers.  But, isn't directory view part of plone?  


Yes, but they are more a part of CMF. You can either just install the 
CMFCore product, or I remember there being a couple of packagings on 
DirectoryView on its own, purely for doing what you want. I don't have 
urls to them handy, sadly...


this point as it's mainly a database app and not a content based app.  Also, 
what about performance?  Ape has quite a hit compared to standared data.fs, 
but gives us enough benefit (ease of development) that we have stayed with 
it.  How does DirectoryView compare with the normal data.fs?


Well, it'll be miles quicker that APE ;-)

Is there some place I can learn more about DirectoryViews?  I havn't had much 
luck with either zope, plone or google search.


[EMAIL PROTECTED] wouldn't be a bad place to start...

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Ape

2006-03-16 Thread Chris Withers

Paul Winkler wrote:

On Tue, Mar 14, 2006 at 10:29:05PM +, Chris Withers wrote:

Ouch, DirectoryViews are more likely what you want...


Sure, they're great. But through the web they are read-only. 
That's hardly a complete replacement for Ape.

Depends on CK's real needs of course.


Let's have a read shall we:

>> Chris Kratz wrote:
>>> We are very interested in this as well.  We have a large 
application using
>>> Apelib right now to persist our zope application onto the 
filesystem so we

>>> can use subversion.

Now, if using svn for source control is the only reason he was using 
APE, surely you'd agree that DirecotyViews are a more appropriate method?


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] display results from external source in zpt

2006-03-16 Thread Chris Withers

Andreas Jung wrote:


allow_module() is not a solution for all and everything (consider it a 
hack).


Don't be rediculous. It's not a hack, it's the documented way of 
providing security assertions from existing code without having to patch 
it. That sounds a lot like what the component architecture is, and I 
don't think anyone's likely to call that a hack.


However, those allow_* functions are rather confusing. The documentation 
could do with beefing up and the circumstances where they don't work 
should be raised as bugs...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] display results from external source in zpt

2006-03-16 Thread Chris Withers

Dean Hale wrote:


I'm assuming i need to add some extra details to the __init__.py file is 
this correct and if so have you any ideas what they would be


from Products.PythonScripts.Utility import allow_module

allow_module('urllib')


I dunno if it'll help, but try enabling verbose security in your zope.conf.

However, you may just need to fiddle.

Try adding some allow_* statements for urlopen as well as anything else 
you import from urllin and see how you go.


That said, it may be easier (and execute faster) if you just duck out 
and use an external method.


Also, be aware that doing what you're doing, the performance of your 
website now depends on the performance of another website, and the 
network between your webserver and the other webserver. This may not be 
what you want. You should certainly look at introducing a socket timeout 
for those connections


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope + Apache on Quad Debian machine

2006-03-16 Thread Reinoud van Leeuwen
On Wed, Mar 15, 2006 at 05:45:23PM -0300, Hugo Ramos wrote:
> Yellow,
> 
> I'm using Zope+Apache on a 4 xeon's/4GB ram machine running Debian.
> I've noticed that the CPU's never go beyond 30% top occupation... but
> on rush hours the site takes too long to load...
> 
> I've been reading about process affinity and how it could speed up
> everything by making zope run on 1 CPU, Apache on another and so on...
> 
> Has any1 tried this before? Can you point me to some documentation?
> What's your experience? is it true that not doing this the 4 cpu's
> will not be 100% used?

Have you considered that your setup might be IO bound?

-- 
__
"Nothing is as subjective as reality"
Reinoud van Leeuwen[EMAIL PROTECTED]
http://www.xs4all.nl/~reinoud
__
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Zope + Apache on Quad Debian machine

2006-03-16 Thread Max M

Hugo Ramos wrote:

"Has any1 tried this before? Can you point me to some documentation?
What's your experience? is it true that not doing this the 4 cpu's
will not be 100% used?"

I think these questions are very ZOPE RELATED since I asked them in a
Zope mailing list don't you think?



Eh ... it doesn't become zope related because you ask it in a Zope 
group. Do you also ask how to write books on a Microsoft Word list?




I'm asking about Zope user/administrator experience related to Zope
use on a quad machine!!!

Of course if some1 tells me how to do it using OS related stuff this
is STILL Zope related!


Assigning a process to a cpu is a general os problem, and not really 
related to zope. Zope is just another process.


eg: http://www.google.com/search?q=cpu+affinity

plone.org is running on a dual cpu box, with one zeo and a zeo client, 
so clearly it can be done.




Hey... but thank you Jens for spending all that time writing an email
that doesn't help any1 at all...!!!


Sarkasm against a long time, and helpfull, list user will not help you 
any at all.



--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )