Daniel Cook wrote:
b) Wrap the Java library with some code to use a lightweight message
queue (zeromq) to send messages to my Haskell program?  (This would
require essentially re-implementing an abstracted subset of the the
protocol into 0MQ messages)
A simpler solution might be Facebook's thrift [1] (now an Apache project). You write a simple file in a C-inspired IDL which gives typedefs and RPC signatures, and not only do you get the data structures and serialization functions in a number of target languages including Haskell and Java, but you get lightweight, relatively robust, server and client implementations. The implementations of the Java functions can then be written in Scala or Clojure, so you avoid having to leave fp-land entirely. One could even run the Java binary directly from Haskell using System.Process and friends, and rather than communicating over ports, communicate over pipes. In any case, I've had good luck with this approach.

Cheers,
Sterl.

[1] http://incubator.apache.org/thrift/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to