RE: [Zope-dev] Possible Windows Service improvements.

2004-10-11 Thread Mark Hammond
Ressurecting a bit of an old thread:

> From: Chris McDonough [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 4 August 2004 11:19 PM
> Subject: Re: [Zope-dev] Possible Windows Service improvements.
...

> I'm a Windows signal idiot.

I was too.  I think I understand them a little better now after having
played with both the signal module, and the win32 specific functions.

> Is there a way that we can make the Zope
> process capture Windows signals and when the Windows equivalent of
> SIGTERM is sent to the process to shut it down "cleanly"?  This is how
> it works on UNIX, but we circumvent trying to listen for signals on
> Windows entirely at startup.  There are all sorts of hooks for "clean"
> shutdown now that we can coopt if we can make the process capture a
> signal.

I've uploaded a patch to http://collector.zope.org/Zope/1527.  I'd
appreciate any comments - specifically about if I have hooked the
appropriate place.

My first reaction was that the correct hooks were in SignalHandler.py and
Signals.py - however, Windows signals really aren't suitable for hooking
there - only SIGINT is supported.  Trying to twist code into pretending
signals on Windows worked like Linux ended up with a bit of a mess.  Hacking
Lifetime.py was the cleanest solution.

> Note that the UNIX environment has a lot of additional niceties due to
> responses to signals (like logfile rotation) that Windows doesn't now,
> which tends to have the effect of relegating Windows to a second-class
> platform on which to run a production Zope instance.

I guess the correct way to do that gets back to the other issue this thread
raised - cross-platform startup/error reporting and command handling.  I
fear that will take a little longer to implement.  I hope to break this up
into 2 tasks:

* Give windows reliable shutdown behaviour now.
* Try and develop a basis for reliable cross-platform parent/child
notification and control.

I think the first would allow us to gracefully shutdown services - at the
moment the child process is immediately terminated!  The second would give
us better startup and error recovery, but that seems less important to me.
I hope to submit a patch for the service code shortly.

Mark

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3= ??

2004-10-11 Thread Alan Milligan
Heh,

Yes - would you like to lobby RedHat to change their up2date client??

I think the reason they've done this is because it's much more efficient.  Not only do 
they not have to read the body, they don't have to parse it.

Also, xml-rpc is totally screwed because it doesn't have a file type, and the normal 
binary limitation is 8192 bytes of parsable data between two tags :(

Alan

> Hi,
>
> Am Di, den 12.10.2004 schrieb Alan Milligan um 0:16:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Hi,
> >
> > I had a client that used to work on 2.7.0, and now doesn't on 2.7.3.
> >
> > The problem would appear to be that it's not substituting the
> > xmlrpc.Response class for a GET request on a text/xml content type and
> > therefore just delegating to the str() function instead of wrapping it
> > in the xml-rpc xml response tags.
> >
> > I'm a little confused about this, as this only appears to happen in
> > HTTPRequest::processInputs which didn't seem to be invoked for my
> > xml-rpc call anyway ...
> >
> > tcpdump follows for the sceptics ...
> >
> > j..
> > 08:05:04.901469 IP mistress.balclutha.org.34257 >
> > mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767
> > 
> > [EMAIL PROTECTED]@.)..W.x...
> > j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1
> > Host: localhost:8080
> > Accept-Encoding: identity
> > x-client-version: 1
> > x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc
> > (version 1.40)
> > x-up2date-version:
> > user-agent: rhn.rpclib.py/$Revision: 1.40 $
> > x-rhn-transport-capability: follow-redirects=1
> > x-rhn-auth-channels: ['mail', '1']
> > content-type: text/xml
> > x-info: RPC Processor (C) Red Hat, Inc (version 1.44)
>
> Your log is a bit confusing maybe you better use tcpflow
> for dumping. But what is clearly seen is the GET request.
> I wonder how this ever was supposed to work since
> XML-RPC requires an entidy body for the message (which is
> in XML). You can compare with RFC2616 - there is no
> entidy body in GET. Your client needs to use POST.
> I suspect then it should work.
>
> Regards
> Tino
>
>



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] xml-rpc changes between 2.7.0 and 2.7.3 ??

