[Seaside] GZIP siaside.

Philippe Marschall philippe.marschall at gmail.com
Fri Sep 26 18:00:25 UTC 2008


2008/9/24 agnaldo4j <agnaldo4j at gmail.com>:
> Philippe Marschall escreveu:
>
> 2008/9/20 agnaldo4j <agnaldo4j at gmail.com>:
>
>
> Julian Fitzell escreveu:
>
> On Sat, Sep 20, 2008 at 3:25 PM, Philippe Marschall
> <philippe.marschall at gmail.com> wrote:
>
>
> 2008/9/19 agnaldo4j <agnaldo4j at gmail.com>:
>
>
> Sorry, my english is very limited.
>
> I use seaside with squeak 3.9.
> I have a desktop application developed in java, this desktop application
> send a gzip stream to server(seaside) and receive from the server a gzip
> stream.
>
>
> This doesn't sound very Seaside specific. Seaside only works over
> http(s), it's a web framework. It looks more like you need a generic
> Squeak/Smalltalk server.
>
>
> I'm not certain but is the question just about using GZIP content
> compression for the HTTP stream?
>
> Julian
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> Correct Julian, is this.
> My request and response are in gzip mode, but in seside i don't undarstand
> how todo this.
> A example in Ruby on Rails:
> class TesteController < ApplicationController
>   protect_from_forgery :except => [:teste]
>
>   require 'zlib'
>
>   def teste
>     gz = Zlib::GzipReader.new(request.body)
>     puts gz.read
>
>     render :json => {:nome => "Agnaldo de Oliveira"}.to_json
>
>     StringIO.open('', 'w') do |strio|
>       gw = Zlib::GzipWriter.new(strio)
>       gw.write(response.body)
>       response.body = strio.string
>       gw.close()
>     end
>   end
> end
>
>
> Sorry for not replying earlier. You can zip and unzip strings by
> sending #zipped or #unzipped to them. To make that work in every case
> you probably have to hack it into WAKom/Encoded or configure Apache
> (see Julian's post).
>
> Your post raises some other questions however, most importantly how
> does the Java application interact with Seaside? E.g when and why does
> it connect to Seaside? Why does the Java application use gzip? Is
> there a way to turn it off in the Java application?
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> Hello Philippe,
>
> The java application send a gzip stream to server for reduce the size of
> json message.
> the message is large(4 mb), and the response is large to.
> With this i reduce time delay.

If you interact over JSON you probably don't need all the component
(and session and callback and backtrack) functionality of Seaside and
want to write a WARequestHandler or use a different web framework at
all.

> You wrote:  "You can zip and unzip strings by sending #zipped or #unzipped
> to them.", but i don't know how get this zipped stream by request.

Something along the lines of:
self session curretRequest rawPostFields unzipped

Cheers
Philippe


More information about the seaside mailing list