Simple batch application (bapp) written in Erlang. The purpose of this application is to demonstrate Erlang strength in building distributed and concurrent applications. The bapp package provides OTP Erlang batch server and erlang/python clients. The batch server executes given command either on a server node or on a set of participating nodes. The batch server can be configured as VM with multiple CPUs.
The bapp application was originally designed to run a given command with a given directory, e.g. ls You may modify this behavior as you please, see apps/bapp/src/bapp_server.erl, apps/bapp/src/worker.erl.
For node autodiscovery on a LAN we depends on nodefinder package, see http://code.google.com/p/nodefinder/ Based on its license (New BSD license, http://www.opensource.org/licenses/bsd-license.php) its code distribution is allowed to be included with proper COPYING message.
To run the server and erlang client you just need Erlang to be installed on your system. While python client depends on pyerl (python-erlang binding), see https://github.com/hamano/python-erlang-interface.git git clone git://github.com/hamano/python-erlang-interface.git
- Untar bapp.tar.gz
- run make
- tune-up rel/mynode/etc/vm.args (if required)
- start-up server as (using bash shell):
# export PATH=$PWD/rel/mynode/bin:$PATH # mynode console|start|stop
The console mode will start the application and gives you access to standard Erlang console, while start|stop action will either start or stop the application (aka daemon mode).
The bapp is a standard OTP application . You can adjust server parameters in rel/etc/vm.args. The release parameters can be tune-up in rel/reltool.config.
Adjust host, node name, cookie parameters in pyerl_client.py or erl_client.erl scripts to reflect server parameters.
. ├── apps │ └── bapp │ ├── ebin │ └── src ├── client │ └── input_files ├── ebin └── rel └── files
The apps area contains Erlang server code. The client area contains erlang and python client code. The rel area contains Erlang release code (generated by make). The client/input_files is a directory which contains a list of input files used for test purpose. Those are empty files. The client area contains test.py file which is used as a "test executable". It reads given input file and produce an output file in the same area.