3 (in-package :cl-cluster
)
6 (let ((node1 (make-instance 'node
:host
"rhel4" :connect t
))
7 (node2 (make-instance 'node
:host
"rhel5" :connect t
))
8 (node3 (make-instance 'node
:host
"rhel5" :lisp
"/usr/bin/clisp -q" :connect t
)))
9 (declare (special node1 node2 node3
))
11 (dolist (node (list node1 node2 node3
))
12 (when (node-alive-p node
)
15 (format t
"Remote \"~A\" runs ~A ~A~%"
17 (node-exec node
"(lisp-implementation-type)")
18 (node-exec node
"(lisp-implementation-version)"))
19 (node-exec node
"(killallhumans)"))
21 (format t
"got error: ~A~%" condition
)))))
24 ((a (with-remote node1
30 (setq n1
(make-instance 'node
:host
"rhel4" :connect t
))
31 (setq n2
(make-instance 'node
:host
"rhel5" :connect t
))
32 ;; connect to host's different lisp
33 (setq n3
(make-instance 'node
:host
"rhel5" :lisp
"/usr/bin/clisp -q" :connect t
))
35 (setq n4
(make-instance 'node
:host
"rhel4" :lisp
"/usr/bin/clisp -q" :connect t
))
37 ;; node-exec expets only strings
40 ;; catch remote exception locally
41 (node-exec n1
"(lisp-implementation-type1)")
44 (lisp-implementation-type)
45 (lisp-implementation-version))
47 ;; calculate some stuff on remote lisps and aggregate answers on another remote
64 (lisp-implementation-type)
65 (lisp-implementation-version))
69 (asdf:oos
'asdf
:load-op
:asdf
))