To take advantage of FairCom ISAM, you will need to relink your application to the FairCom RTG/ISAM library. This step ensures that all I/O calls will be redirected to the FairCom RTG/ISAM Server.
This step simply involves relinking your application—you will not need to alter the source code. To do this, you will need to change your makefile, replacing the existing ISAM libraries with the FairCom libraries.
Note: On Unix/Linux systems, the application directly links to the shared library, which is called libpsqlmif.so for both 32-bit and 64-bit applications.
On both Unix/Linux and Windows systems, these steps replace the existing library with a FairCom library named "mtclient".
On Windows systems, you should have a library called w64BTRV.lib (64-bit) or w3BTRV.lib (32-bit) in the linkage section. Remove the file and replace it with the FairCom library called mtclient.lib located in the following folder:
C:\FairCom\V10.4.0.RTG\winX64\Driver\ctree.BTRV
or
C:\FairCom\V10.4.0.RTG\win32\Driver\ctree.BTRV
Once you find the library and change the makefile, recompile it and relink it, creating a new executable file of your application.
Dynamically Linked Applications
For applications using dynamically linked libraries, simply replace the associated library shared object (.dll or .so) with the FairCom ISAM shared library.
Set up the configuration environment variable
Set up an environment variable called CTREE_CONF pointing to the configuration file described in CTREE_CONF Environment Variable. The command in Windows will be similar to the following:
set CTREE_CONF=c:\FairCom\ctree.conf
Make sure this environment variable is accessible and visible by your application.
The FairCom ISAM driver automatically loads a local configuration file on application startup. By default, it looks for the file ctree.conf from the CTREE_CONF environment variable used by the running process. Next it looks in the local executing directory. If not there, the defaults are used, which is a very minimal set of configurations to connect to a default server.
FairCom RTG/ISAM File Handler Overview
The FairCom RTG/ISAM file system links directly into your application's runtime, giving existing applications immediate access to FairCom DB database technology without the need of recompiling. FairCom RTG/ISAM replaces the original file system. It intercepts calls for storing and retrieving records and takes advantage, when requested, of indexes over the record buffers.
An important consideration in a client/server architecture is the time spent in client/server communication (in contrast to the direct disk access of other file-systems). With this in mind, FairCom's engineers customized a special edition of the FairCom DB database engine, FairCom RTG/ISAM Server, incorporating the functionality required of the file system. The thin client sends requests directly to the server, reducing network traffic and time spent in communication.
Transactions are another advantage of running FairCom RTG/ISAM. It is suggested that customers with production databases keep transaction logs on another disk subsystem. If a disk failure occurs in the primary data subsystem, the logs remain available. Once the main subsystem is repaired (or a backup server is found), the logs can be rolled forward into a restored copy of the database.
In addition, FairCom RTG/ISAM transparently allows read/write access to data from your application through SQL and other FairCom interfaces such as ODBC, JDBC, and ADO.NET drivers.