interesting theme.
a easiest way to build cluster/grid/botnet/skynet:
download and build inferno-os. it is a framework/system designed especially to develop distributed networks (
https://en.wikipedia.org/wiki/Inferno_(operating_system) ). it can run as framework on win/lin/mac OSes, x86/arm/sparc/raspberypi like and many others cpus. and it can run as OS itself. yes, it's a oldschool skynet software.
here the main free sources repo -
https://bitbucket.org/inferno-os/inferno-os/
it's easy to buid, but here is a prebuilt package (inferno-owen.xz) -
https://mega.nz/#F!ZshHFJ5J!8-TKqn9gTKZh6QybGKiAjg
unpack somewhere, go to inferno-os folder, run emu.sh
cluster/grid/botnet/shwarz.. hm.. others (easyest kind):
1) one (only one) of nodes (computers in the grid) should contain the registry of currently connected nodes. its IP address should be written to
*inferno-os/lib/ndb/local*
line:
```
infernosite=
...
...
registry=<IP address of registry node>
```
on every node in your botnet.
2) you need start emu on the registry node, run shell (if it started in the graphical mode), and type in the shell:
```
ndb/cs #start the connection server
mount -A -c {ndb/registry} /mnt/registry #mount registry server to /mnt/registry (-A - without security)
listen -A -v 'tcp!*!registry' {export /mnt/registry&} #listen to network and export mounted registry service to just connected node
```
3) start emus on worker nodes and type in their shells:
```
ndb/cs
mount -A 'net!$registry!registry' /mnt/registry #connect to registry node and mount exported registry
#the should register itself in the registry
myip=`{os hostname -I} #get self IP (command "os" runs the command/program of hosting OS, "hostname -I" is here)
grid/reglisten -A -r svc rstyx 'tcp!' ^ $myip ^ '!5678' {auxi/rstyxd&} #register node, run styx (network protocol) server, listen network for rcmd and export rstyxd. very complex command
```
initialisation has finished (all without security - -A key). howto use:
you can see all connected nodes from any connected node:
```
ls /mnt/registry
```
you can send a job to a node:
```
rcmd -A tcp!<IP of a worker node>!5678 <command to execute remotelly. it may contain os cmd>
```
you can send a job to all connected nodes:
```
for i in `{ndb/regquery -n svc rstyx} {
rcmd -A $i <your command>
}
```
in the inferno-owen.xz has file gridlib with this examples written. to use it:
in the shell on registry node:
```
run gridlib
masterinit
```
on worker nodes:
```
run gridlib
workerinit
newcpu
```
now you can use rcmd (or rsplit to run a cmd on all connected nodes)
this was a simple, tutorial example