Skip to content
Simple batch application written in Erlang
Erlang Shell Python Batchfile Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
apps
client
rel
.gitignore
.travis.yml
HOWTO
Makefile
README.md
rebar
rebar.config

README.md

bapp

Build Status GoDoc

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.

Dependencies:

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

Installation:

  1. Untar bapp.tar.gz
  2. run make
  3. tune-up rel/mynode/etc/vm.args (if required)
  4. 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).

Server configuration:

The bapp is a standard OTP application [1]. You can adjust server parameters in rel/etc/vm.args. The release parameters can be tune-up in rel/reltool.config.

Client configuration:

Adjust host, node name, cookie parameters in pyerl_client.py or erl_client.erl scripts to reflect server parameters.

Code structure:

.
├── 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.

References:

  1. http://www.erlang.org/doc/design_principles/users_guide.html

Author:

Valentin Kuznetsov

License:

MIT, http://www.opensource.org/licenses/mit-license.php

Something went wrong with that request. Please try again.