Choose the deployment architecture

When choosing how to deploy Decision Services you first need to consider how they will be called by your application. Corticon supports both web service and in-process deployment. Web service deployment allows your Decision Services to be called as a REST or SOAP service. This is the most common way of deploying and integrating Corticon. In-process deployment allows you to embed Corticon in your application. This requires custom code within your application but has the performance advantage of not making a network call to execute rules.

Corticon Decision Services are deployed into a Corticon Server. For both web service and in-process deployment you first deploy the Corticon Server and then deploy your Decision Services to it. Once deployed to the server, they become available to your application.

Deploying as a web service requires deploying the Corticon axis.war to your application server. Once deployed you can configure security and access control using the services of your application server. When accessing your Decision Services as a REST service, you will pass the data to process as a JSON payload. When accessing them as a SOAP service, you will pass the data as an XML payload. See the Web Services guide for more information.

Deploying in-process requires custom code in your application to instantiate a Corticon server, load Decision Services, and invoke them with your application data. When deployed in-process you can pass data to your Decision Services either as JSON or XML, or as Business Objects using Corticon’s Java Object Messaging. See the In-Process Guide for more information.

Packaging the Decision Service

To deploy your rules to a Corticon Server you must package them as a Decision Service. Packaging takes all the required rule assets to produce an .eds file ready for deployment. Corticon provides multiple options for packaging your rule assets into Decision Services including:

  • Packaging Decision Services from Corticon Studio
  • Packaging using ant macros or command line utilities

Once packaged, you can deploy your Decision Service to either a Corticon Server deployed to an application server or a Corticon Server instantiated in-process in a custom application.

Deploying the Decision Service

The options available for deploying your Decision Service to a Corticon Server depend on how the server is deployed.

If deployed to an application server:

  • Deploy using cdd files—A Corticon Deployment Descriptors (cdd) file is a text file identifying one or more Decision Services to be deployed and properties to be set on the Decision Service. The Corticon Server has the option to scan for new or updated cdd files, allowing a running Corticon Server to automatically load new or updated Decision Services.
  • Deploy using Corticon Web Console—The Web Console provides a web UI for managing your Corticon Servers. It allows you to deploy Decision Services as well as get metrics on their operation.
  • Deploy using REST APIs—The Corticon Server provides a set of REST APIs for managing the server and the Deployment of Decision Services. These APIs allow you to integrate the management of Corticon Servers with other applications.
  • Deploy using command line tools—The Corticon Server provides command line tools for the deployment of Decision Services. This allows the deployment to be scripted.
  • Deploy from Corticon Studio—From Corticon Studio you can package Decision Services for deployment as well as deploy them directly to a Corticon Server. This is useful in development environments but is not recommended for production.

If deployed in-process:

  • Deploy using APIs—When using Corticon in-process you have access to a rich set of APIs for managing the Corticon Server and the deployment of Decision Services. These APIs are available for both Java and .NET applications.
  • Deploy using cdd files—The option to use cdd files for deployment is also available when deploying in-process. The advantage of using cdd with in-process deployment is it externalizes the deployment of your decision services from your application.

Deployment Best Practices

Corticon provides multiple options for packaging and deploying Decision Services, giving you flexibility in managing the process. What counts as best practice can vary by organization but here are recommendations to follow:

  • Keep your rule assets in a source control—Using a source control system such as git allows you to manage access to rule assets, track changes, and track the revisions used when packaging a Decision Service for deployment.
  • Automate the packaging of your Decision Services—Corticon provides ant macros and command line tools for packaging your rule assets into eds files for deployment. Automating the packaging of your Decision Services will give you greater control and reproducibility of your deployment process.
  • Automate the testing of your Decision Services—Corticon provides ant macros allowing you to script the execution of rule tests created by your rule modelers. Automating the execution of these test allows you to establish a quality gate where you don’t deploy Decision Services until rule tests have passed.
  • Automate the deployment of your Decision Services—Corticon provides command line tools and REST APIs for the deployment of Decision Services. You can also script the deployment when using cdd files

Following these best practices allows you to adhere to Continuous Integration/Continuous Deployment (CI/CD) practices and fully automate the package, testing and deployment of your Decision Services and to use automation management tools such as Jenkins and Teamcity.

Cloud and Container Deployment

Corticon Server can be deployed to any cloud platform supporting deployment of web services or custom applications. This includes deployment to Amazon AWS and Microsoft Azure. When deploying to a cloud platform the considerations above for choosing the deployment architecture and methods still apply.

Corticon Server can be deployed using containers such as Docker. Deploying to a container typically involves copying the basic configuration on an existing appserver such as tomcat, and then adding it to your Corticon license and your Decision Services to create a config definition that is ready to run.

About Corticon’s Bundled Tomcat

Corticon Server and Web Console install a standard Tomcat distribution to help you quickly get started. This is a standard Tomcat distribution at the time of Corticon release. It may not have the latest security patches or other security configuration changes recommended for production use. When moving to production, it is recommended to deploy Corticon Server and Web Console to a supported application server that you have supplied and secured. If you choose to use the bundled Tomcat in production, you assume responsibility for applying Tomcat security patches and performing security configuration.