Re: Compression inn Jersey

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compression inn Jersey

Paul Sandoz
Administrator
Tatu Saloranta wrote:

> --- On Wed, 7/16/08, Grazi, Victor <[hidden email]>
> wrote:
>
>> From: Grazi, Victor <[hidden email]> Subject:
>> [Jersey] Compression inn Jersey To: [hidden email] Date:
>> Wednesday, July 16, 2008, 1:53 PM We would be interested in
>> compressing post and put requests to our Jersey implementation, as
>> well as for all response bodies. Some choices are: Google Protocol
>> buffers
>> (http://google-opensource.blogspot.com/2008/07/protocol-buffers-googles-
>>  data.html) (Looks intesting!) Zip or Gzip Other binary encoding -
>> Hessian?
>
> Just one comment: Google's protocol buffers is not a general
> compression scheme per se, but data mapping/serialization, using
> binary format and dropping almost all metadata associated with
> messages. That makes it more involved to try to use it with generic
> frameworks: to encode/decode, you must use their libs, and know the
> schema to bind to/from objects, to know which binary field maps
> to/from which logical entity. Resulting datagram size is smaller
> (mostly because of misssing field names and metadata -- also means
> that if you don't have schema, you won't be able to do anything
> useful with data). What I have seen is that size is roughly same as
> what basic gzip compression of xml/json messages would give you.
>
> One more thing about PB: Java implementation seems rather slow. In
> default mode, it is slower than JAXB with xml; and with "fast"
> settings, only about as fast (when considering both read and write
> cases). At least for use cases I have tried it for.

!!


> I mention this mostly because there has been lots and lots of hype
> regarding PB, and I find it annoying that most claims seem highly
> exaggerated or baseless. :-/
>

+1, loads of hype and also some good criticism, especially on the yet
another RPC mechanism aspect.

Gzip transfer encoding of XML with last-modified and ETags may well be
sufficient for many cases.

Also beware of what Ted Neward calls the "There is only one Schema
fallacy" (or something like that).

Paul.

--
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...