Re: [Zope-dev] Re: Timing the opening of network ports

2006-08-31 Thread Chris Withers

Christian Theune wrote:



b) it's more convenient for developers


Why?


Early open port means: zopectl restart and reload in your browser 
immediately without getting Connection refused. Dieter already 
mentioned this use case


I don't really buy that, but since it's configurable, it doesn't matter...


c) it's a good thing if you have 'smart' load balancers


How so?


Tres mentioned that to me: 'smart' load balancers can probe the server 
and decide that the port is there, but the response time is too high and 
won't include it in the pool again yet, but they can know that the port 
is already open again.


Again, I can only see this as being a bad thing:

LB: Hmmm, this one's alive but absolutely creamed, I better not send it 
any requests for a long time.


D'oh

Chris

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

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

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


Re: [Zope-dev] Re: Timing the opening of network ports

2006-08-31 Thread Chris Withers

Andreas Jung wrote:


The usecase is pretty simple:  you have a loadbalancer and remove  one 
backend Zope. The LB detects the removal and stops forwarding request.

When the client comes back (means Zope opens the ports early) the LB
will start forwarding to the client although it might take a while until 
the Zope instance is really up and ready to serve request. So by opening

the ports late we are able to reduce the latency and avoid pending
requests.


Er yes, I know why this is a very good thing. I was commenting that I 
can't see why anyone would want anything else ;-)


Chris

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

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

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


[Zope-dev] Re: Timing the opening of network ports

2006-08-31 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
 
 
 --On 29. August 2006 18:37:45 +0100 Chris Withers
 [EMAIL PROTECTED] wrote:
 
 Tres Seaver wrote:
 Unlike you, I prefer when the browser waits until Zope
 has come up over me  having to reload manually until it
 finally is ready...

 The branch Andreas just merged leaves the fast-bind option on by
 default.

 Cool, although I can't really see the use ;-)

 
 The usecase is pretty simple:  you have a loadbalancer and remove  one
 backend Zope. The LB detects the removal and stops forwarding request.
 When the client comes back (means Zope opens the ports early) the LB
 will start forwarding to the client although it might take a while until
 the Zope instance is really up and ready to serve request. So by opening
 the ports late we are able to reduce the latency and avoid pending
 requests.

The other reason for wanting early binding to the ports is if the
ports are in the reserved for root range ( 1024);  in that case, the
ports *must* be bound early, before dropping privileges to those of the
effective user.


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

iD8DBQFE9ucV+gerLs4ltQ4RAt+9AJkBLjRKmZaRQWPq2iiKIRAZy+W2hwCfTeW/
FaLZGLsRx8J4JJHNPtnJxy4=
=mir0
-END PGP SIGNATURE-

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


Re: [Zope-dev] Re: Timing the opening of network ports

2006-08-31 Thread Andrew Langmead


On Aug 31, 2006, at 9:41 AM, Tres Seaver wrote:

The other reason for wanting early binding to the ports is if the
ports are in the reserved for root range ( 1024);  in that case,  
the
ports *must* be bound early, before dropping privileges to those of  
the

effective user.



Not necessarily.

The basic sequence for opening a server socket connection is:

listener = socket(AF_INET,SOCK_STREAM,0)
bind(listener, address_info)
listen(listener, LISTEN_QUEUE_LENGTH)

For unix and unix-like systems that reserve some range of ports for  
privileged users, it is the bind() call that has the user check. It  
is at the listen() call where the port is seen as open and available  
for connections.


It might be that Zope's HTTPServer class bunches all of them in a  
single method for convenience, but it is possible to bind() early,  
drop privs, and listen() late.

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

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


Re: [Zope-dev] Re: Timing the opening of network ports

2006-08-31 Thread Chris Withers

Tres Seaver wrote:

The other reason for wanting early binding to the ports is if the
ports are in the reserved for root range ( 1024);  in that case, the
ports *must* be bound early, before dropping privileges to those of the
effective user.


Ah, that's true enough, but then again, anyone binding zope to a 
low-numbered port requires the gun politely pointing away from their 
foot anyway ;-)


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope-dev] Re: Timing the opening of network ports

2006-08-31 Thread Dieter Maurer
Chris Withers wrote at 2006-8-31 08:15 +0100:
 ...
