[Zope-dev] Streaming Response
Johan Carlsson [EasyPublisher]
johanc@easypublisher.com
Thu, 24 Apr 2003 15:54:17 +0000
At 17:01 2003-04-24 +0200, Oliver Bleutgen said:
>Shane Hathaway wrote:
>>Here's a better alternative: when you can, avoid caching altogether. For
>>example, if you're storing files using Ape, stream the data directly
>>to/from the filesystem. In fact, when sending a file, the server could
>>close the database connection, freeing up precious database threads, and
>>let asyncore stream the rest of the data from the file.
>>To do this, we'd need minimal support from the application. OFS.File
>>needs to delegate the specifics of data storage and retrieval to a
>>subobject. Ape could take the opportunity to replace that subobject with
>>something that reads and writes the file directly.
>
>Maybe this could include the possibility to not serve the file via ZServer
>at all. I did a small patch to ExtFile for that. If the file object is
>accessed via zope, it returns a redirect to a computed location where then
>the file is served from apache.
>I think there are a lot of use cases for that, even if ZServer's
>performance isn't considerably worse than e.g. apache's.
>You might want to stream multimedia files with a streaming server but
>manage them in zope, there might be cases when ZServer's http
>implementation is not up to the task, as it was with pdf a while ago IIRC.
>Maybe this would also help with certain quirks in some WebDAV
>implementations where apache might have a workaround, but ZServer has not
>(yet).
In my opinion that is a little bit out of scope for the File object.
Solutions for integrating content served by other server should be
implemented in separate classes (perhaps derived for File).
There can exists any number of external server, every one with
different set of requirements for integration.
--
Easy Publisher Developers Team
Johan Carlsson
johanc@easypublisher.com
Mail:
Birkagatan 9
SE-113 36 Stockholm
Sweden
Phone +46-(0)8-31 24 94
Fax +46-(0)8-673 04 44
Mobil +46-(0)70-558 25 24
http://www.easypublisher.com