[Zope] Re: adding a custom attribute to a mybrain object

2006-01-04 Thread Huron
Hi Florent, and thanks for your reply ...

debugging those brains objects, I've seen that there is (so to say) a double
indirection to store attributes, involving this __record_schema__ you're
talking about :

>>> myBrain.__record_schema__['mynewatttribute']=35
>>> myBrain[35]='my_new_value'
>>> myBrain.mynewatttribute
'my_new_value'

This seems to work, as long as the new attribute name does not collide 
with
a metadata name or with an existing metadata index (35 in my example) ...

--
huron

___
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] Cookie Crumbler

2006-01-04 Thread Jonathan



I haven't used Cookie Crumbler, but I do use 
cookies for user authentication, and when I want to 'log out' a user I just 
write a 'false' value to the cookie, then when the authentication routine checks 
the cookie it gets an invalid value and the user is deemed 
'unauthenticated/anonymous'.
 
hth
 
Jonathan
 

  - Original Message - 
  From: 
  Infor 
  Gates 
  To: zope@zope.org 
  Sent: Wednesday, January 04, 2006 11:17 
  PM
  Subject: Fwd: [Zope] Cookie 
Crumbler
  
  Sorry for the typo error at the last 
  sentence.However, neither this nor the original logged_out dtml seems 
  to work.Is it because I am using frames in my dtml that causes it or I am 
  getting the concept of how Cookie Crumbler works - WRONG ?Thank 
  you.Note: forwarded message attached.
  
  
  Yahoo! 
  DSL Something to write home about. Just $16.99/mo. or less
  
  

  ___Zope maillist  
  -  
  Zope@zope.orghttp://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 )


Fwd: [Zope] Cookie Crumbler

2006-01-04 Thread Infor Gates
Sorry for the typo error at the last sentence.However, neither this nor the original logged_out dtml seems to work.Is it because I am using frames in my dtml that causes it or I am getting the concept of how Cookie Crumbler works - WRONG ?Thank you.Note: forwarded message attached.
		 Yahoo! DSL Something to write home about. Just $16.99/mo. or less--- Begin Message ---
Dear zopistI have a trying time using Cookie Crumbler 1.2 with Zope2.8.4 (windows version).I could NOT figure out how to log out a user.  I have simplified to the orginal logged_out form to this:    logoutHowever, neither this nor the original logged_out dtml seems to work.Is it because I am using frames in my dtml that causes it or I am getting the concept of how Cookie Crumbler works?Thank you.
	
		Yahoo! Photos 
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.___
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 )
--- End Message ---
___
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] Cookie Crumbler

2006-01-04 Thread Infor Gates
Dear zopistI have a trying time using Cookie Crumbler 1.2 with Zope2.8.4 (windows version).I could NOT figure out how to log out a user.  I have simplified to the orginal logged_out form to this:    logoutHowever, neither this nor the original logged_out dtml seems to work.Is it because I am using frames in my dtml that causes it or I am getting the concept of how Cookie Crumbler works?Thank you.
	
		Yahoo! Photos 
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.___
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: dynamically creating zip file, returning to user

2006-01-04 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John Toews wrote:
> Zope 2.8.0, Python 2.3.5
> 
> I'm having a heck of a time figuring out how to zip up some files in my zope
> instance and return them to the user. I can sucessfully create a zip file on
> the local file system, but if I try to pass it back to the user it is
> corrupted. Of course I'd rather not create this tmp3.zip file, so if there's
> a way around that (which I'm sure there is!) please do let me know.
> 
> filename = 'test.zip'
> response = self.REQUEST.RESPONSE
> response.setHeader('Content-Type','application/zip')
>  response.setHeader('Content-Disposition','attachment; filename=%s'
> % filename)
> # tried zf = zipfile.ZipFile( response, 'w' ) but get error, ZHTTP
> object doesn't have tell method
> zf = zipfile.ZipFile( '/tmp3.zip', 'w' )
> zf.writestr( 'testfilename', str( self._getOb( testfileid ) ) )
> zf.close()
> f = open('/tmp3.zip')
> return f.read()
> 
> Any thoughts on what fairly obvious thing I'm doing wrong? Thanks!

A couple of thoughts:

 - Be sure you open the file in binary mode ('wb' rather than 'w');
   this won't help unless you are running Zope on Windows, however,
   because Windows is the only platform where the C runtime will mangle
   the line endings for files it thinks are "text", rather than
   "binary".

 - You could use a StringIO instance, rather than a tempfile;  YMMV.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDvI6r+gerLs4ltQ4RAvrMAJ9oH0gtorWuW6NeowfVCfZ6PbyYSgCfbCHd
8VhNtnUrBeEiIp8sSLSVQOg=
=f+qw
-END PGP SIGNATURE-

___
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] dynamically creating zip file, returning to user

