[Zope] Re: Slow File Access With LocalFS

Jonothan Farr jfarr@real.com
Tue, 27 Jun 2000 12:58:40 -0700


It sounds to me like the Apache server is just writing the data directly to the
HTTP connection as it is read. I believe that's how HTTP "streaming" works. I
also believe this is possible to do using the Zope HTTPResponse object. Does
anyone have any ideas?

--jfarr

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998

----- Original Message -----
From: Rob Pratt <rpratt@metcruz.com>
To: <jfarr@real.com>
Sent: Tuesday, June 27, 2000 10:56 AM
Subject: Re: Slow File Access With LocalFS


> Hey, thanks for the quick reply.
>
> > No, it just takes a while to read a very large file and construct the
> ZObject
> > (performance patches accepted ;)). It can also take a while to download
> them
> but
> > that should be obvious. How is it that you're "streaming" the mp3 files?
>
> Sorry. Streaming is not exactly the right word I think. What I have set up
> is that Zope delivers a playlist (*.m3u), which is opened by a player on
> the
> local machine (assuming there's one installed), and the player app in turn
> makes a request for the actual mp3 file, which starts playing as soon as
> it's properly buffered in the player app. That avoids having to download
> each mp3 before playing it.
>
> I had the collection stashed behind an Apache rewrite rule, but when I
> checked out LocalFS, I decided to try to move it into Zope under a LocalFS
> object (which I can use to control access to the files more easily than in
> Apache). Using Apache rewrite, requests for mp3 files just bypassed Zope,
> and "streaming" was immediate. But handled as a LocalFS object, mp3 file
> requests (I guess from your reply) have to wait to create the ZObject
> before
> they start "streaming."
>
> Is there a way to get LocalFS to serve up the file without creating a
> ZObject?
>
> Wish I knew more about Python and programming. (I'm workin' on it, but it's
> a steep learning curve for a newbie like me.) I'd jump in and see if I
> could
> come up with a performance patch.
>
> Anyway, I've just started learning Zope, and I see that it has immense
> possibilities for automating a lot of what I do in my day job (I'm an
> editor
> for an alternative newsweekly in Santa Cruz, Calif., USA). The application
> I
> envision will probably make heavy use of the LocalFS product.
>
> I was hoping that it would be easy to digitize our extensive demo library
> on touring
> bands so that I wouldn't have to lend CDs to writers who never seem to
> return them ;) I could just get an intern to rip CDs into mp3s and post
> them
> on a password-protected mp3 server, and all the writers could have 24-7
> access.
>
> That's just one feature. Many, many others that I can think of (not
> involving mp3s ;)) could take hours and hours of work off of my weekly
> workload.
>