Using a .NET Server installation to set up an in-process server
If you choose to manage Corticon Server for .NET in-process via your client application or via a custom container, you are taking responsibility for many of the tasks that are normally performed by a web or application server. But by doing it in your own code, you can optimize your environment and eliminate unneeded overhead. This can result in much smaller footprint installations and faster performance.
Because Corticon Server is a set of classes, it can easily be deployed in-process in an application. When deployed in-process, the following tasks are the responsibility of the client application:
Management of application settings, ensuring the base set of Corticon Server classes is properly referenced.
Lifecycle management, including server startup/shutdown
Security (if needed)
Corticon Server can also be installed into a custom container within any application. It has a small footprint and thus can be installed into client applications including browser-based applications, laptops and mobile devices.
Installation in-process or in a custom container involves these basic steps:
1. Place the following Corticon Server directories and their contents in a directory that is accessible by the application container.
/bin
/lib
/conf
2. Configure the application to reference all DLL files located in the /bin directory.
3. Write code that:
Initializes Corticon Server
Sets the following three environment variables:
CORTICON_HOME - The explicit path that is the root for /bin, /lib, and /conf.
CORTICON_WORK_DIR - The explicit path to the working directory
CORTICON_LICENSE - The explicit path to the CcLicense.jar file.
Deploys the Decision Services into the Corticon Server
Requests a decision by marshaling the data payload and then invoking the relevant Corticon Decision Service
Processes the response from the Decision Service.
Sample code is provided that demonstrates an in-process deployment of Corticon Server for .NET. This code is packaged as the executable Corticon-Api-Inprocess-Test.exe in the [CORTICON_HOME]\Server .NET\samples\bin directory.