kidney_service

The kidney_service application is an alternative web service for finding optimal solutions. Unlike the kidney_server it only supports the REST protocol but it additionally supports the CPLEX IP solver and has no dependencies on Ruby. The application is available or Linux and Windows however there is no support for Solaris OS.

To run the kidney_service you simply run it from the command line where it takes two arguments -i to specify the ip address and -p to specify the port, the defaults are localhost and 80 respectively.

As CPLEX support is integrated into the kidney_service you must ensure that the shared library libcplex125.so on Linux and cplex125.dll in Windows (supplied in the downloaded archive) can be found on the LD_LIBRARY_PATH and PATH environment variables respectively - the easiest way to do this is to just add the full path to the directory where you have extracted the application to, to the appropriate variable. Furthermore, you must also set the environment variable ILOG_LICENSE_FILE to contain the full path to the CPLEX license file.

In Linux the application can then simply be run and background. In Windows you will either have to open a command line prompt and start the application from there leaving the command line running or you may want to set the application to run as scheduled task on startup to allow it to run in the background minimised - or alternatively you may use applications out there that allow you to servicify a command line application.

The application also allows you to specify the path to two config files, namely, app_config.json and weight.json. Both these files can be found in the config directory of the downloaded application, and set with the command line switches -a and -w. This should only be necessary if you run the binary as a Windows Service. Furthermore if the application is run as a Windows Service you will also need to change the app_config.json and set the "templates_dir" and "constraints_dir" to points to the absolute path of the templates and constraints folders respectively of the install directory, i.e. ifthe application is installed in C:\kidney_service:

  "templates_dir": "C:/kidney_service/templates"
  "constraints_dir": "C:/kidney_service/constraints"
  

An example of how to run the command is given below:

    kidney_service -i 192.168.0.2
                   -p 80
                   -a /opt/kidney_service/config/app_config.json
                   -w /opt/kidney_service/config/weight.json
  

where "/opt/kidney_service" is the installation directory of application.

Finally we note that the application itself accepts HTTP requests identical to those described in the API Guide with the exception that SOAP requests are not supported. That is, the input formats, output formats, and REST API Guide are all identical to that of the kidney_server.

v1.0.0