2004-10-11 Thread Tino Wildenhain
Hi,

Am Di, den 12.10.2004 schrieb Alan Milligan um 0:16:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi,
> 
> I had a client that used to work on 2.7.0, and now doesn't on 2.7.3.
> 
> The problem would appear to be that it's not substituting the
> xmlrpc.Response class for a GET request on a text/xml content type and
> therefore just delegating to the str() function instead of wrapping it
> in the xml-rpc xml response tags.
> 
> I'm a little confused about this, as this only appears to happen in
> HTTPRequest::processInputs which didn't seem to be invoked for my
> xml-rpc call anyway ...
> 
> tcpdump follows for the sceptics ...
> 
> j..
> 08:05:04.901469 IP mistress.balclutha.org.34257 >
> mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767
> 
> [EMAIL PROTECTED]@.)..W.x...
> j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1
> Host: localhost:8080
> Accept-Encoding: identity
> x-client-version: 1
> x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc
> (version 1.40)
> x-up2date-version:
> user-agent: rhn.rpclib.py/$Revision: 1.40 $
> x-rhn-transport-capability: follow-redirects=1
> x-rhn-auth-channels: ['mail', '1']
> content-type: text/xml
> x-info: RPC Processor (C) Red Hat, Inc (version 1.44)

Your log is a bit confusing maybe you better use tcpflow
for dumping. But what is clearly seen is the GET request.
I wonder how this ever was supposed to work since 
XML-RPC requires an entidy body for the message (which is
in XML). You can compare with RFC2616 - there is no 
entidy body in GET. Your client needs to use POST.
I suspect then it should work.

Regards
Tino

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3==20??

2004-10-11 Thread Andreas Jung
I suggest to look at the cvs log output for that particular file to find 
something.

-aj
--On Dienstag, 12. Oktober 2004 5:23 Uhr + Alan Milligan 
<[EMAIL PROTECTED]> wrote:


According to the CHANGES.txt there were no changes to XMLRPC.
xmlrpc.py is not faulty, it's just that an HTTPResponse object is
assigned to the text/xml content type rather than the correct
xmlrpc.Request :(



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3= ??

2004-10-11 Thread Alan Milligan


> According to the CHANGES.txt there were no changes to XMLRPC.

xmlrpc.py is not faulty, it's just that an HTTPResponse object is assigned to the 
text/xml content type rather than the correct xmlrpc.Request :(



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] xml-rpc changes between 2.7.0 and 2.7.3 ??

2004-10-11 Thread Andreas Jung
According to the CHANGES.txt there were no changes to XMLRPC. xmlrpclib.py 
was removed
before 2.7 final because it is part of the Python distro. Looking at your 
debug output I have
no idea what it will show us.

Andreas
--On Dienstag, 12. Oktober 2004 8:16 Uhr +1000 Alan Milligan 
<[EMAIL PROTECTED]> wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I had a client that used to work on 2.7.0, and now doesn't on 2.7.3.
The problem would appear to be that it's not substituting the
xmlrpc.Response class for a GET request on a text/xml content type and
therefore just delegating to the str() function instead of wrapping it
in the xml-rpc xml response tags.
I'm a little confused about this, as this only appears to happen in
HTTPRequest::processInputs which didn't seem to be invoked for my
xml-rpc call anyway ...
tcpdump follows for the sceptics ...
j..
08:05:04.901469 IP mistress.balclutha.org.34257 >
mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767

[EMAIL PROTECTED]@.)..W.x...
j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1
Host: localhost:8080
Accept-Encoding: identity
x-client-version: 1
x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc
(version 1.40)
x-up2date-version:
user-agent: rhn.rpclib.py/$Revision: 1.40 $
x-rhn-transport-capability: follow-redirects=1
x-rhn-auth-channels: ['mail', '1']
content-type: text/xml
x-info: RPC Processor (C) Red Hat, Inc (version 1.44)

