CSP Gateway Configuration Guide - InterSystems Documentation
CSP Gateway Configuration Guide - InterSystems Documentation
CSP Gateway Configuration Guide - InterSystems Documentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>CSP</strong> <strong>Gateway</strong> Operation and <strong>Configuration</strong><br />
DirectoryIndex /csp/samples/menu.csp index.html index.html.var<br />
2.6 Compressing the Response to Requests for <strong>CSP</strong><br />
Forms (GZIP/ZLIB)<br />
Note:<br />
The <strong>CSP</strong> <strong>Gateway</strong> does not support GZIP compression on VMS.<br />
Compressing the response generated by the <strong>CSP</strong> engine before dispatching it to the client is advantageous because it can<br />
dramatically reduce the network bandwidth required to transport the response to the client. From the client’s perspective<br />
the performance of the application is improved. This is particularly true for clients accessing the application through mobile<br />
devices over slower telecommunications networks. There is, of course, a cost in terms of the web server host’s CPU time<br />
that’s required to actually compress the data but this is a small price to pay for the advantages.<br />
The advantage of serving compressed response data is particularly marked for <strong>CSP</strong> pages for which large volumes of<br />
response data are generated.<br />
There are two methods for implementing GZIP in a web server environment.<br />
• Using the <strong>Gateway</strong>’s own interface to the GZIP library described here.<br />
• Using a GZIP output filter as an add-on to the hosting web server.<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 />
42 <strong>CSP</strong> <strong>Gateway</strong> <strong>Configuration</strong> <strong>Guide</strong>