Crate strymon_executor [] [src]

The default implementation of the Strymon job executor.

This library is intended for internal use and most likely not what end-users are looking for. If you would like to spawn a new Strymon executor, please take a look at the strymon manage start-executor subcommand of the Strymon command line utility.

If however you would like to implement a custom executor implementation, or extend this current implementation, please continue reading.

Implementation

The main logic of the Strymon executor is implemented in the ExecutorService struct. It is commonly instantiated using the Builder type, which initializes the event loop and sends an initial executor registration request to obtain a unique executor id. Once the service is registered, incoming requests from the coordinator are handled by the ExecutorService::dispatch method.

When an executor receives a SpawnJob request from the coordinator, it will fetch the corresponding job binary from the submitter and create a new working directory of the form <workdir>/<submission-timestamp>_<job-id>/<process-index>/ and use it to store the job binary and potential job artifacts.

The current implementation of the ExecutorService only supports spawning Strymon jobs as operating system processes. There is no network communication between spawned processes and the parent executor. Configuration data is passed down to the spawned process using environment variables. Currently, the parent executor captures the standard output and standard error of the spawned child process and forwards it to the log crate. The process supervision logic is implemented in the ProcessService type.

Modules

executable

Job supervision logic for native executables.

Structs

Builder

A builder type to initialize and run a new executor instance.

ExecutorService

A running Strymon executor instance.