@ -103,7 +103,7 @@ This protocol proved great robustness in real world testing. Thus whole backend
### Worker - File Server communication
### Worker - File Server communication
Worker is communicating with file server only from _execution thread_ (see picture above). Supported protocol is HTTP optionally with SSL encryption (**recommended**, you can get free trusted DV certificate from [Let's Encrypt](https://letsencrypt.org/) authority if you have not one yet). If supported by server and used version of libcurl, HTTP/2 standard is also available. File server should be set up to require basic HTTP authentication and worker is capable to send corresponding credentials with each request.
Worker is communicating with file server only from _execution thread_. Supported protocol is HTTP optionally with SSL encryption (**recommended**, you can get free trusted DV certificate from [Let's Encrypt](https://letsencrypt.org/) authority if you have not one yet). If supported by server and used version of libcurl, HTTP/2 standard is also available. File server should be set up to require basic HTTP authentication and worker is capable to send corresponding credentials with each request.
#### Worker side
#### Worker side
@ -161,7 +161,7 @@ server, its IP address and port is configurable in the API.
- **eval** -- evaluate a job. Requires at least 4 frames:
- **eval** -- evaluate a job. Requires at least 4 frames:
- `job_id` -- identifier of this job (in ASCII representation -- we avoid endianness issues and also support alphabetic ids)
- `job_id` -- identifier of this job (in ASCII representation -- we avoid endianness issues and also support alphabetic ids)
- `header` -- additional header describing worker capabilities. Format must be `header_name=value`, every header shall be in a separate message frame. There is no maximum limit on number of headers. There may be also no headers at all.
- `header` -- additional header describing worker capabilities. Format must be `header_name=value`, every header shall be in a separate message frame. There is no maximum limit on number of headers. There may be also no headers at all.
- empty frame (with empty string)
- empty frame -- frame which contains only empty string and serves only as breakpoint after headers
- `job_url` -- URI location of archive with job configuration and submitted source code
- `job_url` -- URI location of archive with job configuration and submitted source code
- `result_url` -- remote URI where results will be pushed to
- `result_url` -- remote URI where results will be pushed to
@ -204,10 +204,10 @@ Message JSON format is dictionary (associative array) with keys:
- FAILED -- something bad happened and job was not executed at all
- FAILED -- something bad happened and job was not executed at all
- UPLOADED -- results are uploaded to fileserver
- UPLOADED -- results are uploaded to fileserver
- STARTED -- evaluation of tasks started
- STARTED -- evaluation of tasks started
- ENDED -- evaluation of tasks is finished
- ENDED -- evaluation of all tasks finished, worker now just have to send results and cleanup after execution
- ABORTED -- evaluation of job encountered internal error, job will be rescheduled to another worker
- ABORTED -- evaluation of job encountered internal error, job will be rescheduled to another worker
- FINISHED -- whole execution is finished and worker ready for another job execution
- FINISHED -- whole execution finished and worker is ready for another job execution
- TASK -- task state changed -- see below
- TASK -- task state changed, further information will be provided -- see below
- **task_id** -- id of currently evaluated task. Present only if **command** is "TASK".
- **task_id** -- id of currently evaluated task. Present only if **command** is "TASK".
- **task_state** -- state of task with id **task_id**. Present only if **command** is "TASK". Value is one of "COMPLETED", "FAILED" and "SKIPPED".
- **task_state** -- state of task with id **task_id**. Present only if **command** is "TASK". Value is one of "COMPLETED", "FAILED" and "SKIPPED".
- COMPLETED -- task was successfully executed without any error, subsequent task will be executed
- COMPLETED -- task was successfully executed without any error, subsequent task will be executed