2006-01-04 Thread John Toews
Zope 2.8.0, Python 2.3.5



I'm having a heck of a time figuring out how to zip up some files in my
zope instance and return them to the user. I can sucessfully create a
zip file on the local file system, but if I try to pass it back to the
user it is corrupted. Of course I'd rather not create this tmp3.zip
file, so if there's a way around that (which I'm sure there is!) please
do let me know.



    filename = 'test.zip'

    response = self.REQUEST.RESPONSE

    response.setHeader('Content-Type','application/zip')

    response.setHeader('Content-Disposition','attachment; filename=%s' % filename)
    # tried zf =
zipfile.ZipFile( response, 'w' ) but get error, ZHTTP object doesn't
have tell method
    zf = zipfile.ZipFile( '/tmp3.zip', 'w' )
    zf.writestr( 'testfilename', str( self._getOb( testfileid ) ) )
    zf.close()
    f = open('/tmp3.zip')
    return f.read()

Any thoughts on what fairly obvious thing I'm doing wrong? Thanks!
John
___
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: adding a custom attribute to a mybrain object

2006-01-04 Thread Florent Guillaume

Huron wrote:

I'd like to sort of add some metadata to a returned mybrain before it 
gets
handed to the skin for display.
I've been thinking that it could be possible to just do a 'setattr' on 
my
mybrain ... but it's not working since the brain is a very special object
relatively to it's attributes (from what I understand browsing the code).
It there a way to do that properly ?


Brains are based on Record, a class dating back to the origins of zope. 
Records are quite... peculiar, let's say. They only allow setting 
attributes which are in their class's __record_schema__. Go figure.


If I had your problem, I'd copy all the brain attributes on an instance 
of another trivial class deriving from object. brain.__record_schema__ 
will come in handy there.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [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 )


[Zope] adding a custom attribute to a mybrain object

2006-01-04 Thread Huron
Hi,

I'd like to sort of add some metadata to a returned mybrain before it 
gets
handed to the skin for display.
I've been thinking that it could be possible to just do a 'setattr' on 
my
mybrain ... but it's not working since the brain is a very special object
relatively to it's attributes (from what I understand browsing the code).
It there a way to do that properly ?

Thanks in advance,

-- 
huron

___
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] Javascript obfuscator and Zope

2006-01-04 Thread Jonathan
Whitespace and comment eliminators are good for minimizing file transfer 
sizes, but as a method to 'obfuscate' code they are not really effective as 
anyone can use a tool like http://www.polystyle.com to get easily readable 
code.


Jonathan

- Original Message - 
From: "David H" <[EMAIL PROTECTED]>

To: "Jean-Marc Orliaguet" <[EMAIL PROTECTED]>
Cc: "zope user list" ; "Peter Bengtsson" <[EMAIL PROTECTED]>
Sent: Wednesday, January 04, 2006 2:28 PM
Subject: Re: [Zope] Javascript obfuscator and Zope



Jean-Marc Orliaguet wrote:


Peter Bengtsson wrote:


It's not a Zope product but at least it's python.
http://www.issuetrackerproduct.com/Download#slimmer

It's basically a javascript whitespace optimiser
Compare
http://real.issuetrackerproduct.com/tw-sack.js
with the original:
http://www.issuetrackerproduct.com/tw-sack.js

More work can be done of course but I wanted to keep it relatively CPU 
fast.

It works on CSS and HTML too:
http://www.peterbe.com/stylesheet.css




there is "minjs" written in C too: 
http://www.crockford.com/javascript/jsmin.html


this is a one-way process though, and this should also be compared with 
the effect of compressing files while serving them.


/JM


Thanks Peter and Jean-Marc!
I'll take a look at these.
David
___
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] Javascript obfuscator and Zope

2006-01-04 Thread David H

Jean-Marc Orliaguet wrote:


Peter Bengtsson wrote:


It's not a Zope product but at least it's python.
http://www.issuetrackerproduct.com/Download#slimmer

