OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

2.1.14 User data compression

The user data to be exchanged through RPCs can be compressed so that the number of packets transmitted on the network is reduced and the load on the network is decreased. To compress the user data, specify Y in the rpc_datacomp operand of the system common definition of OpenTP1 on the client side.

Organization of this subsection
(1) Data compression facility
(2) Effect of the data compression facility

(1) Data compression facility

With the data compression facility, the client side OpenTP1 transmits the service request from the client UAP on the network after compressing the service request data. The corresponding response returned from the SPP is also transmitted on the network after the response data is compressed by the server side OpenTP1. When the client side OpenTP1 receives the response, it decompresses the compressed data and passes it to the client UAP.

The rpc_datacomp operand specified is made effective on the client side that requests the service through the function dc_rpc_call(). That is, when the rpc_datacomp=Y is specified in the client side OpenTP1, the service request and response messages can be transmitted on the network with user data compression even if it is not specified in the server side OpenTP1. Conversely, without specifying rpc_datacomp=Y in the client side OpenTP1, the user data for the service request and response messages is not compressed even if it is specified in the server side OpenTP1. This is true only when the server side OpenTP1 supports the user data compression facility.

The figure below shows the outline of the data compression facility.

Figure 2-13 Outline of the data compression facility

[Figure]

(2) Effect of the data compression facility

The effect of the data compression facility depends on the description of the user data. The data compression facility has effect on the user data containing many strings that are composed of repetitive same characters. However, it has no effect on the user data without repetitive same characters.

For the service request whose user data is not affected by compression, it is sent without data compression even if rpc_datacomp=Y is specified in the client side OpenTP1. However, if the user data for the corresponding response message is positively affected by compression, the response message is sent after data compression. This is true only when 03-06 or higher version of TP1/Server Base is installed on both the client and server sides. In the other versions, the response message is sent without data compression when the service request data is not compressed.

The data compression facility introduces overhead in data compression and decompression. To use the data compression facility, pre-evaluate its effects and impact on the performance.