Did some stuff
[matches/swarm.git] / doc / swarm.html
1 <html>
2 <head>
3 <title>swarm</title>
4 </head>
5 <body bgcolor=white>
6
7 <h1> What is it? </h1>
8 <p> Swarm is a program for POSIX compliant systems which allows for parallelising the running of shell commands. </p>
9 <p> By "POSIX compliant", I really mean debian and ubuntu, because that's what I used to write it. </p>
10
11 <h1> How is it useful? </h1>
12 <p> 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. 
13 However as of yet there is no simple way to parallelise shell scripts. </p>
14 <p> Swarm runs several instances of a shell, and constructs a pool of tasks for each shell. Multiple tasks can be run simultaneously in swarm. </p>
15
16 <p> 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. </p>
17
18 <p> 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). </p>
19
20 <p> 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. </p>
21
22 <h1> Security </h1>
23
24 <p> 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. </p>
25
26 <p> 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. </p>
27
28
29 <p> Obviously, not actually being a computer scientist, I can make no guarantees about the security of swarm. </p>
30
31 <p> 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. </p>
32
33 <h1> Where do I get it </h1>
34
35 <p> <a href="http://matches.ucc.asn.au/swarm.git">http://matches.ucc.asn.au/swarm.git</a> </p>
36
37 <h1> How do I use it? </h1>
38
39 <p> Once you've got it, <i>make install</i> it, then run <i>man swarm</i> and RTFM. Or click <a href="swarm.1.txt"/>here</a>. </p>
40 <p> Alternately, <a href="http://progcomp.ucc.asn.au/2013/web">UCC::Progcomp 2013</a> uses swarm in <a href="http://git.ucc.asn.au/?p=progcomp2013.git;a=blob_plain;f=run.sh">this script</a>. So read that script and work it out. </p>
41
42 <h1> Whom do I sue? </h1>
43
44 <p> Swarm might break your computers. There. I warned you, so you can't sue me. </p>
45 <p> (Honestly I don't think it will break things, as long as you don't run it unencrypted accross a public network). </p>
46
47
48 </body>
49 </html>

UCC git Repository :: git.ucc.asn.au