Skip to content

Commit

Permalink
Add basic documentation of undocumented protocol
Browse files Browse the repository at this point in the history
It seems that the protocol added a few more commands and responses in
recent times, and they should at least be documented. The way that REDUCER
is used is still somewhat confusing and needs better documentation as
to what is expected, but at least an implementor can handle the commands
with a graceful error now.
  • Loading branch information
SpamapS committed Jul 3, 2016
1 parent 26764fe commit eabf8a0
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions PROTOCOL
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ header is:
34 SUBMIT_JOB_LOW_BG REQ Client
35 SUBMIT_JOB_SCHED REQ Client
36 SUBMIT_JOB_EPOCH REQ Client
37 SUBMIT_REDUCE_JOB REQ Client
38 SUBMIT_REDUCE_JOB_BACKGROUND REQ Client
39 GRAB_JOB_ALL REQ Worker
40 JOB_ASSIGN_ALL RES Worker
41 GET_STATUS_UNIQUE REQ Client
42 STATUS_RES_UNIQUE RES Client


4 byte size - A big-endian (network-order) integer containing
the size of the data being sent after the header.
Expand Down Expand Up @@ -176,6 +183,16 @@ SUBMIT_JOB_LOW, SUBMIT_JOB_LOW_BG
- NULL byte terminated unique ID.
- Opaque data that is given to the function as an argument.

SUBMIT_REDUCE_JOB, SUBMIT_REDUCE_JOB_BACKGROUND

Works like the other SUBMIT_JOB commands, but adds a reducer argument.

Arguments:
- NULL byte terminated function name.
- NULL byte terminated unique ID.
- NULL byte terminated reducer.
- Opaque data that is given to the function as an argument.

SUBMIT_JOB_SCHED

Just like SUBMIT_JOB_BG, but run job at given time instead of
Expand Down Expand Up @@ -209,6 +226,13 @@ GET_STATUS
Arguments:
- Job handle that was given in JOB_CREATED packet.

GET_STATUS_UNIQUE

A client issues this to get status information for a submitted job.

Arguments:
- Unique value that was given when job was submitted.

OPTION_REQ

A client issues this to set an option for the connection in the
Expand Down Expand Up @@ -255,6 +279,22 @@ STATUS_RES
- NULL byte terminated percent complete numerator.
- Percent complete denominator.

STATUS_RES_UNIQUE

This is sent in response to a GET_STATUS_UNIQUE request. This is
used by clients that have submitted a job with SUBMIT_JOB_BG to see
if the job has been completed, and if not, to get the percentage
complete.

Arguments:
- NULL byte terminated job handle.
- NULL byte terminated known status, this is 0 (false) or 1 (true).
- NULL byte terminated running status, this is 0 (false) or 1
(true).
- NULL byte terminated percent complete numerator.
- NULL byte terminated percent complete denominator.
- Count of clients waiting.

OPTION_RES

Successful response to the OPTION_REQ request.
Expand Down Expand Up @@ -329,6 +369,13 @@ GRAB_JOB_UNIQ
Arguments:
- None.

GRAB_JOB_ALL

Just like GRAB_JOB_UNIQ, but return JOB_ASSIGN_ALL when there is a job.

Arguments:
- None.

WORK_DATA

This is sent to update the client with data from a running job. A
Expand Down Expand Up @@ -456,6 +503,17 @@ JOB_ASSIGN_UNIQ
- NULL byte terminated unique ID.
- Opaque data that is given to the function as an argument.

JOB_ASSIGN_ALL

This is given in response to a GRAB_JOB_ALL request and acts
just like JOB_ASSIGN_UNIQ but with the reducer returned.

Arguments:
- NULL byte terminated job handle.
- NULL byte terminated function name.
- NULL byte terminated unique ID.
- NULL byte terminated reducer.
- Opaque data that is given to the function as an argument.

Administrative Protocol
-----------------------
Expand Down

0 comments on commit eabf8a0

Please sign in to comment.