Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

CTUSER Server Model

CTUSER Model

FairCom also offers an easy method for you to expand the functionality of the FairCom Server by loading your own custom user functions. By using DLLs in the Windows environment, code resources on the Mac platform, or shared libraries in the Unix world, you can load and instigate through the CTUSER function your own logic on the FairCom Server.

The CTUSER model accepts a text buffer as its argument and passes this buffer to the FairCom Server. The FairCom Server executes the CTUSER function and loads the functionality coded into the CTUSER function stub provided to you in source code form with FairCom DB. Examples of CTUSER uses include:

  1. Determine machine specifics on the FairCom Server machine, i.e., amount of hard drive space free, etc.
  2. Start a cron process.
  3. Instigate virtually any type of operation through C function calls.

Benefits

  • All the benefits of regular client/server plus:
  • CTUSER source code for stubbing in your application logic and loading it into the FairCom Server.
  • The perfect hook for additional FairCom Server side operations.

Considerations

  • CTUSER must consider defer logic in non-native threaded environments to avoid tying up the FairCom Server.
  • Be careful not to call a system function that may not return, or may take a while to return, since the FairCom Server will not process other threads until CTUSER returns in non-native or non-preemptive environments.

TOCIndex