08:05:04.901498 IP mistress.balclutha.org.zope >
mistress.balclutha.org.34257: . ack 456 win 32767 
[EMAIL PROTECTED]@..>...x.W.
j.#
08:05:04.910507 IP mistress.balclutha.org.zope >
mistress.balclutha.org.34257: P 1:871(870) ack 456 win 32767

[EMAIL PROTECTED]@..x.W.
j.#HTTP/1.1 200 OK
Server: Zope/(Zope 2.7.3b1-0, python 2.3.3, linux2) ZServer/1.1
Plone/2.0.4
Date: Mon, 11 Oct 2004 22:05:04 GMT
Content-Length: 690
Content-Type: text/plain
[['EnchantMail', '2.0.0', '4', '', 'i386', '121577', 'mail'],
['courier', '0.47', '1', '', 'i386', '4172641', 'mail'],
['courier-imapd', '0.47', '1', '', 'i386', '400894', 'mail'],
['courier-ldap', '0.47', '1', '', 'i386', '109401', 'mail'],
['courier-maildrop', '0.47', '1', '', 'i386', '1178663', 'mail'],
['courier-maildrop-wrapper', '0.47', '1', '', 'i386', '0', 'mail'],
['courier-mlm', '0.47', '1', '', 'i386', '250756', 'mail'],
['courier-pop3d', '0.47', '1', '', 'i386', '115327', 'mail'],
['courier-smtpauth', '0.47', '1', '', 'i386', '257063', 'mail'],
['courier-webadmin', '0.47', '1', '',
~ 'i386', '22047', 'mail'], ['courier-webmail', '0.47', '1', '',
'i386', '970798', 'mail']]08:05:04.910534 IP
mistress.balclutha.org.34257 > mistress.balclutha.org.zope: . ack 871
win 32767 
[EMAIL PROTECTED]@.+..W...Y.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBawY2CfroLk4EZpkRAmtFAKDVLmORsmw6LacIUizLNn111t1J+wCffq7w
3Pbm2RrCvIFKlkxuUg1BDaA=
=MbC0
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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  -  [EMAIL PROTECTED]
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: inconsistent mimetype assignment for uploaded files

2004-10-11 Thread Kapil Thangavelu

i believe you were referring to
http://freedesktop.org/Software/shared-mime-info

spec 
http://freedesktop.org/Standards/shared-mime-info-spec

its a system wide shared mime database for use by applications (ie. both
gnome and kde). apparently no python bindings.

-kapil


On Tue, 2004-10-05 at 10:42 -0400, Fred Drake wrote:
> ?
>  
> I think there's a library from the Gnome desktop project for this
> (basically providing something like the Unix "file" command), but I
> don't know if there's a Python wrapper for the library, or an
> all-Python re-implementation.
> 
> 
>   -Fred
> 


signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] xml-rpc changes between 2.7.0 and 2.7.3 ??

2004-10-11 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I had a client that used to work on 2.7.0, and now doesn't on 2.7.3.
The problem would appear to be that it's not substituting the
xmlrpc.Response class for a GET request on a text/xml content type and
therefore just delegating to the str() function instead of wrapping it
in the xml-rpc xml response tags.
I'm a little confused about this, as this only appears to happen in
HTTPRequest::processInputs which didn't seem to be invoked for my
xml-rpc call anyway ...
tcpdump follows for the sceptics ...
j..
08:05:04.901469 IP mistress.balclutha.org.34257 >
mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767