It's basically a javascript whitespace optimiser
Compare
http://real.issuetrackerproduct.com/tw-sack.js
with the original:
http://www.issuetrackerproduct.com/tw-sack.js

More work can be done of course but I wanted to keep it relatively 
CPU fast.

It works on CSS and HTML too:
http://www.peterbe.com/stylesheet.css

 



there is "minjs" written in C too: 
http://www.crockford.com/javascript/jsmin.html


this is a one-way process though, and this should also be compared 
with the effect of compressing files while serving them.


/JM


Thanks Peter and Jean-Marc!
I'll take a look at these.
David
___
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] ZServer threads and pool-size question

2006-01-04 Thread Dieter Maurer
Pascal Peregrina wrote at 2006-1-4 13:34 -:
>I understand.
>
>So what is the typical value to use for pool-size given a certain threads 
>number: n+3 ?

It depends on how intensively you are using additional (application level)
threads:

  Each thread using persistent objects requires in general (at least) one
  ZODB connection.

As such threads are relatively rare, additional 3 connections
is not too bad for the general case.



-- 
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] What did your Zope server do in 2005?

2006-01-04 Thread Jake
So it looks like I have the most traffic but use the weakest box. :)

Jake
___
http://www.ZopeZone.com


On Tue, January 3, 2006 4:42 pm, Richard Jones said:
> On Wednesday 04 January 2006 02:11, Kirk Strauser wrote:
>> On Monday 02 January 2006 08:10, Jake wrote:
>> > I sent this out last year and thought it would be fun to see how
>> > Zope's did in 2005.
>> >
>> > Pages:6,580,999
>> > Hits: 37,137,283
>> > Bandwidth: 142.12 GB
>> > Hardware: AMD Athlon 64 3200+ 2.0Ghz, 2GB DDR Ram, SCSI Raid 1, RH ES
>> > 2.1
>> > Zope: 2.7.4, CMF 1.4.7, Plone 2.0.5
>>
>> What did you gather that information with?  Just parsing the log files?
>>
>> Anyway, here's ours:
>>
>> Pages: 2.9 million (approx)
>> Hardward: Xeon 2.4GHz (HTT disabled), 2GB RAM, FreeBSD 6.0, single
>> SCSI-320
>> drive.
>> Zope: 8 instances of 2.7.8, hanging off a single ZEO server, and
>> load-balanced (random selection) by an Apache 2.0.55 proxy on the same
>> machine.
>
> I don't have complete stats for the whole year, but from Feb 2005 to today
> we
> did:
>
> Hits: 23,359,722
> Pages: 10,977,747
> Peak rate: 18,998 hits per hour
> Setup: 2 dual AMD Opteron 244 machines, 2GB RAM, Debian, with
>  pydirector load-balancing them and apache out the front with the
>  vhost mappings (we have a bazillion vhosts). One machine is also ZEO
>  server with lotsa RAID disk, the other is just a grunt box with
>  CPU, RAM and little else.
> Zope: 2.7.6
>
> We have five ZEO clients (one per CPU plus an extra). One of them is
> dedicated
> to serving search-engine bot traffic so that the other clients (and hence
> regular users) aren't affected when they decide to spider *all* of our
> vhosts
> at once. Which they do, on a regular basis. Currently we see the majority
> of
> our traffic handled by the first of the other four ZEO clients, but at
> peak
> load times the others two see a trickle of hits. I expect we could double
> the
> current load, and we are anticipating an increase in load this year of at
> least that. It's a good thing that dual-Opteron machines are cheap.
>
>
> Richard
> ___
> 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] Re: Java vs Zope

2006-01-04 Thread Rocky Burt
J Cameron Cooper wrote:
> ... I think it's quite acceptable to put the burden of use on the
> programmer instead of the compiler, considering the benefits; that's
> what he's thinking about anyway, no?

+1

> Zope 3, though I admit I've only played with it glancingly, seems to be
> more J2EE-like in certain respects: there seem to be a lot of things I
> have to touch to get things going. To a certain point, I can deal with
> this, but if there's ever a "ZDoclet"...

Lol, I remember so many times haveint to install XDoclet in order to
develop my EJB's in any sane amount of time.

But I understand and agree with your point here.  EJB development
required so much boilerplate code that it slowed the developer down big
time.  It took tools like XDoclet to come along and make the boilerplate
code somewhat manageable before developing with EJB's was very
productive IMHO.  I recently talked about this at:
http://www.serverzen.net/weblog/archive/2006/01/02/boilerplate-zope-projects

