Thanks! I knew I had read something that was along these lines and that was it. I've been thinking about this problem for years. Perhaps it's time I worked on it myself.
I've long wanted to see something like an Eclipse daemon offering tool support to external editors etc. Ensime [1] does something along these lines, getting Scala' compiler functionality into Emacs using the Swank protocol from Slime [2].