[EMAIL PROTECTED]@.)..W.x...
j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1
Host: localhost:8080
Accept-Encoding: identity
x-client-version: 1
x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc
(version 1.40)
x-up2date-version:
user-agent: rhn.rpclib.py/$Revision: 1.40 $
x-rhn-transport-capability: follow-redirects=1
x-rhn-auth-channels: ['mail', '1']
content-type: text/xml
x-info: RPC Processor (C) Red Hat, Inc (version 1.44)

08:05:04.901498 IP mistress.balclutha.org.zope >
mistress.balclutha.org.34257: . ack 456 win 32767 
[EMAIL PROTECTED]@..>...x.W.
j.#
08:05:04.910507 IP mistress.balclutha.org.zope >
mistress.balclutha.org.34257: P 1:871(870) ack 456 win 32767

[EMAIL PROTECTED]@..x.W.
j.#HTTP/1.1 200 OK
Server: Zope/(Zope 2.7.3b1-0, python 2.3.3, linux2) ZServer/1.1 Plone/2.0.4
Date: Mon, 11 Oct 2004 22:05:04 GMT
Content-Length: 690
Content-Type: text/plain
[['EnchantMail', '2.0.0', '4', '', 'i386', '121577', 'mail'],
['courier', '0.47', '1', '', 'i386', '4172641', 'mail'],
['courier-imapd', '0.47', '1', '', 'i386', '400894', 'mail'],
['courier-ldap', '0.47', '1', '', 'i386', '109401', 'mail'],
['courier-maildrop', '0.47', '1', '', 'i386', '1178663', 'mail'],
['courier-maildrop-wrapper', '0.47', '1', '', 'i386', '0', 'mail'],
['courier-mlm', '0.47', '1', '', 'i386', '250756', 'mail'],
['courier-pop3d', '0.47', '1', '', 'i386', '115327', 'mail'],
['courier-smtpauth', '0.47', '1', '', 'i386', '257063', 'mail'],
['courier-webadmin', '0.47', '1', '',
~ 'i386', '22047', 'mail'], ['courier-webmail', '0.47', '1', '',
'i386', '970798', 'mail']]08:05:04.910534 IP
mistress.balclutha.org.34257 > mistress.balclutha.org.zope: . ack 871
win 32767 
[EMAIL PROTECTED]@.+..W...Y.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBawY2CfroLk4EZpkRAmtFAKDVLmORsmw6LacIUizLNn111t1J+wCffq7w
3Pbm2RrCvIFKlkxuUg1BDaA=
=MbC0
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Showstopper UnicodeDecodeError on Zope import???

2004-10-11 Thread Nick Bower
Wow Dieter - that's a really concise explanation.  It'll allow us to fix 
the product knowing this background.  Thanks!

Dieter Maurer wrote:
Nick Bower wrote at 2004-10-8 16:41 +0200:
...
Module Products.ZCTextIndex.Lexicon, line 69, in sourceToWordIds
Module Products.ZCTextIndex.Lexicon, line 135, in _getWordIdCreate
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 5: 
orginal not in range(128).

In your lexicon operation a unicode and a non-unicode string is
put together (this can happen internally during BTree traversal).
Whenever such a thing happens, Python tries to convert the
non unicode to unicode -- using its default encoding.
This fails as the non unicode string contains bytes not convertable
this this encoding.
In a later message you reported that setting Python's default
encoding to "utf-8" gave you an unexpected end exception.
This means that your non unicode string is not utf-8 encoded.
You should use as default encoding the encoding that is
used for your non unicode strings.
If you do not know it, use an encoding that can map any 8 bit byte.
Windows has a few of them (called "cpXXX" (for CodePage);
I do not know the correct XXX).
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] serving BLOBs

2004-10-11 Thread Dieter Maurer
Alan Milligan wrote at 2004-10-12 00:57 +1000:
>I know serving large BLOBs is rather frowned up using Z2, but I have a
>requirement to use the zope security machinery prior to serving a blob
>circa 500Mb.

