This topic describes the architecture, deployment, and O&M of the remote computing service.
7.1. C/S architecture¶
The Client/Server (C/S) architecture mainly involves clients and compute servers. Mindo provides many client configuration options. In the most basic configuration, a single compute server can accept and execute jobs from multiple clients. The following figure shows an example.
In the remote computing service, you can call the solver API to write your own optimization program, submit jobs to the compute server, and obtain results, without the need to configure a local server. In addition, the client SDK has complete solving features. Therefore, you can also choose to solve problems locally.
When the compute server receives many jobs, the submitted jobs will be put into a queue in the job pool before being computed. The system automatically optimizes the allocation of jobs.
The client submits jobs in a non-interactive mode. That is, the client disconnects from the server after submitting jobs and then reconnects with the server to query the job status and obtain the computing results. In non-interactive mode, the cluster manager stores the optimization problems to be solved, submits jobs to the server cluster, and stores the job results, including the status of optimization problems, logs, solutions to the problems, and errors occurred.
7.2. Deployment and installation¶
To use the remote computing service, ensure that the server and client are correctly deployed. Service maintenance personnel need to pay attention to content in Deploy the compute server. Service users only need to pay attention to content in Download and install the client SDK.
7.2.1. Download and install the client SDK¶
You can choose a client SDK based on your operating system (Windows, Linux, or OSX). The client SDK is the same as the local version, see Download MindOpt .
After obtaining the client SDK, finish local installation by referring to Installation. If you do not need to use the standalone (local) solving feature, you do not need to apply for a standalone license. You need to obtain the IP
address and the personal token
of the compute server and enter them in the optimization program.
To use the C API, connect to the dynamic-link library (DLL) by referring to Using C language.
To use the C++ API, compile, install, and connect to the DLL by referring to Using C++.
To use the Python API, install the DLL by referring to Using Python.
7.2.2. Deploy the compute server¶
You can deploy the compute server on any host capable of Internet access. The compute server is deployed in the Docker container. Therefore, you need to prepare the Docker environment, server image file, and server license.
Note
For users can experience the MindOpt C/S version easily, we serve a remote service in Tianchi Platform https://tianchi.aliyun.com/mindopt . Users can download the client SDK to the CloudShell and use the teachme to read and copy the examples. The free authorization token can be got from: https://tianchi.aliyun.com/mindopt/authrize (Alibaba cloud account login is required before view).
The following will describe how to deploy a MindOpt Remote Server.
You can search for the Docker installation method in Alibaba Cloud Developer Center . A sample method is provided at https://developer.aliyun.com/article/377864 .
Obtain and install the server image file. Contact us for the docker image file by referring to Contact us.
You need a license to use the server. Contact us by referring to Contact us to obtain a free trial license that will expire in several days or a formal commercial license. The license for local solving on the client is different from the server license, and they cannot be used interchangeably.
Perform the following steps to deploy the compute server:
Step 1: Import the server image:
docker load -i mindopt-compute-server.tar.gz
Step 2: Start the container and enable the server. The following statement shows an example. You need to replace the container name, server data mapping address, and image ID:
docker run -d --name mindopt -s -p 80:7001 -v /Users/homename/compute-server-data:/data mindopt-compute-server:20201207
Step 3: Place the license file under the directory associated in step 2:
cp mindopt.lic /Users/homename/compute-server-data/mindopt.lic
7.2.3. Web verification¶
After deploying the compute server, you can open the web page of MindOpt to check whether the server is started or whether the license is valid. Enter the following address in the browser:
Local installation address: 127.0.0.1
Remote installation address: http://xx.xx.xx.xx:7001/
If the compute server is correctly installed, the following page will appear:
Enter the account and password:
Default account: admin
Default password: admin
After successful logon, the welcome page appears:
7.3. Operation and Maintenance¶
7.3.1. Restart the compute server¶
You can perform the following commands to restart or stop the container service:
Stop the container service:
docker stop mindopt-s
Restart the container service:
docker start mindopt-s
7.3.2. Clear disk data¶
By default, submitted problems, results, and logs are stored on the compute server. You need to clear the data periodically. You can view the disk usage on the overview page.
If you deploy the compute server on your local host, the clearing command is as follows:
http://127.0.0.1/api/task/clearTask?key=job_id
In the preceding command, job_id
is the ID of the job to be cleared.