
A simpler solution might be Facebook's thrift [1]
This is a very interesting solution. I'll investigate Thrift further, but it may wind up being what I do. Does anyone know how solid this code is in Haskell?
the Java binary directly from Haskell using System.Process and friends, and rather than communicating over ports, communicate over pipes.
Cool! This is probably a second step, though - first get the code
working, then worry about
making it all fast.
On Fri, Jul 9, 2010 at 5:11 AM, sterl
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.