Apache supports something like remote authentication (it allows
you to delegate authentication to Zope).

-- 
Dieter
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: serving BLOBs

2004-10-11 Thread Tres Seaver
Johan Carlsson wrote:
Tres Seaver wrote:
Johan Carlsson wrote:
What exactly is the filestream_iterator that the FileCacheManager uses?
As I understand it this is a new feature?

For Zope >= 2.7.2, ZPublisher defines an interface, 
ZPublisher.Iterators.IStreamIterator.  An application can return an 
object implementing this interface to the publisher, instead of a 
string;  if so, the publisher hands it directly to medusa, and frees 
up the application thread / database connection.  medusa will use the 
iterator to send the response back to the user, without first 
converting it to a single big string.

That's actually brilliant.
If I understand ExternalFile could benefit from using the 
IStreamIterator interface instead of RESPONSE.write?
For instance, for someone that don't want to store blobs
in the database temporarily :-)
Yup, that is what it is for.  Chris has released a FileCacheManager 
which does this for objects which *are* stored in the ZODB;  I think 
OFS.Image.File does try to work with the FileCacheManager on that.

FileCacheManager is available at:
  http://www.dataflake.org/software/filecachemanager/
with CVS at:
  http://cvs.zope.org/Products/FileCacheManager/
Tres.
--
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: serving BLOBs

2004-10-11 Thread Johan Carlsson
Tres Seaver wrote:
Johan Carlsson wrote:
What exactly is the filestream_iterator that the FileCacheManager uses?
As I understand it this is a new feature?

For Zope >= 2.7.2, ZPublisher defines an interface, 
ZPublisher.Iterators.IStreamIterator.  An application can return an 
object implementing this interface to the publisher, instead of a 
string;  if so, the publisher hands it directly to medusa, and frees up 
the application thread / database connection.  medusa will use the 
iterator to send the response back to the user, without first converting 
it to a single big string.
That's actually brilliant.
If I understand ExternalFile could benefit from using the 
IStreamIterator interface instead of RESPONSE.write?
For instance, for someone that don't want to store blobs
in the database temporarily :-)

Johan
--
Johan Carlsson  Tel: + 46 8 31 24 94
Colliberty  Mob: + 46 70 558 25 24
Torsgatan 72Email: [EMAIL PROTECTED]
SE-113 37 STOCKHOLM
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: serving BLOBs

2004-10-11 Thread Tres Seaver
Johan Carlsson wrote:
What exactly is the filestream_iterator that the FileCacheManager uses?
As I understand it this is a new feature?
For Zope >= 2.7.2, ZPublisher defines an interface, 
ZPublisher.Iterators.IStreamIterator.  An application can return an 
object implementing this interface to the publisher, instead of a 
string;  if so, the publisher hands it directly to medusa, and frees up 
the application thread / database connection.  medusa will use the 
iterator to send the response back to the user, without first converting 
it to a single big string.

Tres.
--
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: serving BLOBs

2004-10-11 Thread Johan Carlsson
Johan Carlsson wrote:
What exactly is the filestream_iterator that the FileCacheManager uses?
As I understand it this is a new feature?
Of course the answer was in Chris' presentation you just sent :-)
--
Johan Carlsson  Tel: + 46 8 31 24 94
Colliberty  Mob: + 46 70 558 25 24
Torsgatan 72Email: [EMAIL PROTECTED]
SE-113 37 STOCKHOLM
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: serving BLOBs

2004-10-11 Thread Johan Carlsson
What exactly is the filestream_iterator that the FileCacheManager uses?
As I understand it this is a new feature?
Johan
--
Johan Carlsson  Tel: + 46 8 31 24 94
Colliberty  Mob: + 46 70 558 25 24
Torsgatan 72Email: [EMAIL PROTECTED]
SE-113 37 STOCKHOLM
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: serving BLOBs

