Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Multiple Server Support per Client

ctNOGLOBALS support (see Multiple Instance Support) allows client applications to connect to multiple FairCom Servers simultaneously. Using ctNOGLOBALS and the five instance functions, NextCtree(), RegisterCtree(), SwitchCtree(), UnRegisterCtree(), and WhichCtree(), a single client process can connect to multiple FairCom Servers. For example, connect a Windows client to an Mac OSX Server, an AIX Server, and a Sun SPARC Server simultaneously.

This support requires each connection to a FairCom Server to have its own unique FairCom DB instance. The instance is an allocated structure in memory that contains the FairCom DB global variables for the specific instance. Multiple connections can be made to the same FairCom Server or any combination of FairCom Servers on the network.

With multiple FairCom Server connections, it is possible to have multiple active transactions (one per instance), as long as the transactions do not depend on each other. In other words, transaction control is supported on a “one-to-one” basis with the client. Transactions cannot be spread across multiple FairCom Servers. Under no circumstances should related transactions be started across multiple instances. This feature, which involves multi-phase commits in a distributed environment, is being considered for a future FairCom Server release.

With FairCom’s sophisticated Netformat, (automated byte flipping between dissimilar platforms), communication logic the multiple FairCom Server support allows data to be seamlessly transferred from machine to machine. This requires a DODA resource in the data file that details the record structure for that file. See Record Schemas for information on DODA resources.

For example, to move records from an SCO Unix Server to a Mac OSX Server, a simple FairCom DB read/write loop could switch FairCom DB instances between the read and write. The Netformat logic automatically transposes the numeric data “on the fly”. Of course, if you wish to flip the data yourself, FairCom allows the Netformat feature to be disabled. See the ctlxmg sample program discussion in ctlxmg - LOCLIB Sample Program.