ddist: example1
configure and start listeners
load ddist on the first 'listener' lisp instance
shell% sbcl
(require 'asdf)
(asdf:operate 'asdf:load-op :ddist)
start listener on first listener lisp instance
* (setf ddist:*listener-ip* "127.0.0.1")
"127.0.0.1"
* (ddist:listener)
DDIST version 0.2.14
listening at (127.0.0.1 12345)
..
load ddist on the second 'listener' lisp instance
shell% sbcl
(require 'asdf)
(asdf:operate 'asdf:load-op :ddist)
start listener on second listener
* (setf ddist:*listener-ip* "127.0.0.2")
"127.0.0.2"
* (ddist:listener)
DDIST version 0.2.14
listening at (127.0.0.2 12345)
..
configure master
load ddist on the third 'master' lisp instance
shell% sbcl
(require 'asdf)
(asdf:operate 'asdf:load-op :ddist)
configure master and check the configuration
DDIST> (setf ddist:*slave-ips* '("127.0.0.1" "127.0.0.2"))
("127.0.0.1" "127.0.0.2")
DDIST> (ddist:dist-reset)
NIL
DDIST> (ddist:ddparams)
127.0.0.1.127.0.0.2.
" DDIST version 0.2.14
slaves
----------------------------
*slave-ips*: (\"127.0.0.1\" \"127.0.0.2\")
*listener-port*: 12345
slaves: current status
----------------------------
slave stati:
127.0.0.1: looks good
127.0.0.2: looks good
currently queued jobs: NIL
currently completed jobs: NIL"
distribute jobs
DDIST> (ddist:distribute (list '(+ 1 1) '(+ 2 2) '(+ 3 3)))
((2) (4) (6))
DDIST>