views:

147

answers:

2

I'm looking for a way to pass events back and forth between Clojure and erlang.

  • has someone done this before?
  • how should I encode the (immutable) messages in a flaxable general way?
  • Should IPC be used for this? what sort?
  • where has this gone wrong for you in the past?
+2  A: 

You've got lots of options as long as you use a socket (e.g. TCP/IP).

  • Have you considered JSON?
  • XML?

I can't say I've done Clojure <--> Erlang bridges before but "talking" to Erlang in JSON/XML is sufficiently painless.

Of course you can use the erl_interface (binary exchange protocol) but then you'll need (probably unless there is a lib for this) to craft a marshaller for this in Clojure.

jldupont
+5  A: 

You could use jinterface from clojure and be able to act as an Erlang node and send out multiple Pids associated with your node, in the Erlang cluster.

Christian
+1 using the java library for integration is probably a quick route to this.
Jeremy Wall