The function discompsetup
sets up a distributed computation
and configures some global parameters such as definition file names,
data file names, instance object file names, and ssl configuration parameters. The
function creates some of necessary subdirectories if not already present and throws
an error if the workspace areas are not writeable
distcompSetup(workspacePath = "", defnPath = paste(workspacePath, "defn",
sep = .Platform$file.sep), instancePath = paste(workspacePath, "instances",
sep = .Platform$file.sep), defnFileName = "defn.rds",
dataFileName = "data.rds", instanceFileName = "instance.rds",
ssl_verifyhost = 1L, ssl_verifypeer = 1L)
a folder specifying the workspace path. This has to be writable by the opencpu process. On a cloud opencpu server on Ubuntu, for example, this requires a one-time modification of apparmor profiles to enable write permissions to this path
the path where definition files will reside, organized by computation identifiers
the path where instance objects will reside
the name for the compdef definition files
the name for the data files
the name for the instance files
integer value, usually 1L
, but for testing with
snake-oil certs, one might set this to 0L
integer value, usually 1L
, but for testing with
snake-oil certs, one might set this to 0L
TRUE if all is well
getConfig
# NOT RUN {
distcompSetup(workspacePath="./workspace")
# }
Run the code above in your browser using DataCamp Workspace