Source

xnet / README.txt


What is xnet?
------------------

xnet is a prototype for a remote subprocess execution environment.
It requires the eventlet package among some other minor deps.

It consists of three tools that communicate via http and json-serialized
data:

* ``xnet-server``: a flask-based server for registering and managing
  execution jobs aks "xjobs"

* ``xnet-slave``: a worker process that performs http requests to the
  server in order to retrieve xjobs and submit xresults.

* ``xnet``: a command line tool to submit, list and retrieve results of
  running execution jobs.

simple example
----------------

you need to perform something like ``python setup.py develop``. 

Then start in one window::

    xnet-server

start in another window::
    
    xnet submit -- python --version

this will submit the "python --version" execution job.
There is no worker yet so no execution will happen.
The tool invocation finishes after submission to the server
is completed and informs you about the "xjobid".

Now you can start a worker::

    xnet-slave

which will retrieve "a" job (we only have one so far)
execute it and submit the out/err/retcode result to
the server.

In order to retrieve the result you can type::

    xnet result 0   # "0" is the xjobid

which should print output/error/retcode of the execution
that the slave performed.

streaming example
-----------------------

XXX not implemented

start in one window (or re-use the one from the simple example)::

    xnet-server

now submit a job::

    xnet submit -- python  # interactive python interpreter

start a slave::

    xnet-slave

this will now execute the python interpreter.

If you now type::

    xnet attach 0 # the xjobid, might be "1" if your server kept running

and do some basic input/output with the (remote) subprocess.



to run the tests
--------------------

type::

    py.test

which runs some unit and functional tests.