 |
CTUSER Server Model
FairCom also offers an easy method for you to expand the functionality of the c-tree Server by loading your own custom user functions. By using DLL’s in the Windows/OS/2 environments, 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 c-tree Server.
The CTUSER model accepts a text buffer as its argument and passes this buffer to the c-tree Server. The c-tree Server executes the CTUSER function and loads the functionality coded into the CTUSER function stub provided to you in source code form with c-tree Plus. Examples of CTUSER uses include:
- Determine machine specifics on the c-tree Server machine, i.e., amount of hard drive space free, etc..
- Start a cron process.
- 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 c-tree Server.
- The perfect hook for additional c-tree Server side operations.
Considerations
- CTUSER must consider defer logic in non-native threaded environments to avoid tying up the c-tree Server.
- Be careful not to call a system function that may not return, or may take a while to return, since the c-tree Server will not process other threads until CTUSER returns in non-native or non-preemptive environments.
|