Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
185 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
Cuneiform Worker | ||
================ | ||
Cuneiform Worker (cf_worker) | ||
============================ | ||
|
||
This section describes the Cuneiform worker application :code:`cf_worker`. | ||
This section describes the Cuneiform worker application (cf_worker). | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
cf_worker_deployment | ||
cf_worker_usage | ||
cf_worker_configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.. _cf_worker_deployment: | ||
|
||
Usage | ||
===== | ||
|
||
The Cuneiform worker application (cf_worker) needs to connect to a :ref:`cre`. Thus, in order to start a Cuneiform worker, the Erlang node name of the CRE instance needs to be known (e.g., :code:`cre@x240`). | ||
|
||
Command Line | ||
------------ | ||
|
||
.. code-block:: none | ||
Usage: cf_worker [-v] [-h] [-c <suppl_file>] [-r <cre_node>] | ||
[-n [<n_wrk>]] | ||
-v, --version Show cf_worker version. | ||
-h, --help Show command line options. | ||
-c, --suppl_file Supplementary configuration file. | ||
-r, --cre_node Erlang node running the CRE application (must be | ||
specified). | ||
-n, --n_wrk Number of worker processes to start. 0 means | ||
auto-detect available processors. [default: 0] | ||
The cre_node argument must be specified. | ||
Driving the Application from Erlang | ||
----------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
Common Runtime Environment | ||
========================== | ||
.. _cre: | ||
|
||
Common Runtime Environment (cre) | ||
================================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Erlang Foreign Function Interface (effi) | ||
======================================== | ||
|
||
This section describes the Erlang Foreign Function Interface library (effi). | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
effi_usage | ||
effi_configuration | ||
effi_format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Configuration | ||
============= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
Exchange Formats | ||
================ | ||
|
||
Effi is driven by task instantiations or applications. Running effi on an application results in a reply. Here, we describe the application format and the reply format. | ||
|
||
Example | ||
------- | ||
|
||
.. code-block:: json | ||
{ "app_id": "1234", | ||
"lambda": { "lambda_name": "bowtie2-build", | ||
"arg_type_lst": [{ "arg_name": "fa", | ||
"arg_type": "File", | ||
"is_list": false }], | ||
"ret_type_lst": [{ "arg_name": "idx", | ||
"arg_type": "File", | ||
"is_list": false }], | ||
"lang": "Bash", | ||
"script": "bowtie2-build $fa bt2idx\nidx=idx.tar\ntar cf $idx --remove-files bt2idx.*\n" }, | ||
"arg_bind_lst": [{ "arg_name": "fa", | ||
"value": "chr22.fa" }] } | ||
.. code-block:: json | ||
{ "app_id": "1234", | ||
"extended_script": "...", | ||
"output": "...", | ||
"stat": { "tstart": "...", | ||
"duration": "..." }, | ||
"result": { "status": "ok", | ||
"ret_bind_lst": [{ "arg_name": "idx", | ||
"value": "idx.tar" }] } } | ||
Application Format | ||
------------------ | ||
|
||
The application format is what effi consumes. An application :code:`App` has the following form: | ||
|
||
.. code-block:: none | ||
App ::= { "app_id": S, | ||
"lambda": Lambda, | ||
"arg_bind_lst": [Bind, ...] } | ||
The application's lambda expression :code:`Lambda` has the following form: | ||
|
||
.. code-block:: none | ||
Lambda ::= { "lambda_name": S, | ||
"arg_type_lst": [TArg, ...], | ||
"ret_type_lst": [TArg, ...], | ||
"lang": Lang, | ||
"script": S } | ||
A lambda expression's :code:`arg_type_lst` pair lists specifications for the input parameters while the :code:`ret_type_lst` pair lists specifications for the output parameters of a lambda. An input or output parameter specification :code:`TArg` has the following form: | ||
|
||
.. code-block:: none | ||
TArg ::= { "arg_name": S, | ||
"arg_type": Type, | ||
"is_list": B } | ||
The :code:`arg_type` pair provides the base type of the argument. The base type :code:`Type` has the following form: | ||
|
||
.. code-block:: none | ||
Type ::= "Bool" | ||
| "Str" | ||
| "File" | ||
The :code:`lang` pair provides the programming language in which the script is written. The language :code:`Lang` has the following form: | ||
|
||
.. code-block:: none | ||
Lang ::= "Bash" | ||
| "Octave" | ||
| "Perl" | ||
| "Python" | ||
| "R" | ||
| "Racket" | ||
A lambda expression contains a list of argument bindings :code:`Bind` of the following form: | ||
|
||
.. code-block:: none | ||
Bind ::= { "arg_name": S, "value": S} | ||
| { "arg_name": S, "value": [S, ...] } | ||
.. code-block:: none | ||
B ::= true | ||
| false | ||
.. code-block:: none | ||
S ::= "..." | ||
Reply Format | ||
------------ | ||
|
||
The reply format is what effi produces. | ||
|
||
.. code-block:: none | ||
Reply ::= { "app_id": S, | ||
"extended_script": S, | ||
"stat": { "t_start": S, "duration": S }, | ||
"result": Result } | ||
.. code-block:: none | ||
Result ::= { "status": "ok", "output": S, "ret_bind_lst": [Bind, ...] } | ||
| { "status": "error", "output": S } | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Usage | ||
===== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters