Configuring Compliance Checker/cHemTS

    Quick setup

    Please complete steps below to startup the application.

    Install licenses

    Configuring the system

    There are a few basic settings that are important in each use case. For testing or evaluation propose, the default settings are sufficient.

    Default settings in application.properties

    Below you can find the most important configuration settings.

    Install licences

    Your license.cxl file(s) should be installed as described in the License Management section.


    Configuring the system

    Config Server is a service of Compliance Checker to populate your settings to other servers (cc-web, cc-api, cc-bigdata and cc-backend). On startup, all of these services require the Config server to load their settings from it. Config server can update some settings runtime, but others need to be updated by restarting the servers.

    To customize the application the configuration can be modified by editing the application.properties file. Any property changed in the application.properties file will affect the appropriate services. At the clean install, the settings in application.properties.default will be copied to the application.properties file.

    At upgrading the software - i.e. installing the new software version - the application.properties file will never be overwritten. So your already customized configuration will not be changed.


    Creating user for the database (ccDB is the default)

    Creating user in MongoDB

    # THE DEFAULT DATABASE IS "ccDB". (TO USE THIS, PLEASE UNCOMMENT THE NEXT LINE.)
    # use ccDB
    
    db.createUser(
     {
      user:"cxnMongo", 
      pwd:"ccMongoPass", 
      customData: 
       {
        data:"anydata"
       }, 
      roles : [ 
         { 
          role: "clusterAdmin", 
          db: "admin" 
         },
         { 
          role: "readAnyDatabase", 
          db: "admin" 
         },
         "readWrite"
        ] 
     }
    )


    Default settings in application properties

    The following default settings in application.properties.default can be modified in the application.properties file (in this format, # stands for comments):

    Authentication

    # Security provider chooses what settings to use for user authentication
    ## LDAP: uses LDAP server to log in users
    ## ACTIVE_DIRECTORY: Uses Microsoft's Active Directory service for authentication
    ## IN_MEMORY: small number of predefined users (recommended only for testing purposes)
    ## ANONYMOUS: no login required
        common.securityProviderName = IN_MEMORY
    


    Database connection settings

    The following default database connection settings can also be modified in the application.properties file:

    # The MongoDB connection can be configured either by directly setting its Connection String defined by the option `spring.data.mongodb.uri` or setting the `databaseHost`,
    # `databasePort`, `databaseName`, `mongoUser` and `mongoPassword` options below. If the `spring.data.mongodb.uri` is not set, the connection string starts with
    # "mongodb://{databaseHost}:{databasePort}/{databaseName}" by substituting the corresponding options.
    # In order to enable secure database transactions (which is usually default with databases in the cloud), use SRV Connection Format or the explicit TLS options as defined by
    # the documentation of your database provider.
        #spring.data.mongodb.uri
    
    # Host of the database
        databaseHost = 127.0.0.1
    
    # The port where MongoDB listens for requests
        databasePort = 27017
    
    # The name of database in MongoDB
        databaseName = test
    
    # Username of database user.
        mongoUser = cxnMongo
    
    # Password of database user.
        mongoPassword = ccMongoPass


    Connecting to a MongoDB cluster cloud

    Connection to a MongoDB cluster cloud (MongoDB Atlas, Amazon DocumentDB) can be configured by inserting the provided mongoDB URI to the application.properties file:

    #spring.data.mongodb.uri=<URI PROVIDED BY CLOUD SERVICE>

    For DocumentDB the PEM file should be downloaded, too. (See https://docs.aws.amazon.com/documentdb/latest/developerguide/getting-started.connect.html )

    This PEM file should be added to the trusted store:

    keytool -import -keystore cacerts -file


    The new certificate should be added to the default trusted certificate.


    File check settings

    # These settings set the maximum size of upload for services. These properties also effect the maximum size of DB update as well.
    spring.servlet.multipart.max-file-size=256MB
    spring.servlet.multipart.max-request-size=256MB
    
    # Search always runs on all available cores.
    # If you use PARALLEL, then the system will distinct executors, one for all cores, that can boost the overall system performance and can cause a massive CPU load on server.
    # If you use SEQUENTIAL execution strategy then only one executor will run on the server. (For search this executor will use all cores, but it creates a smaller CPU load.)
    executionStrategy=PARALLEL
    
    # The priority of Single check and Batch check can be configured by setting *.threadPriority key values between 1 (minimum) and 10 (maximum) priority.
    # Default values are 5 for single 3 for batch.
    check.single.threadPriority=5
    check.batch.threadPriority=3
    
    # This size determines how many molecules are checked in one run.
    # If you upload a file with 1000 molecules, and set this property to 25 then the file will be cut to 40 pieces, and 40 executors can start working simultaneously.
    chunkSize=10
    
    # The maximum number of explicit atoms in a molecule that should be checked.
    check.structure.maxAtomCount=200
    
    # The comma-separated list of strings that are known to be invalid inputs and hence get rejected by CC and cHemTS checks even if they would be otherwise importable as a substance.
    #check.structure.knownInvalidInputStrings=
    
    # Speed up of checking Markush structures
    searchEngine.enableMarkushAnalyzer=true


    Timeout settings

    # Session timeout settings in seconds or minutes (m)
    server.servlet.session.timeout=120m
    
    # If the servers know nothing about a job, then they mark it as dead, and reschedule to process. You can set this checking interval in milliseconds
    # through this variable.
    common.deadJobTreshold=120000
    
    # Time limit in milliseconds for checking compliance of one target molecule against all selected rules.
    # If check reaches this limit then search with the given target is stopped and it is added to the list of errors.
    searchEngine.check.timeLimit=60000
    
    # Time limit in milliseconds for checking compliance of one target molecule against one query substance.
    # If the check against a substance reaches this limit then checking the given target is stopped and the given target molecule is added to the list of errors.
    searchEngine.molSearch.timeLimit=10000
    
    # Communication is load-balanced through Ribbon classes. 
    # (https://github.com/Netflix/ribbon/wiki/Programmers-Guide/)
    ribbon.ReadTimeout=16000


    Hystrix settings

    # Compliance Checker services use Hystrix circuit breaker to protect servers from overload.
    # You can read more about hystrix settings here: https://github.com/Netflix/Hystrix/wiki/Configuration
    hystrix.command.default.execution.timeout.enabled=true
    hystrix.threadpool.default.coreSize=10
    hystrix.threadpool.default.maxQueueSize=100
    hystrix.threadpool.default.queueSizeRejectionThreshold=90
    hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=15000
    hystrix.shareSecurityContext=true
    feign.hystrix.enabled=true

    Advanced settings

    You can find detailed descriptions about further settings here.