users@jersey.java.net

Re: [Jersey] Compression inn Jersey

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 23 Jul 2008 16:39:38 +0200

Since this thread is performance related people might be interested in SXC:

   http://sxc.codehaus.org/JAXB

Anyone want to have a go testing it with Jersey and JAXB?

Paul.

Tatu Saloranta wrote:
> --- On Wed, 7/16/08, Grazi, Victor <victor.grazi_at_credit-suisse.com> wrote:
>
>> From: Grazi, Victor <victor.grazi_at_credit-suisse.com>
>> Subject: [Jersey] Compression inn Jersey
>> To: users_at_jersey.dev.java.net
>> 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. :-/
>
> -+ Tatu +-
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

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