For the record (and as my blog entry mentions), Skeletor seems to strive
to be XDoclet for Zope2.

- Rocky

-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
ServerZen Hosting -- http://www.serverzenhosting.net
News About The Server -- http://www.serverzen.net

___
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: Java vs Zope

2006-01-04 Thread Rocky Burt
David H wrote:
> Python is also object oriented.  In python, x = 10 creates an object not
> a simple type - if I recall the same is true in Java.

In fact this is not quite right.  In java, int x = 10 produces a
primitive type.  Not a class instance at all.  In this case x has no
methods which can be invoked whatsoever.  This is something I always
despised about Java.  Java does have an "Integer" class but that is
generally only used when an object is absolutely required (which is not
often).  Java 1.5 did introduce autoboxing on primitive types so that
int's and Integer instances could be interchanged without knowing in
method calls, etc ... but x is still not an object with methods.

In fact I'd go as far as to say that Python seems *more* object-oriented
than Java.

- Rocky

-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
ServerZen Hosting -- http://www.serverzenhosting.net
News About The Server -- http://www.serverzen.net

___
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] Javascript obfuscator and Zope

2006-01-04 Thread Jean-Marc Orliaguet

Peter Bengtsson wrote:


It's not a Zope product but at least it's python.
http://www.issuetrackerproduct.com/Download#slimmer

It's basically a javascript whitespace optimiser
Compare
http://real.issuetrackerproduct.com/tw-sack.js
with the original:
http://www.issuetrackerproduct.com/tw-sack.js

More work can be done of course but I wanted to keep it relatively CPU fast.
It works on CSS and HTML too:
http://www.peterbe.com/stylesheet.css

 



there is "minjs" written in C too: 
http://www.crockford.com/javascript/jsmin.html


this is a one-way process though, and this should also be compared with 
the effect of compressing files while serving them.


/JM


___
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] Javascript obfuscator and Zope

2006-01-04 Thread Peter Bengtsson
It's not a Zope product but at least it's python.
http://www.issuetrackerproduct.com/Download#slimmer

It's basically a javascript whitespace optimiser
Compare
http://real.issuetrackerproduct.com/tw-sack.js
with the original:
http://www.issuetrackerproduct.com/tw-sack.js

More work can be done of course but I wanted to keep it relatively CPU fast.
It works on CSS and HTML too:
http://www.peterbe.com/stylesheet.css

On 12/29/05, David H <[EMAIL PROTECTED]> wrote:
> Hi list,
>
> I am wondering if anyone is obfuscating JavaScript  using a python
> script or product.  I did some googling but nothing cropped up.  Seems
> like a nice idea unless the  realities of javascript obfuscation make
> the exercise pointless.
>
> Any thoughts?
>
> David
>
> ___
> 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 )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Re: ZServer threads and pool-size question

2006-01-04 Thread Florent Guillaume

Jens Vagelpohl wrote:

On 4 Jan 2006, at 13:23, Pascal Peregrina wrote:
Can anyone tell me why, by default in a zope instance config file,  
the connection pool size is 7 while the number of zserver threads  is 4?

Why not 4 and 4?



Because under some conditions you can actually have more than 4  
connections in use. Not having extra connections available has the  
potential to block the server.


That's not true anymore in recent ZODBs. Zope 2.9 will never block and 
always allocate new connections as needed. It will log warnings if the 
number grows too much though.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [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] ZServer threads and pool-size question

2006-01-04 Thread Pascal Peregrina
Ok, much clearer now... 

I might focus on cache sizes then.

Thanks.

Pascal

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Jens Vagelpohl
Envoyé : mercredi 4 janvier 2006 15:17
À : zope list user
Objet : Re: [Zope] ZServer threads and pool-size question


On 4 Jan 2006, at 14:11, Pascal Peregrina wrote:

> So, are you telling me that the ideal configuration is using all  
> default values (connection objects cache size, ZEO cache size,  
> threads and connection pool)?

The default values for thread number and connection pool covers all  
but the most exotic use cases. The cache sizes can benefit greatly  
from experimenting, but there is no standard recipe, it all depends  
on your specific software and hardware environment.

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 )


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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] ZServer threads and pool-size question

2006-01-04 Thread Jens Vagelpohl


On 4 Jan 2006, at 14:11, Pascal Peregrina wrote:

So, are you telling me that the ideal configuration is using all  
default values (connection objects cache size, ZEO cache size,  
threads and connection pool)?


The default values for thread number and connection pool covers all  
but the most exotic use cases. The cache sizes can benefit greatly  
from experimenting, but there is no standard recipe, it all depends  
on your specific software and hardware environment.


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 )


RE: [Zope] ZServer threads and pool-size question

2006-01-04 Thread Pascal Peregrina
So, are you telling me that the ideal configuration is using all default values 
(connection objects cache size, ZEO cache size, threads and connection pool)?

Pascal

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Jens Vagelpohl
Envoyé : mercredi 4 janvier 2006 15:02
À : zope list user
Objet : Re: [Zope] ZServer threads and pool-size question


On 4 Jan 2006, at 13:53, Pascal Peregrina wrote:

> Because I use ZEO, I got lots of often modified objects, and on  
> Zope servers I got lots of memory so I can give it a try ;)

Where do you see the gain? More threads and connection also means  
more caches that need to be updated/invalidated when you modify an  
object. You might slow your system down instead.

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 )


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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] ZServer threads and pool-size question

2006-01-04 Thread Jens Vagelpohl


On 4 Jan 2006, at 13:53, Pascal Peregrina wrote:

Because I use ZEO, I got lots of often modified objects, and on  
Zope servers I got lots of memory so I can give it a try ;)


Where do you see the gain? More threads and connection also means  
more caches that need to be updated/invalidated when you modify an  
object. You might slow your system down instead.


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 )


RE: [Zope] ZServer threads and pool-size question

2006-01-04 Thread Pascal Peregrina
Because I use ZEO, I got lots of often modified objects, and on Zope servers I 
got lots of memory so I can give it a try ;)

Pascal

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Jens Vagelpohl
Envoyé : mercredi 4 janvier 2006 14:45
À : zope list user
Objet : Re: [Zope] ZServer threads and pool-size question


On 4 Jan 2006, at 13:34, Pascal Peregrina wrote:

> I understand.
>
> So what is the typical value to use for pool-size given a certain  
> threads number: n+3 ?

There is no "typical value". Changing the thread number and pool size  
puts you *way* off-road, fiddling with it should be avoided.

You will have to experiment if you really think you need to change  
that setting. More connections -> more RAM usage.

Makes me wonder why you think that is necessary.

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 )


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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] ZServer threads and pool-size question

2006-01-04 Thread Jens Vagelpohl


On 4 Jan 2006, at 13:34, Pascal Peregrina wrote:


I understand.

So what is the typical value to use for pool-size given a certain  
threads number: n+3 ?


There is no "typical value". Changing the thread number and pool size  
puts you *way* off-road, fiddling with it should be avoided.


You will have to experiment if you really think you need to change  
that setting. More connections -> more RAM usage.


Makes me wonder why you think that is necessary.

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 )


RE: [Zope] ZServer threads and pool-size question

2006-01-04 Thread Pascal Peregrina
I understand.

So what is the typical value to use for pool-size given a certain threads 
number: n+3 ?

Pascal

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Jens Vagelpohl
Envoyé : mercredi 4 janvier 2006 14:31
À : zope list user
Objet : Re: [Zope] ZServer threads and pool-size question


On 4 Jan 2006, at 13:23, Pascal Peregrina wrote:

> Hi,
>
> Can anyone tell me why, by default in a zope instance config file,  
> the connection pool size is 7 while the number of zserver threads  
> is 4?
>
> Why not 4 and 4?

Because under some conditions you can actually have more than 4  
connections in use. Not having extra connections available has the  
potential to block the server.

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 )


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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] ZServer threads and pool-size question

2006-01-04 Thread Jens Vagelpohl


On 4 Jan 2006, at 13:23, Pascal Peregrina wrote:


Hi,

Can anyone tell me why, by default in a zope instance config file,  
the connection pool size is 7 while the number of zserver threads  
is 4?


Why not 4 and 4?


Because under some conditions you can actually have more than 4  
connections in use. Not having extra connections available has the  
potential to block the server.


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] ZServer threads and pool-size question

2006-01-04 Thread Pascal Peregrina








Hi,

 

Can anyone tell me why, by default in a zope instance
config file, the connection pool size is 7 while the number of zserver threads
is 4?

 

Why not 4 and 4?

 

Thanks.

 

Pascal





**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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 )