----- Original Message -----
From: "Roman Suzi" <[EMAIL PROTECTED]>
To: <zope@zope.org>
Sent: Tuesday, November 08, 2005 8:47 AM
Subject: Re: [Zope] Serve large files efficiently from a pipe
On Tue, 8 Nov 2005, Tino Wildenhain wrote:
Roman Suzi schrieb:
Hi!
Newer Zope versions have an interesting ability to serve large files
efficiently given the file name (
http://plope.com/Members/chrism/ploneconf2004/2004pres.txt ).
What about serving large files given file(-like) handler? It could be
very beneficial sometimes, especially with dynamically generated
content...
Does Zope has anything for this?
Thank you for any ideas on this topic!
Have a look at:
http://www.dataflake.org/software/filecachemanager
it implements what you are asking for.
Thank you for the link, however, it seems that it is not what I am looking
for. I do not want the file contents be read into Python program as a
whole but piped to the HTTP client. This piece of FileCacheManager code
give me doubts that this is how it works:
"""
cache_entry = FileCacheEntry(self, ob, fname, self._tempfile_path)
cache_entry.write(data) """
I want something which works similar to Unix pipe but for HTTP client:
this_generates_output | process_output >> http_client
I do not want to store it anywhere on the FS and/or ZODB! And I certainly
do not want to read the resulting file as a Python string into RAM. So,
I cant understand how RAMCache or FILECacheManager is going to help me.
I don't know if writing to response one chunk at a time is proper
solution? Will Zope store response body or sent it right away? I am not
sure that it is the later...
It sounds like you are looking for a streaming type of solution. You can
google zope and streaming to get more info.
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 )