5 Overview

In this section an overview of the basic concepts about the OptServer is given.

5.1 Synchronous Optimization

The easiest way to submit optimization problem to the OptServer is in synchronous mode:

  1. A submision request is sent over the OptServer and the problem is transferred.
  2. The submitter is put on hold.
  3. The OptServer runs the optimizer and wait for the results.
  4. When the optimizer terminates the OptServer collects the outcome and passes over the client.
  5. The client receives the solution and get back control.

The process can be represented as in Fig. 5.1.

_images/sync-opt.svg

The workflow is simple and effective for problems that does not take long to solve, or at least in all settigns in which the client can wait for the job to complete.

Warning

If the connection between the client and the OptServer is lost, the job result can only be recovered by manually accesing the job workspace on the server.

5.2 Asynchronous Optimization

The OptServer accepts jobs in asynchronous mode, i.e. once the job request is accepted, the client get control back and the server proceed with the optimization. The client can query the OptServer for the status of the job and in case retrieve the solution, if any. The steps can be summarized as:

  1. A submision request is sent over the OptServer and the problem is transferred.
  2. The submitter regain control and can continue its execution flow.
  3. The client can query the OptServer at any time about the job status and solution availability.
  4. The OptServer runs the optimizer and wait for the results.
  5. When the optimizer terminates the OptServer collects the outcome.

The process can be represented as in Fig. 5.2.

_images/async-opt.svg

Asynchronous mode is particularly suitable when

  • a job is expected to run for long time,
  • one must submit a set of small jobs that can run in parallel or
  • the submitter is a short-lived process, such as a docker instance.

Warning

The OptServer does not implement any queing strategy, so a job is executed as it is submitted.