Master machine (IP: 192.168.0.100)
$ olymp --master --name master.local --webui
Machine 1
$ olymp --child 192.168.0.100:17930 --name child1.local --user admin --password admin
Machine 2
$ olymp --child 192.168.0.100:17930 --name child2.local --user admin --password admin
$ olymp --configure localhost:17929 --user admin --password admin
master.local>
We will upload a simple calculator program that we wrote.
master.local> put program "/home/u1/calc.dll" as "calculator"
master.local> distribute "calculator" to "child1.local"
master.local> distribute "calculator" to "child2.local"
This pipeline can access our calculator program and use it from our master node.
function add(w,x,y,z){
var node1 = getNode("child1.local");
var node2 = getNode("child2.local");
var c1 = node1.getWorker("calculator");
var c2 = node2.getWorker("calculator");
simultan([
function(){r1 = c1.add(w,x);},
function(){r2 = c2.add(y,z);}
]);
return r1 + r2;
}
master.local> put pipeline "/home/u1/add.js" as "add"
master.local> distribute "add" to self
- Configuration: 17929
- Child connections: 17930