Er yes, I know why this is a very good thing. I was commenting that I 
can't see why anyone would want anything else ;-)

You did not read the thread carefully: I explained why I prefer
early port binding...



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


[Zope-dev] Adding INSTANCE/lib/python to PYTHONPATH

2006-08-31 Thread Sidnei da Silva
Looks like INSTANCE_HOME/lib/python is added to PYTHONPATH at some
point during startup, but not on the zopectl/runzope scripts.

I've tried installing eggs into INSTANCE_HOME/lib/python and they
won't load unless it's added to PYTHONPATH at startup time.

Thus, I propose to add INSTANCE_HOME/lib/python to PYTHONPATH on the
said scripts. Anyone against making this change all the way down to
Zope 2.9?

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Adding INSTANCE/lib/python to PYTHONPATH

2006-08-31 Thread Chris McDonough

+1

On Aug 31, 2006, at 4:46 PM, Sidnei da Silva wrote:


Looks like INSTANCE_HOME/lib/python is added to PYTHONPATH at some
point during startup, but not on the zopectl/runzope scripts.

I've tried installing eggs into INSTANCE_HOME/lib/python and they
won't load unless it's added to PYTHONPATH at startup time.

Thus, I propose to add INSTANCE_HOME/lib/python to PYTHONPATH on the
said scripts. Anyone against making this change all the way down to
Zope 2.9?

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )



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

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


[Zope-dev] Re: Adding INSTANCE/lib/python to PYTHONPATH

2006-08-31 Thread whit

Sidnei da Silva wrote:

Looks like INSTANCE_HOME/lib/python is added to PYTHONPATH at some
point during startup, but not on the zopectl/runzope scripts.

I've tried installing eggs into INSTANCE_HOME/lib/python and they
won't load unless it's added to PYTHONPATH at startup time.

Thus, I propose to add INSTANCE_HOME/lib/python to PYTHONPATH on the
said scripts. Anyone against making this change all the way down to
Zope 2.9?



we've also seen a need to add an arbitrary path to PYTHONPATH in these 
script for situations like using ian bickings workingenv.  workingenv 
constrains the execution and installation environment to an arbitrary 
directory(no more installing eggs into the site-packages).


Might be nice to have this as an option for mkinstance;  maybe --home to 
make it similar to disutils?


-w
begin:vcard
fn:david morriss
n:morriss;david
org:The Open Planning Project
email;internet:[EMAIL PROTECTED]
title:Senior Engineer
url:http://www.openplans.org
version:2.1
end:vcard

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


[Zope-dev] Re: Timing the opening of network ports

2006-08-31 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew Langmead wrote:
 
 On Aug 31, 2006, at 9:41 AM, Tres Seaver wrote:
 The other reason for wanting early binding to the ports is if the
 ports are in the reserved for root range ( 1024);  in that case, the
 ports *must* be bound early, before dropping privileges to those of the
 effective user.

 
 Not necessarily.
 
 The basic sequence for opening a server socket connection is:
 
 listener = socket(AF_INET,SOCK_STREAM,0)
 bind(listener, address_info)
 listen(listener, LISTEN_QUEUE_LENGTH)
 
 For unix and unix-like systems that reserve some range of ports for
 privileged users, it is the bind() call that has the user check. It is
 at the listen() call where the port is seen as open and available for
 connections.
 
 It might be that Zope's HTTPServer class bunches all of them in a single
 method for convenience, but it is possible to bind() early, drop privs,
 and listen() late.

Thanks, I'd forgotten that distinction.  ZServer does indeed hardwire
the two of them together, and it looks like it would be hard to split it
apart.

Andreas' hack elegant as it is, seems adequate for the purpose.


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

iD8DBQFE925G+gerLs4ltQ4RAmezAJ49ikaCgveaSPcLhug3NHVS0MemUgCfdzlm
aswciRwTad8heeTWnaThItk=
=KTDx
-END PGP SIGNATURE-

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


[Zope] LocalFS cut and paste across LocalFS instaces

2006-08-31 Thread Dennis Allison

