[Seaside] Serving files

Philippe Marschall philippe.marschall at gmail.com
Sun Oct 8 15:58:39 UTC 2006


2006/10/8, Jason Johnson <jbjohns at libsource.com>:
> Philippe Marschall wrote:
> > 2006/10/6, Brian Brown <brian at ablelinktech.com>:
> >> POST
> >> User-Agent: Xnntp/beta03 (PPC Mac OS 10.3)
> >>
> >> Hello all!
> >>
> >> It's been a while since I did any Seaside work, but now I have a
> >> project and am trying to get back into the swing of things....
> >>
> >> I'm writing an online repository which will essentially serve out some
> >> zip files. I remember some discussion on the groups a while back
> >> regarding streaming files from the disk without loading them
> >> completely into memory as they are served. Has anyone taken a crack at
> >> this?
> >>
> >> In the past I've served everything with apache, but in this case I'm
> >> dynamically creating folders to store the files when they are
> >> uploaded, and you have to manage permissions between the squeak
> >> process and filesystem served by apache, as well as making sure apache
> >> is set up correctly whenever the app is deployed. Of course, this is
> >> all doable, just a pain :)
> >
> > Stil sounds much better than serving the files with Squeak.
> >
> > Philippe
> > _______________________________________________
> > Seaside mailing list
> > Seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
>
> Why?  Is it way too slow? Seaside uses the Komanche web server to work,
> but that is a full web server.  Mine serves static pages as well as
> seaside components.

Well the main reason is not speed but Squeak File IO in general. For
example it's not thread-safe. In C you could just do sendfile and the
kernel would send the file to the socket without buffering everything
twice and thrice and all the context switches. In Squeak, well even
testing for file existence is a journey. I don't think several files
of 50 MB or more can be handeled by Squeak in a reasonable way.

Apache is just a proven, performant, very stable solution. If there's
a bug in Apache you're not supposed to fix it yourself and you're not
told that's fun because it's open sores and stuff. And oh yes, it
automatically makes use of multiple cpus/cores and takes load of your
Squeak image.

Philippe


More information about the Seaside mailing list