[slime-devel] Slime and clusters

Robert Brown robert.brown at gmail.com
Mon Oct 31 19:02:11 UTC 2011

I'm using Slime's Swank protocol to do master/slave style processing on
machines in a Google data center.  I start up a master Lisp and a bunch of
worker Lisps, all of them running swank servers.  I ssh into the master Lisp
and set up an Emacs/Slime connection to it.  I run code on the master that
farms out s-expressions to worker machines for evaluation using the Swank
protocol.  I have modified Slime slightly so that debugger breakpoints in the
workers are forwarded through the master Lisp back to my Emacs/Slime session,
so I can debug problems on both the master and the workers.

The code I'm using has been released as open source by Google:


In addition to the Swank client code, I've patched SBCL to print specialized
arrays readably, which is important if remote evaluation requests include them.
That patch is in an SBCL bug report:


Also, some SBCL strings are of type base-string and don't like to be printed
readably, so I modified slime/swank-rpc.lisp to try non-readable printing when
SBCL's print-not-readable condition is signaled.

Most important, however, is a small change to slime/swank.lisp that lets you
debug problems on the remote worker Lisps where you are evaluating expressions.
If something goes wrong, Swank on the remote worker sends a message back to the
master asking it to pop up a debugger window.  My change causes Swank on the
master to forward this message to Emacs/Slime so that the problem can be
debugged.  You can see this code in action if you evaluate something like:

  (slime-eval '(error "hello world") connection)

Anyway, I've included my patches for slime/swank.lisp and slime/swank-rpc.lisp
as an attachment.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: attachment
Type: application/octet-stream
Size: 2961 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20111031/8fe2689f/attachment.obj>

More information about the slime-devel mailing list