I have a zope system (Zope 2.9.2) that needs to be able to cut and paste
between different instances of LocalFS.  Specifically, I have two LocalFS
instances, LFS1 and LFS2.  The two local files systems are disjoint and
image different parts of the local file directory tree.  What I need to be
able to do is to cut and paste files and directories fom one instance to
the other.  The clipboard object appears to be missing adequate contest to
cut and paste across instances.  Has anyone modified the LocalFS product
to handle, say, cutting a a file from LFS1 and pasting it into LFS2?


-- 

___
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: Packing Data.fs

2006-08-31 Thread Chris Withers

Jens Vagelpohl wrote:

It's also f'ing slow and doesn't scale ;-)


Translation: In our experience, large databases with a lot of objects 
can lead to very slow operations, such as packing and backing up the 
data. This might be improved by using a file  system designed for many 
small files, but on ext3 the whole thing became a terrible dog. This 
slowness also appears when doing automated buildouts which create lots 
of objects. Even simple stuff like just instantiating a Plone portal 
from the ZMI was noticeably slower.


I thought my version was much more understandable ;-)

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 )


[Zope] accelerating Zope restart

2006-08-31 Thread egf05
Hi,

My Data.fs is huge (21GB) because it contains many video files. This is not a
problem in itself, however, I recently had to reboot my machine and now zope
takes around 20-30 minutes to restart. Is a fstest automatically done ? How
could I accelerate the restarting, if possible ? 

Thanks a lot for any advice,
Eric
___
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] accelerating Zope restart

2006-08-31 Thread Andreas Jung



--On 31. August 2006 12:18:24 +0100 [EMAIL PROTECTED] wrote:


Hi,

My Data.fs is huge (21GB) because it contains many video files. This is
not a problem in itself, however, I recently had to reboot my machine and
now zope takes around 20-30 minutes to restart. Is a fstest automatically
done ? How could I accelerate the restarting, if possible ?



Zope does maintain a Data.fs.index file. If it becomes corrupt e.g. through 
an unclean shutdown then Zope will recreate it by scanning the whole 
Data.fs file when starting Zope the next time. This will take some 
timeso before rebooting you should shutdown down your Zope properly.


-aj

--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope  Plone development, Consulting


pgppYVpplEYVN.pgp
Description: 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 )


Re: [Zope] accelerating Zope restart

2006-08-31 Thread Chris Withers

[EMAIL PROTECTED] wrote:

My Data.fs is huge (21GB) because it contains many video files. This is not a
problem in itself, however, I recently had to reboot my machine and now zope
takes around 20-30 minutes to restart. Is a fstest automatically done ? How
could I accelerate the restarting, if possible ? 


Use ZEO.

Make sure the storage server shuts down properly so it saves its indexes 
to disk.


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] accelerating Zope restart

2006-08-31 Thread egf05
 Zope does maintain a Data.fs.index file. If it becomes corrupt e.g. through 
 an unclean shutdown then Zope will recreate it by scanning the whole 
 Data.fs file when starting Zope the next time. This will take some 
 timeso before rebooting you should shutdown down your Zope properly.
 
 -aj

OK, thanks.

Eric
___
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] accelerating Zope restart

2006-08-31 Thread Jonathan


- Original Message - 
From: [EMAIL PROTECTED]

To: zope@zope.org
Sent: Thursday, August 31, 2006 7:18 AM
Subject: [Zope] accelerating Zope restart



Hi,

My Data.fs is huge (21GB) because it contains many video files. This is 
not a
problem in itself, however, I recently had to reboot my machine and now 
zope
takes around 20-30 minutes to restart. Is a fstest automatically done ? 
How

could I accelerate the restarting, if possible ?



You may also want to have a look at the localfs product which would allow 
you to store your large video files on the local file system instead of 
inside the ZODB (but still access them as if they were stored in the ZODB).


http://sourceforge.net/projects/localfs


Jonathan 


___
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] accelerating Zope restart

2006-08-31 Thread egf05
 
 Zope does maintain a Data.fs.index file. If it becomes corrupt e.g. through 
 an unclean shutdown then Zope will recreate it by scanning the whole 
 Data.fs file when starting Zope the next time. This will take some 
 timeso before rebooting you should shutdown down your Zope properly.
 

OK, I have two questions about shutting down zope:

- To cleanly shut down zope daemon, is zopectl stop enough ?

