30.01.2015 Views

CSP Gateway Configuration Guide - InterSystems Documentation

CSP Gateway Configuration Guide - InterSystems Documentation

CSP Gateway Configuration Guide - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compressing the Response to Requests for <strong>CSP</strong> Forms (GZIP/ZLIB)<br />

Most Web servers offer add-on facilities for compressing data. Windows/IIS offers a gzip filter (implemented as an ISAPI<br />

filter). The Apache Group offer a compression filter implemented as an add-on module (mod_deflate.c – which, rather<br />

confusingly, implements gzip compression not deflate). There is also a third-party module for Apache called mod_gzip.c.<br />

There are a number of third-party GZIP products available as add-ons for most Web servers.<br />

The advantages of implementing a compression solution directly in the <strong>CSP</strong> <strong>Gateway</strong> are as follows:<br />

• Ease of setup and configuration.<br />

• Greater flexibility in controlling which <strong>CSP</strong> files are to be compressed.<br />

• The <strong>Gateway</strong> receives the response content from Caché in fairly large chunks; therefore the performance of the compression<br />

and the degree of compression achieved is better if the data is submitted to the compressor functions in large<br />

buffers.<br />

• Finally, it has been discovered that if Chunked Transfer Encoding is enabled at the <strong>CSP</strong> <strong>Gateway</strong> level and if the<br />

Apache mod_deflate output filter is enabled for the same resources, then Windows browsers are occasionally unable<br />

to display the response content.<br />

The <strong>Gateway</strong> makes use of the freely available GZIP (or zlib) library for implementing data compression. The compression<br />

algorithm used is described in RFCs (Request for Comments) 1950 to 1952.<br />

2.6.1 Installing the GZIP/ZLIB Library<br />

You can download the GZIP/ZLIB library from the following site:<br />

http://www.zlib.net/<br />

This resource was developed by Jean-loup Gailly and Mark Adler (Copyright (C) 1995-2006).<br />

The library is freely available for all platforms on which the <strong>Gateway</strong> is supported. It is implemented as a DLL for Windows<br />

(zlib.dll), a shared object (or shared library) for UNIX® systems (libz.so or libz.sl) and a ZLIB library is available as a<br />

shareable image for OpenVMS. The library libz.so (or libz.sl) is usually pre-installed on all Linux systems (it is usually<br />

installed in /usr/lib/ or /usr/local/lib).<br />

The <strong>Gateway</strong> dynamically links to the ZLIB library when response compression is requested for the first time. Thereafter<br />

the ZLIB library remains loaded until the <strong>Gateway</strong> is closed down.<br />

For Windows, the ZLIB library should be installed in the Windows System32 directory:<br />

C:\WINDOWS\SYSTEM32\ZLIB.DLL<br />

It should be noted that in the latest distributions, the library is named as ZLIB1.dll. This must be renamed to ZLIB.DLL in<br />

order for the <strong>Gateway</strong> to find it.<br />

For UNIX® systems, the library (libz.so or libz.sl) is usually installed in one of the following locations:<br />

• /usr/lib/<br />

• /usr/local/lib/<br />

If the <strong>Gateway</strong> is able to load the ZLIB library on demand and identify all the required functions, the following initialization<br />

message is written to the Event Log:<br />

<strong>CSP</strong> <strong>Gateway</strong> Initialization<br />

The ZLIB library is loaded - Version 1.2.3.<br />

(This library is used for the optional GZIP compression facility)<br />

If the <strong>Gateway</strong> cannot find or link to the ZLIB library, it operates as before (pages are returned without being compressed).<br />

A statement of failure is written to the Event Log.<br />

<strong>CSP</strong> <strong>Gateway</strong> <strong>Configuration</strong> <strong>Guide</strong> 41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!