What is it?

Swarm is a program for POSIX compliant systems which allows for parallelising the running of shell commands.

By "POSIX compliant", I really mean debian and ubuntu, because that's what I used to write it.

How is it useful?

Shell scripting is a powerful tool for automating tasks. In some cases, the order in which a sequence of tasks is completed may be unimportant. However as of yet there is no simple way to parallelise shell scripts.

Swarm runs several instances of a shell, and constructs a pool of tasks for each shell. Multiple tasks can be run simultaneously in swarm.

Yes, it is possible to use job control in most shells to achieve this. However, swarm is simpler to use, and can be also run commands in a distributed cluster environment, rather than being restricted to a single machine.

Swarm keeps distinct shell instances running simultaneously. Shell specific commands allow swarm to be used to control which hosts in a cluster will execute commands. This is useful for use with decentralised services (for example, you could make the webserver run a specific command, and the fileserver run another).

Swarm can be run in the background as a daemon, with subsequent invokations of swarm sending commands to the daemon. This means that parallel and non-parallel sections can be easily seperated in a normal shell script.

Security

Swarm uses ssh to encrypt connections to remote hosts. It is also possible to make unencrypted connections. These are obviously a bad idea unless speed is important, and no hosts in the cluster connect via a public network.

Swarm does not run any daemons to listen for connections. Swarm must use ssh to start remote (slave) instances of swarm. So for someone to trick swarm into accepting a dodgy connection, they'd have to trick ssh into accepting a dodgy connection and then start swarm first.

Obviously, not actually being a computer scientist, I can make no guarantees about the security of swarm.

You'll need to make an ssh key and put the public key on all hosts in a cluster running swarm. Don't make a key with an empty passphrase. Instead use ssh-agent.

Where do I get it

http://matches.ucc.asn.au/swarm.git

How do I use it?

Once you've got it, make install it, then run man swarm and RTFM. Or click here.

Alternately, UCC::Progcomp 2013 uses swarm in this script. So read that script and work it out.

Whom do I sue?

Swarm might break your computers. There. I warned you, so you can't sue me.

(Honestly I don't think it will break things, as long as you don't run it unencrypted accross a public network).