- If zope runs in the foreground, how to shut it down cleanly ? CTRL+C won't do
it I guess ?

Eric
___
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] Accessing MsSQL from Zope blocks

2006-08-31 Thread robert rottermann
Hi there,
this is not really an Zope Questions, I just  hope somebody of you cold
give me a hint.
I already asked egenix (as we are using mxODBC) they could not think of
a good reason. (but said to try a comercial odbc bridge).

thanks for any pointers.
robert

using mxOdbc our database application embeded in zope often blocks when 
executing
a simple statement as the following:

query = select fieldValue from tblATicketDetailDynamicForm \
where ticketDetailNoFk in (1683)


calling sql_q_nil(query) (from the following class)
sometimes just never returns.


The problem seems to be, that after a certain amount of queries MsSQL is in a
state, that it does not allow any access to the querried database.

what we do in our application is:
- get a RedDbQuery object (class at the end of the posting)
- execute the statement with RedDbQuery.sql_q_nil(query)
- release the connection.

this approach worked fine using MySQL. However we did not cross any
OS bounderies and did not use ODBC.

we are using:

mxODBC Zope DA 1.0.8 License Information:
1 Zope Instance License for redcor [EMAIL PROTECTED] [6522021#1]
SuSE 9.3
UnixOdbc 2.8.8
freetds 0.64



class RedDbQuery:
  All queries are routed through this class.

  def __init__( self ):
self._connection = getConnection()
#print 'getConnection() returns', _connection
self._cursor = self._connection.cursor()
#print 'cursor() returns', _cursor

  def dispose( self ):
releaseConnection( self._connection, self._cursor )

  def cursor( self ):
return self._cursor

  #
  # query level zero -- the one and only query execution method:
  #
  def sql_q_nil( self, query, verbose = None ):
Generic SQL query, expecting no return.
if verbose: print( query )
r = self._cursor.execute( query )
#print 'execute() returns', r
return r

  more methods ..






begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
version:2.1
end:vcard

___
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: accelerating Zope restart

2006-08-31 Thread Rocky Burt
On Thu, 2006-31-08 at 12:52 +0100,
[EMAIL PROTECTED] wrote:
  
  Zope does maintain a Data.fs.index file. If it becomes corrupt e.g. through 
  an unclean shutdown then Zope will recreate it by scanning the whole 
  Data.fs file when starting Zope the next time. This will take some 
  timeso before rebooting you should shutdown down your Zope properly.
  
 
 OK, I have two questions about shutting down zope:
 
 - To cleanly shut down zope daemon, is zopectl stop enough ?

Yes.


 - If zope runs in the foreground, how to shut it down cleanly ? CTRL+C won't 
 do
 it I guess ?

I always thought CTRL+C would do it actually.  It's only a force kill
with -9 that will kill it without shutting down properly.  But you could
always go to the Control_Panel in the zmi and do a shutdown from there,
that is for certain safe.

- Rocky

-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net



signature.asc
Description: This is a digitally signed message part
___
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: accelerating Zope restart

2006-08-31 Thread Rocky Burt
On Thu, 2006-31-08 at 12:18 +0100,
[EMAIL PROTECTED] wrote:
 Hi,
 
 My Data.fs is huge (21GB) because it contains many video files. This is not a
 problem in itself, however, I recently had to reboot my machine and now zope
 takes around 20-30 minutes to restart. Is a fstest automatically done ? How
 could I accelerate the restarting, if possible ? 

I highly recommend you use some sort of external storage product to
store such large files.  Perhaps Chris McDonough's blob product might
fit well here.

- Rocky

-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net



signature.asc
Description: This is a digitally signed message part
___
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] accelerating Zope restart

2006-08-31 Thread Paul Winkler
On Thu, Aug 31, 2006 at 12:23:06PM +0100, Chris Withers wrote:
 [EMAIL PROTECTED] wrote:
 My Data.fs is huge (21GB) because it contains many video files. This is 
 not a
 problem in itself, however, I recently had to reboot my machine and now 
 zope
 takes around 20-30 minutes to restart. Is a fstest automatically done ? How
 could I accelerate the restarting, if possible ? 
 
 Use ZEO.

I can see how that could let Zope restart faster.  But 
ZEO can have *severe* performance implications for large blobs
such as videos.  See the bottom of
http://www.slinkp.com/code/zopestuff/blobnotes
 
