#23 Support HTTP gzip encoding

Future Release
closed
Luc Boudreau
5
2014-02-10
2010-08-24
Anonymous
No

As XMLA responses are verbose and can become very large, I think it is important that OLAP4J supports HTTP gzip encoding. Activating gzip encoding on servers like Tomcat takes 1mn, and implementing support for it in Olap4J is also a simple task:

Olap4J would have to expose the following HTTP header line to tell it supports GZip encoding:
Accept-Encoding: gzip

Then the server will send compressed HTTP payloads, that can be uncompressed with a GZipInputStream.

Discussion

  • Julian Hyde
    Julian Hyde
    2010-08-24

    Sounds reasonable. Can someone contribute a patch.

     

  • Anonymous
    2010-08-25

    We have done that before for a customer project:

    Edit XmlaOlap4jHttpProxy.getResponse(URL url, String request):

    Where the request properties are set add:

            // Tell the server that we support gzip encoding
            urlConnection.setRequestProperty("Accept-Encoding", "gzip");
    

    And then just before the response is read add:

            // Get the response, again assuming default encoding.
            InputStream is = new BufferedInputStream(urlConnection.getInputStream());
    
            // Detect that the server used gzip encoding
            String contentEncoding = urlConnection.getHeaderField("Content-Encoding");
            if("gzip".equals(contentEncoding)) {
                is = new GZIPInputStream(is);
            }
    
     
  • Luc Boudreau
    Luc Boudreau
    2013-10-03

    • labels: Access control/Authentication --> Access control/Authentication, Generic XML/A driver
    • Group: --> Future Release
     
  • Luc Boudreau
    Luc Boudreau
    2014-02-10

    • status: open --> closed
    • assigned_to: Luc Boudreau