Managed File Support


 

Versions of PL/B prior to 8.4 were client side software only. Data and Index files could reside on a server but all processing took place on the workstation. The performance was generally quite good and was usually better than any other solution available.

 

With the general trend to more distributed networks over great distances, it was taking longer to access records in files located on a server that is not part of the local area network. ISAM performance was acceptable for lightly loaded systems. AAM became virtually unusable because of the slow response time.

 

With Managed File Support, all of the work of finding the record takes place on the server instead of the client. Both sides have to cooperate for the system to work.

 

With client only software, to READ an ISAM record requires at least three blocks of data that are examined (and it could be up to ten) to determine the location of the record before the record is read. To READ an AAM record for a large file could involve examining thousands of blocks of data before the correct record is found. With Managed File Support, the client sends the server the key(s) of the ISAM or AAM record to read. The server processes the read request locally where the access speed is much faster, finds the record and then sends the record back to the client.

 

The benefits of Managed File Support include no more long delays finding AAM records. In addition, a drastic reduction in network traffic. The client machine can free up some time for background tasks since it is not looking at the ISAM and AAM information anymore. Possibly reduced phone charges since the client/server connection is made with TCP/IP protocol that the Internet uses. The user simply connects to the Internet, makes a connection to the server site, and starts using the files on the server. The server may be on a different continent, yet it is still just have a local call to the Internet Service Provider.

 

Managed File Support is implemented in both Windows and Linux. A Windows workstation can get data from a Linux host and a Linux workstation can get data from a Windows host.

 

For Windows, Managed File Support uses a Dynamic Link Library. The SUNODBC and SUNACCESS products both use the same DLL.

 

To implement Managed File Support, please refer to the MAKEMFD and SUNDM utility topics.

 

The Windows (PLBWIN) and Linux (PLB) runtimes optionally support message compression and encryption when communicating with SUNDM data managers. The basic support for these capabilities is as follows:

 

Compression

Message compression is implemented using a subset of LZO real-time data compression. The SUNDM message compression can be enabled using the keyword PLB_COMPRESSION={on | off} or a new SETMODE/GETMODE keyword named COMPSUNDM={ON | OFF}. If SUNDM message compression is enabled, all messages sent to an 8.5C or later SUNDM data manager are processed through the compression algorithm starting when a PL/B program logs onto a SUNDM data manager. If the runtime is communicating with an earlier version of SUNDM, message compression is ignored without giving any errors.

 

The 8.5C SUNDM version or later will automatically detect and use compression when a runtime logs onto the data manager. There is no specific setup required for the SUNDM data manager to enable/disable message compression. This allows older to access the 8.5C SUNDM data manager as needed even though compression is not used.

 

When the runtime '-d3' option is used, statistical information concerning the data sent and received by the runtime from SUNDM is reported in the log files. This can be helpful in determining the degree to which compression is useful to a PL/B set of files being accessed via SUNDM.

 

A U42 untrappable error can occur if an unrecoverable internal compression error occurs. Such errors should be reported to Sunbelt with the appropriate data to reproduce this kind of error.

 

Encryption

The SUNDM message encryption is implemented using a public/private key algorithm. The runtime and SUNDM data manager use message encryption by default. If no encryption keys are defined, the runtime and data manager will use a default encryption key. All data transferred to and from the SUNDM data manager is always encrypted and secure.

 

There are two basic levels of encryption that be used by the PL/B user programs when accessing a SUNDM data manager. A U42 error can occur if there is a problem for the PLB_PUBLIC or PLB_LOGON keys specified in the UET/INI. The encryption levels are as follows:

 

Public Encryption Level

The Public Encryption Level is enabled when the user specifies PUBLIC key using a new UET/INI keyword named PLB_PUBLIC={keystring} or a new keyword named GETMODE/SETMODE *PUBLICKEY={keystring}. The {keystring} is a key string composed of up to sixteen (16) hex digits which must be the same public key as identified by the SUNDM data manager. In the case of the GETMODE/SETMODE form, the {keystring} is a {svarslit} data type.

 

Example UET/INI:

 

PLB_PUBLIC=1234567890ABCDEF

 

Example PL/B Program:

 

PUBLIC INIT "ABC012"

SETMODE *PUBLICKEY=PUBLIC

 

Logon Encryption Level

The Logon Encryption Level is enabled when the user has invoked the Public Encryption and has specified a LOGON key with the new UET/INI keyword named PLB_LOGIN={keystring} or the new keyword named GETMODE/SETMODE *LOGONKEY={keystring}. The {keystring} is a key string composed of up to 16 hex digits that must be the identified as a valid logon key for the SUNDM data manager. When using the SETMODE form, the {keystring} is a {svarslit} data type.

 

Example UET/INI:

 

PLB_PUBLIC=1234567890ABCDEF

PLB_LOGON=F1001

 

Example PL/B Program:

 

PUBLIC INIT "ABC012"

LOGON INIT "F1001"

 

SETMODE *PUBLICKEY=PUBLIC

SETMODE *LOGONKEY=LOGON

 

 

See Also: Disk I/O Instructions

 



PL/B Language Reference RMSRAS Support Simplified File IO