Maybe worth noting that DirectoryStorage starts up fast regardless of
storage size.  http://dirstorage.sourceforge.net/

It also does not require RAM proportional to storage size.
It is also very reliable and has some other nice features.
The downsides:
- You need a filesystem that can handle very large number of tiny files.
- Packing is VERY slow (21 GB could easily take all night).
- Somewhat slower than Filestorage in general.
- Requires more disk space (+30%).

This page is old but maybe still useful:
http://cvs.zope.org/ZODB3/Doc/storages.html?rev=1

-- 

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] Change the encoding of a single ZPT page

2006-08-31 Thread Dieter Maurer
Luiz Fernando Bernardes Ribeiro wrote at 2006-8-30 14:08 -0300:
2006/8/29, Andreas Jung [EMAIL PROTECTED]:
 ...
After trying a lot of things, I found the problem is really in the
zpublisher realm, no matter what kind of encoding trick I use, even with a
python script, the output is converted to the default encoding if I use any
variable or dynamic value from the database.

If you were right (which I still hope you won't) than someone
severely misunderstood the meaning of default.

   default means use this unless you get get told to use something
   else.

   And if I tell the ZPublisher (in the Content-Type header),
   that the charset is different from its default-zpublisher-encoding,
   then it has to respect this.

   If it does not, then please file a bug report.



-- 
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] DTML - ZPT

2006-08-31 Thread Antonio Beamud Montero
Is this the equivalence?

dtml-var day fmt=%02i

td tal:replace=python:'%02i'%item['day']

or exists other way?

Greetings.

___
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] DTML - ZPT

2006-08-31 Thread Andreas Jung



--On 31. August 2006 20:36:32 +0200 Antonio Beamud Montero 
[EMAIL PROTECTED] wrote:



Is this the equivalence?

dtml-var day fmt=%02i

td tal:replace=python:'%02i'%item['day']

or exists other way?



No.

-aj



pgpXRn0rh7dcJ.pgp
Description: 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 )


Re: [Zope] Change the encoding of a single ZPT page

2006-08-31 Thread Andreas Jung



--On 31. August 2006 19:28:54 +0200 Dieter Maurer [EMAIL PROTECTED] 
wrote:



Luiz Fernando Bernardes Ribeiro wrote at 2006-8-30 14:08 -0300:

2006/8/29, Andreas Jung [EMAIL PROTECTED]:
...
After trying a lot of things, I found the problem is really in the
zpublisher realm, no matter what kind of encoding trick I use, even with
a python script, the output is converted to the default encoding if I
use any variable or dynamic value from the database.


If you were right (which I still hope you won't) than someone
severely misunderstood the meaning of default.



I think he is not right.

-aj

pgpWj2XpNIGCc.pgp
Description: 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 )


Re: [Zope] DTML - ZPT

2006-08-31 Thread Tino Wildenhain
Antonio Beamud Montero wrote:
 Is this the equivalence?
 
 dtml-var day fmt=%02i
 
 td tal:replace=python:'%02i'%item['day']
 
 or exists other way?
 

Yes, you format your output in a (possibly
locales dependant) intermediate layer between
your application and your template.

In the easiest implementation it is a
python script which queries the original
item list and outputs a formattet item list
you use directly w/ path expressions only.

This way you can centrally control and
switch your formatting w/o touching the
templates anymore.

Regards
Tino Wildenhain
___
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 can I import python script into another python script?

2006-08-31 Thread Ferhat Ayaz
Hi,

I have a Script (Python) called 'functions'.
I want to import this script into another Script
(Python).

import Include.Functions.requests

says

import of Include.Functions.requests is unauthorized

Where am I wrong?

Thanks,
Ferhat

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] How can I import python script into another python script?

2006-08-31 Thread Gabriel Genellina

At Thursday 31/8/2006 18:11, Ferhat Ayaz wrote:


I have a Script (Python) called 'functions'.
I want to import this script into another Script
(Python).

import Include.Functions.requests

says

import of Include.Functions.requests is unauthorized


You don't import it; you can reference it as 
container.Include.Functions.whatever(args...)



Gabriel Genellina
Softlab SRL 






__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas


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