4 Replies Latest reply on Feb 14, 2007 2:57 PM by thomas.diesler

    Enabling transport compression with JBossWS

    mo_ctaylor


      I am using JBoss-4.0.4.GA and JBossWS-1.0.1.GA to develop JSR-109 POJO service endpoints using the RPC/literal model. We are currently having performance issues with large objects so I am trying to enable transport compression with Tomcat. I've enabled compression in Tomcat per instructions in the Wiki and on the Tomcat site. I can see that compression is working with a telnet session, if "Accept-Encoding: gzip" is sent.

      I see using snoop that the J2SE client of the services does not setup HTTP1.1 for compression, the HTTP does not have "Accept-Encoding: gzip, deflate" or anything like that. The HTTP1.1 Transfer-Encoding is also chunked so I hope that the compression will happen before chunking is done, will it? I have search the documentation and forums for information but have not found out how to get JBossWS to do HTTP1.1 compression.

      How do you enable transport compression with JBossWS?

      Thanks,

      Cindy

        • 1. Re: Enabling transport compression with JBossWS
          mo_ctaylor


          Any suggestions as to where to modify the client of a service to announce that it supports compression (sending "Accept-Encoding: gzip, deflate") and where to modify the client to do the actual compression and decompression? This is a J2SE client.

          Please help!

          TIA,

          Cindy

          • 2. Re: Enabling transport compression with JBossWS
            mo_ctaylor


            I discovered that there were performance fixes with JBossWS and with JBossXB so I have followed the upgrade instructions and have upgraded to JBossWS-1.0.4.GA.

            The Web Services do work faster now but we will still have a performance issue. I would like to get transport compression working with JBossWS but still have not figured out how to do so. I am wondering if JBoss Remoting can be used to get compression working. As far as I can tell it seems like JBoss Web Services uses JBoss Remoting. JBoss Remoting has pluggable data marshallers and on the JBoss Remoting Wiki it states that there exists data compression marshallers/unmarshallers for compression of large payloads. Is there a configuration file that I can modify so that my JBoss Web Services Clients and Providers use the CompressingMarshaller and CompressingUnMarshaller? Is there another way to get transport compression to work with JBoss Web Services?

            Thanks,

            CIndy

            • 3. Re: Enabling transport compression with JBossWS
              mo_ctaylor

              Are there any plans for JBossWS to upgrade to Remoting 2.0.x and use the new feature http://jira.jboss.com/jira/browse/JBREM-425;jsessionid=506E94EEC425428E9D0B647DBCB56E7C so that clients can indicate that they accept compressed transport data and actually use the compression unmarshaller if data is received that is compressed? It would be nice if this was exposed to a configuration file.

              Also I'm not sure if it is possible for a J2SE web service client easily send its transport data as compressed, but if it is and can be made configurable that would be usesful too.

              Another reference is from the Remoting User forum http://www.jboss.org/index.html?module=bb&op=viewtopic&t=96233

              • 4. Re: Enabling transport compression with JBossWS
                thomas.diesler

                jbossws endpoints are exposed as webapps on tomcat. A prerequisite for this kind of optimization would be to use remoting on the server as well. I even think there is a jira for it - contributions are welcome.