Skip to content

Commit

Permalink
Fix worker protocol document. Closes discoproject#273
Browse files Browse the repository at this point in the history
  • Loading branch information
Ville Tuulos committed Sep 22, 2011
1 parent f6691ab commit 07f002e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions doc/howto/worker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Message Format

Messages in the protocol, both from and to the worker, are in the format:

*<name>* 'SP' *<payload-len>* 'SP' *<payload>* '\n'
*<name>* 'SP' *<payload-len>* 'SP' *<payload>* '\\n'

where 'SP' denotes a single space character, and *<name>* is one of:

Expand All @@ -79,6 +79,9 @@ where 'SP' denotes a single space character, and *<name>* is one of:
*<payload-len>* is the length of the *<payload>* in bytes,
and *<payload>* is a :term:`JSON` formatted term.

Note that messages that have no payload (see below) actually
contain an empty JSON string *<payload> = ""* and *<payload-len> = 2*.

Messages from the Worker to Disco
=================================

Expand Down Expand Up @@ -193,12 +196,13 @@ INPUT
each such location is called a `replica`. A `rep_id` is an integer
identifying the replica.

The `replica_location` is specified as a URL. The protocol scheme
used for the `replica_location` could be one of `http`, `disco`, or
`raw`. A URL with the `disco` scheme is to be accessed using HTTP
at the `disco_port` specified in the `TASK` response from Disco.
The `replica_location` is specified as a URL. The protocol scheme
used for the `replica_location` could be one of `http`, `disco`,
`dir` or `raw`. A URL with the `disco` scheme is to be accessed using
HTTP at the `disco_port` specified in the `TASK` response from Disco.
The `raw` scheme denotes that the URL itself (minus the scheme) is
the data for the task.
the data for the task. The data needs to be properly URL encoded,
for instance using Base64 encoding.

One important optimization is to use the local filesystem instead
of HTTP for accessing inputs when they are local. This can be
Expand Down

0 comments on commit 07f002e

Please sign in to comment.