2004-10-11 Thread Tres Seaver
Alan Milligan wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I know serving large BLOBs is rather frowned up using Z2, but I have a
requirement to use the zope security machinery prior to serving a blob
circa 500Mb.
I thought I'd just wrap it in an ExternalFile and it would simply stream
to the client.  In fact I was even anticipating taking advantage of
chunked transfer encoding for HTTP1.1 clients.
However, I'm getting out of memory exceptions thrown by the server.
This would indicate that no intermediate buffer flushing is occuring at 
all!

What am I missing?
I don't know the ExternalFile product, but Chris McDonough's 
presentation to the Plone conference in Vienna should be relevant:

  http://plope.com/Members/chrism/2004_plone_pres
Also, you might want to check out Railroad, which is a different take on 
the problem:

  http://zope.org/Members/infrae/news/railroad_products_0_2
Tres.
--
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] serving BLOBs

2004-10-11 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Johan Carlsson wrote:
|
| I've looked at the code of the latest release of ExternalFile
| and I can't find the new streming interface being used at all?
|
There's some strange stuff in the ExternalFile::FileUtils::copy_file()
function whereby it writes 65565 byte chunks via the Response object,
ZServer::ZServerHTTPResponse.
This guy automatically sets streaming for writes with content size less
than  128K.
I would have expected to the ZServerHTTPResponse's stdout attribute to
automatically flush on write(), but maybe not!
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBaqeiCfroLk4EZpkRAirFAJ9gMJLRhcJiJN+0vPbAVYb4iMpf4gCfZosl
EXrzHTIHdsXa+C82pDND/W8=
=043z
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] serving BLOBs

2004-10-11 Thread Johan Carlsson
Alan Milligan wrote:
Hi,
I know serving large BLOBs is rather frowned up using Z2, but I have a
requirement to use the zope security machinery prior to serving a blob
circa 500Mb.
I thought I'd just wrap it in an ExternalFile and it would simply stream
to the client.  In fact I was even anticipating taking advantage of
chunked transfer encoding for HTTP1.1 clients.
However, I'm getting out of memory exceptions thrown by the server.
This would indicate that no intermediate buffer flushing is occuring at 
all!

What am I missing?
I've looked at the code of the latest release of ExternalFile
and I can't find the new streming interface being used at all?
I'm also intrested in this, but I haven't had the time to as
anyone about it, yet.
Regards,
Johan
PS. I'm cc:ing [EMAIL PROTECTED] because I think this is more of
an user issue.
--
Johan Carlsson  Tel: + 46 8 31 24 94
Colliberty  Mob: + 46 70 558 25 24
Torsgatan 72Email: [EMAIL PROTECTED]
SE-113 37 STOCKHOLM
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] serving BLOBs

2004-10-11 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I know serving large BLOBs is rather frowned up using Z2, but I have a
requirement to use the zope security machinery prior to serving a blob
circa 500Mb.
I thought I'd just wrap it in an ExternalFile and it would simply stream
to the client.  In fact I was even anticipating taking advantage of
chunked transfer encoding for HTTP1.1 clients.
However, I'm getting out of memory exceptions thrown by the server.
This would indicate that no intermediate buffer flushing is occuring at all!
What am I missing?
Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBap9OCfroLk4EZpkRAlsPAJ9oztRXnAH8rGzeLY7+hlXKkXB4yQCfQ64I
OXcuPhHJmn3V+5y/HDQEN2M=
=7YAX
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: [Zope-PAS] Re: [Plone-developers] Re: Plugin for PluggableUserFolder

2004-10-11 Thread Lennart Regebro
Tres Seaver wrote:
Please continue to include [EMAIL PROTECTED] in this disucssion (in 
fact, I would recommend trimming *all* the other groups out;  interested 
parties should be willing to move to the more focused list).
Except, of course, it has nothing to do with Zope-PAS.
But, yet, getting four of five copies of each mail is slightly annoying.
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )