[Seaside] Swazoo web server
janko.mivsek at eranova.si
Sun Jul 22 12:00:01 UTC 2007
Maarten Mostert wrote:
> I just reloaded SeasideForSwazoo from the VW repository
> (2.8a1.399,mbany) 9/7/2007.
Be sure to load Swazoo 1.0 (released) from nov2005 and not more recent
> I have another question in another threat to which you can maybe be of
> some light.
> Can Swazoo handle 20MB downloads at the same time as continuing serving
> my seaside application ?
Currently not very efficient. I just tried and it managed to download
20M file with 56KB/sec (on 100MB optical line) but CPU was 100% and with
excessive garbage generation. Parallel wget was blocked during that
time. That wget otherwise got 11KB HTML file in avg 120ms (about
100KB/sec) on 4M DSL line.
Problem seems to be in current implementation of response sending, which
generates a lot of small short living arrays to send segments of data to
TCP socket. Not to mention that all file is read in memory and copied
there several times!
I'm currently working on streaming support and just finished input
streaming (for file uploads). Idea is to stream files directly from/to
TCP sockets, without intermediate buffering in memory. After that and
after careful GC avoidance optimizations I'm confident that Swazoo will
be capable to serve such large files in parallel to serve other requests.
Input streaming will be released in few days as Swazoo 2.0 beta2, while
I expect to finish output streaming soon after that too.
> 2007/7/21, Maarten MOSTERT <maarten.mostert at wanadoo.fr>:
>> I am trying to add a download button to my application to serve a 20MB
>> application file.
> The best way is to configure your webserver to serve files of this
> size. Ideally something like Apache or lighty that supports streaming,
> ideally sendfile. Your Squeak webserver might or might not be up to
> the job.
>> I don't manage figure out how to make button that triggers a download
>> dialog ?
> Buttons are not really well suited for this, anchors work way better.
> What probably is the most reliable thing is:
> renderContentOn: html
> html form
> with: [
> html submitButton
> callback: [ self session redirectTo:
> 'http://url.to/my.file ];
> text: 'download' ]
>> I also wonder if MyFileLibrary is the right way to do so ?
> No, don't even think about it.
> Thanks in adavance,
> Janko Mivšek a écrit :
>> Hi Marteen,
>> Maarten MOSTERT wrote:
>>> I happened to load the Seaside Swazoo parcels this moring but
>>> hm....not so easy to start off. (some more parcel comment maybe)
>> For Swazoo 1.0 there is a one page tutorial on a website, while for
>> forthcoming Swazoo 2.0 (currently in beta) there is already a bit more
>> comments on most important classes.
>> And here you can help me a bit: what was your questions when you
>> loaded that parcel in the morning? What was your intentions on the
>> start? What did you want to achieve? Just look at it or maybe serve
>> some static web pages, make another virtual web site?
>> By answering you will direct me to prepare a bit more docs on a web
>>> If Swazoo Seaside is the preferred configuration would it not be more
>>> cool that VW Seaside loads with Swazoo from the start and adds some
>>> Tool extension to get configured ? If I can rent like any dedicated
>>> server, upload a VW image and start business that would be really
>>> Cool . (Oké James I agree I' have to get a Licence in the mean time).
>> Don't forget that Swazoo supports virtual websites, which enables web
>> hosting very easily...
>> Best regards
>>> Notice that now having some real Seaside tests in VW is really
>>> boosting understanding how things work excellent !
>>> > Message du 19/07/07 11:16
>>> > De : "Janko Mivšek"
>>> > A : "Seaside - general discussion"
>>> > Copie à :
>>> > Objet : [Seaside] Swazoo web server (was updateRoot: Weirdness)
>>> > Dear Seasiders,
>>> > Let me remind you that there is a web server in Smalltalk named
>>> > (http://www.swazoo.org) and that it was recently ported to Squeak
>>> > All you need is to connect it to a Seaside. This can be done
>>> > because it is already done by Michel Bany on VW Seaside.
>>> > That way you get a nicely packed web app server, with easy, out
>>> of the
>>> > box installation. And from experience so far I can say that
>>> Swazoo is
>>> > capable to serve small to medium sized public web sites and all
>>> > intranets. So, only for really big websites you need to start
>>> > to go Apache or lighthttp way ...
>>> > Best regards
>>> > Janko
>>> > Maintainer of Swazoo
Smalltalk Web Application Server
More information about the Seaside