Execnode is a remote subprocess execution environment. So far it consists of a
command line tool (
xn) that allows one to submit jobs to the
central server, the hub (
xnhub), fetch the results of these jobs
once they have been executed by the slaves (
which pull jobs from the hub, and allows one to attach to the stdin and stdout
of the subprocesses running on the slaves, which is what distinguishes execnode
from other such environments. This even makes it possible to remotely start
interpreters or a bash session.
Since the slaves run with the full privileges of the user executing them, they should be sandboxed. Authentication support will probably be added, but so far does not exist. I will probably also add a web interface at some point.
All three components of execnode use websockets and HTTP to talk to each other. The format of the data exchanged is JSON.
Execnode was inspired by the xnet project started by Holger Krekel.
To give execnode a try, install npm (the node package manager) on your system and perform the following steps:
git clone git://github.com/soro/execnode.git ./execnode cd execnode npm link
This should install all dependencies and put the commands
xnslave on your path.
To start a hub, simply execute:
You can then start a slave in a separate shell using:
After you have started both a hub and a slave, you can start submitting jobs as in the following:
xn -s "ls /" xn -s "python -i" xn -s "bash"
To list all the jobs currently registered with the hub, use
If you want to fetch the result of a job, use the option "-f" followed by the id
of the job you are interested in.
To interactively attach to a job, use the option "-a", followed by the job id.
This will usually only be of interest for jobs that require input or will run
for a longer period of time, like a test suite.
In general, using
xn --help will give you a full list of available
To terminate a running job while you are attached to it, enter "/term".
Docco generated source code documentation can be found in the docs folder.
If you are interested, there is still quite a lot of room for improvement, first and foremost the authentication and authorization support. The web interface would also be an interesting project to work on and more tests would be useful as well. It would be nice to have the option of describing jobs in json files or in some other file based way, so that one doesn't always have to use command line parameters.
All of execnode is licensed under the MIT license (see included license.txt).