xnet /

Filename Size Date modified Message
docs
tests
xnet
89 B
1.1 KB
15 B
1.9 KB
2.7 KB
2.1 KB

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.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.